Skip to content
Snippets Groups Projects
Commit 0ea1472d authored by Jan Kiszka's avatar Jan Kiszka Committed by Paolo Bonzini
Browse files

kvm: x86: Fix kvm_arch_fixup_msi_route for remap-less case


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: 8b5ed7df ("intel_iommu: add support for split irqchip")
Reported-by: default avatarChristopher Goldsworthy <christopher.goldsworthy@outlook.com>
Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
Message-Id: <48ae78d8-58ec-8813-8680-6f407ea46041@siemens.com>
Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 38296400
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment