]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/amd: Fix IOMMU AVIC not properly update the is_run bit in IRTE
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Thu, 12 Mar 2020 10:18:39 +0000 (05:18 -0500)
committerJoerg Roedel <jroedel@suse.de>
Sat, 14 Mar 2020 08:39:11 +0000 (09:39 +0100)
commit99fbc6a3f6165077ff9a805411ac798f26bc152d
tree0ed7aac1335bb87fce1e1efe4f478c6c5ef492e6
parented10f57245998cd75dde58062883a87a9bd832d8
iommu/amd: Fix IOMMU AVIC not properly update the is_run bit in IRTE

Commit cd9da301404c ("iommu/amd: Re-factor guest virtual APIC
(de-)activation code") accidentally left out the ir_data pointer when
calling modity_irte_ga(), which causes the function amd_iommu_update_ga()
to return prematurely due to struct amd_ir_data.ref is NULL and
the "is_run" bit of IRTE does not get updated properly.

This results in bad I/O performance since IOMMU AVIC always generate GA Log
entry and notify IOMMU driver and KVM when it receives interrupt from the
PCI pass-through device instead of directly inject interrupt to the vCPU.

Fixes by passing ir_data when calling modify_irte_ga() as done previously.

Fixes: cd9da301404c ("iommu/amd: Re-factor guest virtual APIC (de-)activation code")
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd_iommu.c