[PATCH] hw/i386/amd_iommu: Fix remapping of APIC registers

Austin Conatser posted 1 patch 3 years, 10 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/CAO7oc52NECtz_0xQgyezgp9A-J-9Vvv8xUP92aTizCHKh550fA@mail.gmail.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>, "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
hw/i386/amd_iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] hw/i386/amd_iommu: Fix remapping of APIC registers
Posted by Austin Conatser 3 years, 10 months ago
Changes the check from only allowing the APIC base address to
allowing the entire APIC address space.

Signed-off-by: Austin Conatser <austin@amass.space>
---
 hw/i386/amd_iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c
index ea8eaeb330..61b7416d50 100644
--- a/hw/i386/amd_iommu.c
+++ b/hw/i386/amd_iommu.c
@@ -1248,7 +1248,7 @@ static int amdvi_int_remap_msi(AMDVIState *iommu,
         return -AMDVI_IR_ERR;
     }

-    if ((origin->address & AMDVI_MSI_ADDR_LO_MASK) != APIC_DEFAULT_ADDRESS) {
+    if (!amdvi_is_interrupt_addr(origin->address & AMDVI_MSI_ADDR_LO_MASK)) {
         trace_amdvi_err("MSI is not from IOAPIC.");
         return -AMDVI_IR_ERR;
     }
-- 
2.34.1