]> Git Repo - qemu.git/commitdiff
kvm: x86: Fix kvm_arch_fixup_msi_route for remap-less case
authorJan Kiszka <[email protected]>
Mon, 27 Aug 2018 08:47:51 +0000 (10:47 +0200)
committerPaolo Bonzini <[email protected]>
Tue, 2 Oct 2018 16:47:55 +0000 (18:47 +0200)
The AMD IOMMU does not (yet) support interrupt remapping. But
kvm_arch_fixup_msi_route assumes that all implementations do and crashes
when the AMD IOMMU is used in KVM mode.

Fixes: 8b5ed7dffa1f ("intel_iommu: add support for split irqchip")
Reported-by: Christopher Goldsworthy <[email protected]>
Signed-off-by: Jan Kiszka <[email protected]>
Message-Id: <48ae78d8-58ec-8813-8680-6f407ea46041@siemens.com>
Reviewed-by: Peter Xu <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
target/i386/kvm.c

index 0b2a07d3a47b22c8563b82810674373692cbc69a..de892db67126e2aca2b5dd04e1e5769e313077ef 100644 (file)
@@ -3669,6 +3669,10 @@ int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route,
         MSIMessage src, dst;
         X86IOMMUClass *class = X86_IOMMU_GET_CLASS(iommu);
 
+        if (!class->int_remap) {
+            return 0;
+        }
+
         src.address = route->u.msi.address_hi;
         src.address <<= VTD_MSI_ADDR_HI_SHIFT;
         src.address |= route->u.msi.address_lo;
This page took 0.036214 seconds and 4 git commands to generate.