Skip to content

amd_iommu: Support Generation of IOMMU XT interrupts

Sairaj Kodilkar qemu-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 3 patches 0 repliesNew

Changes since v1 from the cover letter

Patches in v1 No applies recorded yet

None of the 3 patches the cover letter announces are in this archive.

Reviews trailers per patch

PatchVasant HegdeAlejandro Jimenez
SeriesR-b R-b R-b R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] amd_iommu: Support Generation of IOMMU XT interrupts

AMD IOMMU uses MMIO registers 0x170-0x180 to generate the interrupts when guest has enabled xt support through control register. The guest programs these registers with appropriate vector and destination ID instead of writing to PCI MSI capability.

Until now enabling the xt support through command line "xtsup=on" provided support for 128 bit IRTE. But it has few limitations:

1. It does not consider if guest has actually enabled xt support through MMIO control register (0x18). This may cause problems for the guests which do not enable this support.
2. The vIOMMU is not capable of generating interrupts using vector and destinatio ID in IOMMU x2APIC Control Registers (not supporting event log interrupts).

To overcome above limitations, this patch series introduces new internal flag "intcapxten" which is set when guest writes "1" to MMIO control register (0x18) bit 51 (IntCapXTEn) and adds support to generate event log interrupt using vector and 32 bit destination ID in XT MMIO register 0x170.
-------------------------------------------------------------------------------

Changes since v1:
https://lore.kernel.org/qemu-devel/[email protected]/t/#m67401571075c42c26cc2560c94c1fc83836c9b20

Patch 1: Return string literals directly instead of copying [AJ] Patch 2:
- Update commit message [AJ]
- Introduce new subsection for migration compatibility [AJ]
- Update comment [AJ]
Patch 3: Use ga_enabled flag while setting xten flag [AJ]

-------------------------------------------------------------------------------

The patches are based on top of upstream qemu master (a524ba4ae14)

-------------------------------------------------------------------------------

Sairaj Kodilkar (3):
amd_iommu: Use switch case to determine mmio register name
amd_iommu: Turn on XT support only when guest has enabled it
amd_iommu: Generate XT interrupts when xt support is enabled

 hw/i386/amd_iommu.c  | 129 ++++++++++++++++++++++++++++---------------
 hw/i386/amd_iommu.h  |  21 ++++++-
 hw/i386/trace-events |   1 +
 3 files changed, 104 insertions(+), 47 deletions(-)
Signature · 1 line
2.34.1