From: David Gibson <david@gibson.dropbear.id.au>
To: Peter Xu <peterx@redhat.com>
Cc: qemu-devel@nongnu.org, aik@ozlabs.ru, qemu-ppc@nongnu.org,
pbonzini@redhat.com, alex.williamson@redhat.com, mst@redhat.com,
thuth@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2] kvm-irqchip: only commit route when irqchip is used
Date: Wed, 3 Aug 2016 13:37:46 +1000 [thread overview]
Message-ID: <20160803033746.GI27583@voom.fritz.box> (raw)
In-Reply-To: <1470193641-26000-1-git-send-email-peterx@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1428 bytes --]
On Wed, Aug 03, 2016 at 11:07:21AM +0800, Peter Xu wrote:
> Reported from Alexey Kardashevskiy:
>
> 3f1fea0fb5bf "kvm-irqchip: do explicit commit when update irq" produces
> a crash on pseries guest running with VFIO on POWER8 machine as it does
> not support KVM_CAP_IRQCHIP (KVM_CAP_IRQ_XICS is there instead). At the
> result, KVMState::irq_routes is NULL when VFIO calls
> kvm_irqchip_commit_routes.
>
> This makes the routing update conditional.
>
> Reported-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> Signed-off-by: Peter Xu <peterx@redhat.com>
Applied to ppc-for-2.7, thanks.
> ---
> kvm-all.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/kvm-all.c b/kvm-all.c
> index ef81ca5..65608de 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -1047,6 +1047,14 @@ void kvm_irqchip_commit_routes(KVMState *s)
> {
> int ret;
>
> + if (kvm_gsi_direct_mapping()) {
> + return;
> + }
> +
> + if (!kvm_gsi_routing_enabled()) {
> + return;
> + }
> +
> s->irq_routes->flags = 0;
> trace_kvm_irqchip_commit_routes();
> ret = kvm_vm_ioctl(s, KVM_SET_GSI_ROUTING, s->irq_routes);
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2016-08-03 3:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-03 3:07 [Qemu-devel] [PATCH v2] kvm-irqchip: only commit route when irqchip is used Peter Xu
2016-08-03 3:37 ` David Gibson [this message]
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=20160803033746.GI27583@voom.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=aik@ozlabs.ru \
--cc=alex.williamson@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=thuth@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).