hw/i386/amd_iommu.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
Fix following two issues in the amd viommu
1. The guest fails to setup the passthrough device when for following setup
because amd iommu enables the no DMA memory region even when guest is
using DMA remapping mode.
-device amd-iommu,intremap=on,xtsup=on,pt=on \
-device vfio-pci,host=<DEVID> \
and guest forcing DMA remap mode e.g. 'iommu.passthrough=0'
which will cause failures from QEMU:
qemu-system-x86_64: AHCI: Failed to start DMA engine: bad command list buffer address
qemu-system-x86_64: AHCI: Failed to start FIS receive engine: bad FIS receive buffer address
qemu-system-x86_64: AHCI: Failed to start DMA engine: bad command list buffer address
qemu-system-x86_64: AHCI: Failed to start FIS receive engine: bad FIS receive buffer address
qemu-system-x86_64: AHCI: Failed to start DMA engine: bad command list buffer address
2. The guest fails to boot with xtsup=on and <= 255 vCPUs, because amd_iommu
does not enable x2apic mode.
base commit 56c6e249b6988c1b6edc2dd34ebb0f1e570a1365 (v10.0.0-rc3)
Sairaj Kodilkar (1):
hw/i386/amd_iommu: Fix device setup failure when PT is on.
Vasant Hegde (1):
hw/i386/amd_iommu: Fix xtsup when vcpus < 255
hw/i386/amd_iommu.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
--
2.34.1
On 16.05.2025 13:05, Sairaj Kodilkar wrote: > Fix following two issues in the amd viommu > 1. The guest fails to setup the passthrough device when for following setup > because amd iommu enables the no DMA memory region even when guest is > using DMA remapping mode. > > -device amd-iommu,intremap=on,xtsup=on,pt=on \ > -device vfio-pci,host=<DEVID> \ > > and guest forcing DMA remap mode e.g. 'iommu.passthrough=0' > > which will cause failures from QEMU: > > qemu-system-x86_64: AHCI: Failed to start DMA engine: bad command list buffer address > qemu-system-x86_64: AHCI: Failed to start FIS receive engine: bad FIS receive buffer address > qemu-system-x86_64: AHCI: Failed to start DMA engine: bad command list buffer address > qemu-system-x86_64: AHCI: Failed to start FIS receive engine: bad FIS receive buffer address > qemu-system-x86_64: AHCI: Failed to start DMA engine: bad command list buffer address > > > 2. The guest fails to boot with xtsup=on and <= 255 vCPUs, because amd_iommu > does not enable x2apic mode. > > base commit 56c6e249b6988c1b6edc2dd34ebb0f1e570a1365 (v10.0.0-rc3) > > Sairaj Kodilkar (1): > hw/i386/amd_iommu: Fix device setup failure when PT is on. > > Vasant Hegde (1): > hw/i386/amd_iommu: Fix xtsup when vcpus < 255 Hi! Is this a qemu-stable material (for 10.0.x)? Thanks, /mjt
On 6/3/2025 2:24 AM, Michael Tokarev wrote: > On 16.05.2025 13:05, Sairaj Kodilkar wrote: >> Fix following two issues in the amd viommu >> 1. The guest fails to setup the passthrough device when for following >> setup >> because amd iommu enables the no DMA memory region even when guest is >> using DMA remapping mode. >> >> -device amd-iommu,intremap=on,xtsup=on,pt=on \ >> -device vfio-pci,host=<DEVID> \ >> >> and guest forcing DMA remap mode e.g. 'iommu.passthrough=0' >> >> which will cause failures from QEMU: >> >> qemu-system-x86_64: AHCI: Failed to start DMA engine: bad command >> list buffer address >> qemu-system-x86_64: AHCI: Failed to start FIS receive engine: bad >> FIS receive buffer address >> qemu-system-x86_64: AHCI: Failed to start DMA engine: bad command >> list buffer address >> qemu-system-x86_64: AHCI: Failed to start FIS receive engine: bad >> FIS receive buffer address >> qemu-system-x86_64: AHCI: Failed to start DMA engine: bad command >> list buffer address >> >> >> 2. The guest fails to boot with xtsup=on and <= 255 vCPUs, because >> amd_iommu >> does not enable x2apic mode. >> >> base commit 56c6e249b6988c1b6edc2dd34ebb0f1e570a1365 (v10.0.0-rc3) >> >> Sairaj Kodilkar (1): >> hw/i386/amd_iommu: Fix device setup failure when PT is on. >> >> Vasant Hegde (1): >> hw/i386/amd_iommu: Fix xtsup when vcpus < 255 > > Hi! > > Is this a qemu-stable material (for 10.0.x)? Yes it is Thanks Sairaj Kodilkar
On Fri, May 16, 2025 at 03:35:33PM +0530, Sairaj Kodilkar wrote: > Fix following two issues in the amd viommu > 1. The guest fails to setup the passthrough device when for following setup > because amd iommu enables the no DMA memory region even when guest is > using DMA remapping mode. > > -device amd-iommu,intremap=on,xtsup=on,pt=on \ > -device vfio-pci,host=<DEVID> \ > > and guest forcing DMA remap mode e.g. 'iommu.passthrough=0' > > which will cause failures from QEMU: > > qemu-system-x86_64: AHCI: Failed to start DMA engine: bad command list buffer address > qemu-system-x86_64: AHCI: Failed to start FIS receive engine: bad FIS receive buffer address > qemu-system-x86_64: AHCI: Failed to start DMA engine: bad command list buffer address > qemu-system-x86_64: AHCI: Failed to start FIS receive engine: bad FIS receive buffer address > qemu-system-x86_64: AHCI: Failed to start DMA engine: bad command list buffer address > > > 2. The guest fails to boot with xtsup=on and <= 255 vCPUs, because amd_iommu > does not enable x2apic mode. > > base commit 56c6e249b6988c1b6edc2dd34ebb0f1e570a1365 (v10.0.0-rc3) > > Sairaj Kodilkar (1): > hw/i386/amd_iommu: Fix device setup failure when PT is on. > > Vasant Hegde (1): > hw/i386/amd_iommu: Fix xtsup when vcpus < 255 > > hw/i386/amd_iommu.c | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) changelog? > -- > 2.34.1
On 5/16/2025 4:06 PM, Michael S. Tsirkin wrote: > On Fri, May 16, 2025 at 03:35:33PM +0530, Sairaj Kodilkar wrote: >> Fix following two issues in the amd viommu >> 1. The guest fails to setup the passthrough device when for following setup >> because amd iommu enables the no DMA memory region even when guest is >> using DMA remapping mode. >> >> -device amd-iommu,intremap=on,xtsup=on,pt=on \ >> -device vfio-pci,host=<DEVID> \ >> >> and guest forcing DMA remap mode e.g. 'iommu.passthrough=0' >> >> which will cause failures from QEMU: >> >> qemu-system-x86_64: AHCI: Failed to start DMA engine: bad command list buffer address >> qemu-system-x86_64: AHCI: Failed to start FIS receive engine: bad FIS receive buffer address >> qemu-system-x86_64: AHCI: Failed to start DMA engine: bad command list buffer address >> qemu-system-x86_64: AHCI: Failed to start FIS receive engine: bad FIS receive buffer address >> qemu-system-x86_64: AHCI: Failed to start DMA engine: bad command list buffer address >> >> >> 2. The guest fails to boot with xtsup=on and <= 255 vCPUs, because amd_iommu >> does not enable x2apic mode. >> >> base commit 56c6e249b6988c1b6edc2dd34ebb0f1e570a1365 (v10.0.0-rc3) >> >> Sairaj Kodilkar (1): >> hw/i386/amd_iommu: Fix device setup failure when PT is on. >> >> Vasant Hegde (1): >> hw/i386/amd_iommu: Fix xtsup when vcpus < 255 >> >> hw/i386/amd_iommu.c | 20 ++++++++++---------- >> 1 file changed, 10 insertions(+), 10 deletions(-) > > changelog? > Sorry I forgot to update the cover-letter (Rookie mistake). Changes Since v2: Patch 1: Updated commit message [mst] Patch 2: Updated commit message [mst] v2: https://lore.kernel.org/qemu-devel/20250509064526.15500-1-sarunkod@amd.com/ Changes Since v1: Patch 1: Updated commit message [Alejandro] Patch 2: None v1: https://lore.kernel.org/qemu-devel/20250410064447.29583-1-sarunkod@amd.com/ Regards Sairaj Kodilkar >> -- >> 2.34.1 >
© 2016 - 2025 Red Hat, Inc.