qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
	David Gibson <david@gibson.dropbear.id.au>,
	Paolo Bonzini <pbonzini@redhat.com>,
	alex.williamson@redhat.com, mst@redhat.com,
	Thomas Huth <thuth@redhat.com>
Subject: Re: [Qemu-devel] [PATCH qemu] kvm-irqchip: Only do explicit IRQ routing commit when IRQCHIP is in use
Date: Wed, 27 Jul 2016 21:29:07 +0800	[thread overview]
Message-ID: <20160727132907.GD18777@pxdev.xzpeter.org> (raw)
In-Reply-To: <2f1d30a2-fe94-1197-381e-f4e3edb7bb1f@ozlabs.ru>

On Wed, Jul 27, 2016 at 11:14:07PM +1000, Alexey Kardashevskiy wrote:
> On 27/07/16 18:53, Peter Xu wrote:

[...]

> > Sorry for the trouble. How about this one:
> > 
> > diff --git a/kvm-all.c b/kvm-all.c
> > index ef81ca5..4b3e330 100644
> > --- a/kvm-all.c
> > +++ b/kvm-all.c
> > @@ -1047,6 +1047,10 @@ void kvm_irqchip_commit_routes(KVMState *s)
> >  {
> >      int ret;
> > 
> > +    if (kvm_gsi_direct_mapping()) {
> > +        return 0;
> > +    }
> > +
> >      s->irq_routes->flags = 0;
> >      trace_kvm_irqchip_commit_routes();
> >      ret = kvm_vm_ioctl(s, KVM_SET_GSI_ROUTING, s->irq_routes);
> > 
> > I don't know whether irq_routes will be NULL for all GSI direct
> > mapping case... at least this can have kvm_irqchip_*() APIs got
> > aligned.
> 
> 
> This works too.
> 
> You may also want to copy if(!kvm_gsi_routing_enabled()) from
> kvm_irqchip_add_msi_route() to align API (not needed in my case though). Or
> just check the result of these checks by if(!s->irq_routes) :)
> Thanks.

Right. Do you like to post a v2 for this one? (since of course honor
is yours and fault is mine :) Please let me know if you want me to do
this for you. It'll be nice we have this fix asap so that less people
suffers.

Thanks!

-- peterx

  reply	other threads:[~2016-07-27 13:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-27  7:51 [Qemu-devel] [PATCH qemu] kvm-irqchip: Only do explicit IRQ routing commit when IRQCHIP is in use Alexey Kardashevskiy
2016-07-27  8:53 ` Peter Xu
2016-07-27 13:14   ` Alexey Kardashevskiy
2016-07-27 13:29     ` Peter Xu [this message]
2016-07-27 13:32       ` Peter Xu
2016-07-28  2:20         ` Alexey Kardashevskiy
2016-08-02 19:48         ` Paolo Bonzini
2016-08-03  3:04           ` Peter Xu

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=20160727132907.GD18777@pxdev.xzpeter.org \
    --to=peterx@redhat.com \
    --cc=aik@ozlabs.ru \
    --cc=alex.williamson@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=mst@redhat.com \
    --cc=pbonzini@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).