[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH qemu] kvm-irqchip: Only do explicit IRQ routing co
From: |
Peter Xu |
Subject: |
Re: [Qemu-ppc] [PATCH qemu] kvm-irqchip: Only do explicit IRQ routing commit when IRQCHIP is in use |
Date: |
Wed, 27 Jul 2016 21:29:07 +0800 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
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