lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHP4M8W+uMHkzcx-fHJ0NxYf4hrkdFBQTGWwax5wHLa0Qf37Nw@mail.gmail.com>
Date: Thu, 18 Sep 2025 23:24:19 +0530
From: Ajay Garg <ajaygargnsit@...il.com>
To: iommu@...ts.linux-foundation.org, linux-pci@...r.kernel.org, 
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: How are iommu-mappings set up in guest-OS for dma_alloc_coherent

Hi everyone.

Let's say we have a following setup :

i)
x86_64 host-os, booted up with iommu enabled and pass-through mode.

ii)
x86_64 guest-os, booted up using vfio+qemu+kvm and a pci-device attached to it.

iii)
A guest-os-device-driver calls "dma_alloc_coherent", after which the
returned dma-address / iova is programmed to the pci-device's
mmio-register.


In the above case, how are the IOMMU mappings set up during the
guest-os-device-driver's "dma_alloc_coherent" call?
Does :

a)
The VMM / KVM intercept the "dma_alloc_coherent" call, and use the
host-iommu to set up things?

OR

b)
There is no interception from VMM / KVM, but rather the guest-OS
itself has a view of the IOMMU (through the regular ACPI tables
populated during guest boot up)?

OR

c)
Anything else under the hood?


Will be grateful for clearing the haze.


Thanks and Regards,
Ajay

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ