qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] kvm: x86: Fix kvm_arch_fixup_msi_route for rema


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] kvm: x86: Fix kvm_arch_fixup_msi_route for remap-less case
Date: Tue, 11 Sep 2018 15:09:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 27/08/2018 10:47, Jan Kiszka wrote:
> 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 <address@hidden>
> Signed-off-by: Jan Kiszka <address@hidden>
> ---
>  target/i386/kvm.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/target/i386/kvm.c b/target/i386/kvm.c
> index 9313602d3d..1fe3a73a10 100644
> --- a/target/i386/kvm.c
> +++ b/target/i386/kvm.c
> @@ -3677,6 +3677,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;
> 

Queued, thanks.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]