svm: Implements update_pi_irte hook to setup posted interrupt
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Tue, 23 Aug 2016 18:52:43 +0000 (13:52 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 8 Sep 2016 11:18:58 +0000 (13:18 +0200)
commit411b44ba80ab0023383fe3f377e903cb0cb7d8bb
tree5efb3d31f639aa856eff3975230ed5f1769d9f4b
parent5881f73757cc3dbada878e67c119a801ed0f9a07
svm: Implements update_pi_irte hook to setup posted interrupt

This patch implements update_pi_irte function hook to allow SVM
communicate to IOMMU driver regarding how to set up IRTE for handling
posted interrupt.

In case AVIC is enabled, during vcpu_load/unload, SVM needs to update
IOMMU IRTE with appropriate host physical APIC ID. Also, when
vcpu_blocking/unblocking, SVM needs to update the is-running bit in
the IOMMU IRTE. Both are achieved via calling amd_iommu_update_ga().

However, if GA mode is not enabled for the pass-through device,
IOMMU driver will simply just return when calling amd_iommu_update_ga.

Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm.c