Re: [PATCH v4 4/7] iommu/amd: Program guest-mode IRTEs for GAPPI wakeup when IRTE[IsRun] = 0

From: Vasant Hegde

Date: Fri Aug 21 2026 - 11:58:40 EST




On 8/21/2026 11:26 AM, Sairaj Kodilkar wrote:
> Guest APIC Physical Processor Interrupt (GAPPI) is an alternative to the
> GA log for notifying the host when a device interrupt targets a
> non-running vCPU (IRTE[IsRun] = 0). Per the AMD IOMMU specification [1]
> (section 2.2.5.4), with GAPPI enabled the IOMMU delivers a physical APIC
> interrupt to the CPU described by IRTE[Destination], using
> IRTE[GATag][7:0] as the vector, while still updating the guest vAPIC
> backing page IRR as usual.
>
> The AMD IOMMU also allows suppressing GAPPI interrupts using the
> IRTE[GAPPIDis] bit when the GAPPIDisSup feature is available in
> extended feature register 2. The AMD IOMMU driver sets this bit when
> the wakeup_intr flag is not set by KVM.
>
> Note: amd_iommu_gappi is currently false; a later patch enables it via
> the kernel command line.
>
> [1] https://docs.amd.com/v/u/en-US/48882_3.11_IOMMU_PUB
>
> Signed-off-by: Sairaj Kodilkar <sarunkod@xxxxxxx>

Reviewed-by: Vasant Hegde <vasant.hegde@xxxxxxx>

-Vasant