From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
Paolo Bonzini <pbonzini@redhat.com>, Peter Xu <peterx@redhat.com>,
Christopher Goldsworthy <christopher.goldsworthy@outlook.com>
Subject: Re: [Qemu-devel] [PATCH] kvm: x86: Fix kvm_arch_fixup_msi_route for remap-less case
Date: Fri, 7 Sep 2018 16:36:54 -0400 [thread overview]
Message-ID: <20180907163625-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <48ae78d8-58ec-8813-8680-6f407ea46041@siemens.com>
On Mon, Aug 27, 2018 at 10:47:51AM +0200, 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 <christopher.goldsworthy@outlook.com>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> 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;
> --
> 2.16.4
next prev parent reply other threads:[~2018-09-07 20:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-27 8:47 [Qemu-devel] [PATCH] kvm: x86: Fix kvm_arch_fixup_msi_route for remap-less case Jan Kiszka
2018-08-27 9:01 ` Peter Xu
2018-09-07 20:36 ` Michael S. Tsirkin [this message]
2018-09-11 13:09 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180907163625-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=christopher.goldsworthy@outlook.com \
--cc=jan.kiszka@siemens.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.