All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH qemu] kvm-irqchip: Only do explicit IRQ routing commit when IRQCHIP is in use
@ 2016-07-27  7:51 Alexey Kardashevskiy
  2016-07-27  8:53 ` Peter Xu
  0 siblings, 1 reply; 8+ messages in thread
From: Alexey Kardashevskiy @ 2016-07-27  7:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alexey Kardashevskiy, qemu-ppc, David Gibson, Paolo Bonzini,
	Peter Xu, alex.williamson, mst, Thomas Huth

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.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---

Or I am too late and there is the fix? Could not find any.

This is the backtrace:

Thread 4 "qemu-system-ppc" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x3fffb663ec90 (LWP 11852)]
0x0000000010091fa4 in kvm_irqchip_commit_routes (s=0x10eff3b0) at /home/aik/p/qemu-ddw/kvm-all.c:1050
1050        s->irq_routes->flags = 0;
(gdb) p s
$2 = (KVMState *) 0x10eff3b0
(gdb) p s->irq_routes
$3 = (struct kvm_irq_routing *) 0x0
(gdb) bt
#0  0x0000000010091fa4 in kvm_irqchip_commit_routes (s=0x10eff3b0) at /home/aik/p/qemu-ddw/kvm-all.c:1050
#1  0x000000001010fcd4 in vfio_update_kvm_msi_virq (vector=0x3fffa8006a10, msg=..., pdev=0x1101f300) at /h
ome/aik/p/qemu-ddw/hw/vfio/pci.c:461
#2  0x000000001010fe58 in vfio_msix_vector_do_use (pdev=0x1101f300, nr=0x0, msg=0x3fffb663dd00, handler=0x
1010f5e8 <vfio_msi_interrupt>) at /home/aik/p/qemu-ddw/hw/vfio/pci.c:496
#3  0x000000001011010c in vfio_msix_vector_use (pdev=0x1101f300, nr=0x0, msg=...) at /home/aik/p/qemu-ddw/
hw/vfio/pci.c:557
#4  0x00000000103f64c4 in msix_fire_vector_notifier (dev=0x1101f300, vector=0x0, is_masked=0x0) at /home/a
ik/p/qemu-ddw/hw/pci/msix.c:111
#5  0x00000000103f6594 in msix_handle_mask_update (dev=0x1101f300, vector=0x0, was_masked=0x1) at /home/ai
k/p/qemu-ddw/hw/pci/msix.c:124
#6  0x00000000103f6928 in msix_table_mmio_write (opaque=0x1101f300, addr=0xc, val=0x0, size=0x4) at /home/
aik/p/qemu-ddw/hw/pci/msix.c:186
#7  0x0000000010099738 in memory_region_write_accessor (mr=0x1101f838, addr=0xc, value=0x3fffb663df50, siz
e=0x4, shift=0x0, mask=0xffffffff, attrs=...) at /home/aik/p/qemu-ddw/memory.c:525
#8  0x0000000010099a94 in access_with_adjusted_size (addr=0xc, value=0x3fffb663df50, size=0x4, access_size
_min=0x1, access_size_max=0x4, access=0x100995f8 <memory_region_write_accessor>, mr=0x1101f838, attrs=...)
 at /home/aik/p/qemu-ddw/memory.c:591
#9  0x000000001009cb0c in memory_region_dispatch_write (mr=0x1101f838, addr=0xc, data=0x0, size=0x4, attrs
=...) at /home/aik/p/qemu-ddw/memory.c:1262
#10 0x0000000010015300 in address_space_write_continue (as=0x109b3958 <address_space_memory>, addr=0x10120
00200c, attrs=..., buf=0x3fffb5e20028 "", len=0x4, addr1=0xc, l=0x4, mr=0x1101f838) at /home/aik/p/qemu-dd
w/exec.c:2580
#11 0x0000000010015558 in address_space_write (as=0x109b3958 <address_space_memory>, addr=0x1012000200c, a
ttrs=..., buf=0x3fffb5e20028 "", len=0x4) at /home/aik/p/qemu-ddw/exec.c:2637
#12 0x00000000100159e4 in address_space_rw (as=0x109b3958 <address_space_memory>, addr=0x1012000200c, attr
s=..., buf=0x3fffb5e20028 "", len=0x4, is_write=0x1) at /home/aik/p/qemu-ddw/exec.c:2739
#13 0x0000000010094cb8 in kvm_cpu_exec (cpu=0x3fffb6e76db0) at /home/aik/p/qemu-ddw/kvm-all.c:1952
#14 0x0000000010072764 in qemu_kvm_cpu_thread_fn (arg=0x3fffb6e76db0) at /home/aik/p/qemu-ddw/cpus.c:1078
#15 0x00003fffb7a184a0 in start_thread (arg=0x3fffb663ec90) at pthread_create.c:335
#16 0x00003fffb7957e74 in clone () at ../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:96
(gdb)
---
 kvm-all.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kvm-all.c b/kvm-all.c
index 3764ba9..028fdcb 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1047,6 +1047,10 @@ void kvm_irqchip_commit_routes(KVMState *s)
 {
     int ret;
 
+    if (!s->irq_routes) {
+        return;
+    }
+
     s->irq_routes->flags = 0;
     ret = kvm_vm_ioctl(s, KVM_SET_GSI_ROUTING, s->irq_routes);
     assert(ret == 0);
-- 
2.5.0.rc3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH qemu] kvm-irqchip: Only do explicit IRQ routing commit when IRQCHIP is in use
  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
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Xu @ 2016-07-27  8:53 UTC (permalink / raw)
  To: Alexey Kardashevskiy
  Cc: qemu-devel, qemu-ppc, David Gibson, Paolo Bonzini,
	alex.williamson, mst, Thomas Huth

On Wed, Jul 27, 2016 at 05:51:46PM +1000, Alexey Kardashevskiy wrote:
> 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.
> 
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
> 
> Or I am too late and there is the fix? Could not find any.
> 
> This is the backtrace:
> 
> Thread 4 "qemu-system-ppc" received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x3fffb663ec90 (LWP 11852)]
> 0x0000000010091fa4 in kvm_irqchip_commit_routes (s=0x10eff3b0) at /home/aik/p/qemu-ddw/kvm-all.c:1050
> 1050        s->irq_routes->flags = 0;
> (gdb) p s
> $2 = (KVMState *) 0x10eff3b0
> (gdb) p s->irq_routes
> $3 = (struct kvm_irq_routing *) 0x0
> (gdb) bt
> #0  0x0000000010091fa4 in kvm_irqchip_commit_routes (s=0x10eff3b0) at /home/aik/p/qemu-ddw/kvm-all.c:1050
> #1  0x000000001010fcd4 in vfio_update_kvm_msi_virq (vector=0x3fffa8006a10, msg=..., pdev=0x1101f300) at /h
> ome/aik/p/qemu-ddw/hw/vfio/pci.c:461
> #2  0x000000001010fe58 in vfio_msix_vector_do_use (pdev=0x1101f300, nr=0x0, msg=0x3fffb663dd00, handler=0x
> 1010f5e8 <vfio_msi_interrupt>) at /home/aik/p/qemu-ddw/hw/vfio/pci.c:496
> #3  0x000000001011010c in vfio_msix_vector_use (pdev=0x1101f300, nr=0x0, msg=...) at /home/aik/p/qemu-ddw/
> hw/vfio/pci.c:557
> #4  0x00000000103f64c4 in msix_fire_vector_notifier (dev=0x1101f300, vector=0x0, is_masked=0x0) at /home/a
> ik/p/qemu-ddw/hw/pci/msix.c:111
> #5  0x00000000103f6594 in msix_handle_mask_update (dev=0x1101f300, vector=0x0, was_masked=0x1) at /home/ai
> k/p/qemu-ddw/hw/pci/msix.c:124
> #6  0x00000000103f6928 in msix_table_mmio_write (opaque=0x1101f300, addr=0xc, val=0x0, size=0x4) at /home/
> aik/p/qemu-ddw/hw/pci/msix.c:186
> #7  0x0000000010099738 in memory_region_write_accessor (mr=0x1101f838, addr=0xc, value=0x3fffb663df50, siz
> e=0x4, shift=0x0, mask=0xffffffff, attrs=...) at /home/aik/p/qemu-ddw/memory.c:525
> #8  0x0000000010099a94 in access_with_adjusted_size (addr=0xc, value=0x3fffb663df50, size=0x4, access_size
> _min=0x1, access_size_max=0x4, access=0x100995f8 <memory_region_write_accessor>, mr=0x1101f838, attrs=...)
>  at /home/aik/p/qemu-ddw/memory.c:591
> #9  0x000000001009cb0c in memory_region_dispatch_write (mr=0x1101f838, addr=0xc, data=0x0, size=0x4, attrs
> =...) at /home/aik/p/qemu-ddw/memory.c:1262
> #10 0x0000000010015300 in address_space_write_continue (as=0x109b3958 <address_space_memory>, addr=0x10120
> 00200c, attrs=..., buf=0x3fffb5e20028 "", len=0x4, addr1=0xc, l=0x4, mr=0x1101f838) at /home/aik/p/qemu-dd
> w/exec.c:2580
> #11 0x0000000010015558 in address_space_write (as=0x109b3958 <address_space_memory>, addr=0x1012000200c, a
> ttrs=..., buf=0x3fffb5e20028 "", len=0x4) at /home/aik/p/qemu-ddw/exec.c:2637
> #12 0x00000000100159e4 in address_space_rw (as=0x109b3958 <address_space_memory>, addr=0x1012000200c, attr
> s=..., buf=0x3fffb5e20028 "", len=0x4, is_write=0x1) at /home/aik/p/qemu-ddw/exec.c:2739
> #13 0x0000000010094cb8 in kvm_cpu_exec (cpu=0x3fffb6e76db0) at /home/aik/p/qemu-ddw/kvm-all.c:1952
> #14 0x0000000010072764 in qemu_kvm_cpu_thread_fn (arg=0x3fffb6e76db0) at /home/aik/p/qemu-ddw/cpus.c:1078
> #15 0x00003fffb7a184a0 in start_thread (arg=0x3fffb663ec90) at pthread_create.c:335
> #16 0x00003fffb7957e74 in clone () at ../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:96
> (gdb)
> ---
>  kvm-all.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/kvm-all.c b/kvm-all.c
> index 3764ba9..028fdcb 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -1047,6 +1047,10 @@ void kvm_irqchip_commit_routes(KVMState *s)
>  {
>      int ret;
>  
> +    if (!s->irq_routes) {
> +        return;
> +    }
> +
>      s->irq_routes->flags = 0;
>      ret = kvm_vm_ioctl(s, KVM_SET_GSI_ROUTING, s->irq_routes);
>      assert(ret == 0);

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.

Thanks,

-- peterx

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH qemu] kvm-irqchip: Only do explicit IRQ routing commit when IRQCHIP is in use
  2016-07-27  8:53 ` Peter Xu
@ 2016-07-27 13:14   ` Alexey Kardashevskiy
  2016-07-27 13:29     ` Peter Xu
  0 siblings, 1 reply; 8+ messages in thread
From: Alexey Kardashevskiy @ 2016-07-27 13:14 UTC (permalink / raw)
  To: Peter Xu
  Cc: qemu-devel, qemu-ppc, David Gibson, Paolo Bonzini,
	alex.williamson, mst, Thomas Huth

On 27/07/16 18:53, Peter Xu wrote:
> On Wed, Jul 27, 2016 at 05:51:46PM +1000, Alexey Kardashevskiy wrote:
>> 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.
>>
>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>> ---
>>
>> Or I am too late and there is the fix? Could not find any.
>>
>> This is the backtrace:
>>
>> Thread 4 "qemu-system-ppc" received signal SIGSEGV, Segmentation fault.
>> [Switching to Thread 0x3fffb663ec90 (LWP 11852)]
>> 0x0000000010091fa4 in kvm_irqchip_commit_routes (s=0x10eff3b0) at /home/aik/p/qemu-ddw/kvm-all.c:1050
>> 1050        s->irq_routes->flags = 0;
>> (gdb) p s
>> $2 = (KVMState *) 0x10eff3b0
>> (gdb) p s->irq_routes
>> $3 = (struct kvm_irq_routing *) 0x0
>> (gdb) bt
>> #0  0x0000000010091fa4 in kvm_irqchip_commit_routes (s=0x10eff3b0) at /home/aik/p/qemu-ddw/kvm-all.c:1050
>> #1  0x000000001010fcd4 in vfio_update_kvm_msi_virq (vector=0x3fffa8006a10, msg=..., pdev=0x1101f300) at /h
>> ome/aik/p/qemu-ddw/hw/vfio/pci.c:461
>> #2  0x000000001010fe58 in vfio_msix_vector_do_use (pdev=0x1101f300, nr=0x0, msg=0x3fffb663dd00, handler=0x
>> 1010f5e8 <vfio_msi_interrupt>) at /home/aik/p/qemu-ddw/hw/vfio/pci.c:496
>> #3  0x000000001011010c in vfio_msix_vector_use (pdev=0x1101f300, nr=0x0, msg=...) at /home/aik/p/qemu-ddw/
>> hw/vfio/pci.c:557
>> #4  0x00000000103f64c4 in msix_fire_vector_notifier (dev=0x1101f300, vector=0x0, is_masked=0x0) at /home/a
>> ik/p/qemu-ddw/hw/pci/msix.c:111
>> #5  0x00000000103f6594 in msix_handle_mask_update (dev=0x1101f300, vector=0x0, was_masked=0x1) at /home/ai
>> k/p/qemu-ddw/hw/pci/msix.c:124
>> #6  0x00000000103f6928 in msix_table_mmio_write (opaque=0x1101f300, addr=0xc, val=0x0, size=0x4) at /home/
>> aik/p/qemu-ddw/hw/pci/msix.c:186
>> #7  0x0000000010099738 in memory_region_write_accessor (mr=0x1101f838, addr=0xc, value=0x3fffb663df50, siz
>> e=0x4, shift=0x0, mask=0xffffffff, attrs=...) at /home/aik/p/qemu-ddw/memory.c:525
>> #8  0x0000000010099a94 in access_with_adjusted_size (addr=0xc, value=0x3fffb663df50, size=0x4, access_size
>> _min=0x1, access_size_max=0x4, access=0x100995f8 <memory_region_write_accessor>, mr=0x1101f838, attrs=...)
>>  at /home/aik/p/qemu-ddw/memory.c:591
>> #9  0x000000001009cb0c in memory_region_dispatch_write (mr=0x1101f838, addr=0xc, data=0x0, size=0x4, attrs
>> =...) at /home/aik/p/qemu-ddw/memory.c:1262
>> #10 0x0000000010015300 in address_space_write_continue (as=0x109b3958 <address_space_memory>, addr=0x10120
>> 00200c, attrs=..., buf=0x3fffb5e20028 "", len=0x4, addr1=0xc, l=0x4, mr=0x1101f838) at /home/aik/p/qemu-dd
>> w/exec.c:2580
>> #11 0x0000000010015558 in address_space_write (as=0x109b3958 <address_space_memory>, addr=0x1012000200c, a
>> ttrs=..., buf=0x3fffb5e20028 "", len=0x4) at /home/aik/p/qemu-ddw/exec.c:2637
>> #12 0x00000000100159e4 in address_space_rw (as=0x109b3958 <address_space_memory>, addr=0x1012000200c, attr
>> s=..., buf=0x3fffb5e20028 "", len=0x4, is_write=0x1) at /home/aik/p/qemu-ddw/exec.c:2739
>> #13 0x0000000010094cb8 in kvm_cpu_exec (cpu=0x3fffb6e76db0) at /home/aik/p/qemu-ddw/kvm-all.c:1952
>> #14 0x0000000010072764 in qemu_kvm_cpu_thread_fn (arg=0x3fffb6e76db0) at /home/aik/p/qemu-ddw/cpus.c:1078
>> #15 0x00003fffb7a184a0 in start_thread (arg=0x3fffb663ec90) at pthread_create.c:335
>> #16 0x00003fffb7957e74 in clone () at ../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:96
>> (gdb)
>> ---
>>  kvm-all.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/kvm-all.c b/kvm-all.c
>> index 3764ba9..028fdcb 100644
>> --- a/kvm-all.c
>> +++ b/kvm-all.c
>> @@ -1047,6 +1047,10 @@ void kvm_irqchip_commit_routes(KVMState *s)
>>  {
>>      int ret;
>>  
>> +    if (!s->irq_routes) {
>> +        return;
>> +    }
>> +
>>      s->irq_routes->flags = 0;
>>      ret = kvm_vm_ioctl(s, KVM_SET_GSI_ROUTING, s->irq_routes);
>>      assert(ret == 0);
> 
> 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.


-- 
Alexey

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH qemu] kvm-irqchip: Only do explicit IRQ routing commit when IRQCHIP is in use
  2016-07-27 13:14   ` Alexey Kardashevskiy
@ 2016-07-27 13:29     ` Peter Xu
  2016-07-27 13:32       ` Peter Xu
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Xu @ 2016-07-27 13:29 UTC (permalink / raw)
  To: Alexey Kardashevskiy
  Cc: qemu-devel, qemu-ppc, David Gibson, Paolo Bonzini,
	alex.williamson, mst, Thomas Huth

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH qemu] kvm-irqchip: Only do explicit IRQ routing commit when IRQCHIP is in use
  2016-07-27 13:29     ` Peter Xu
@ 2016-07-27 13:32       ` Peter Xu
  2016-07-28  2:20         ` Alexey Kardashevskiy
  2016-08-02 19:48         ` Paolo Bonzini
  0 siblings, 2 replies; 8+ messages in thread
From: Peter Xu @ 2016-07-27 13:32 UTC (permalink / raw)
  To: Alexey Kardashevskiy
  Cc: qemu-devel, qemu-ppc, David Gibson, Paolo Bonzini,
	alex.williamson, mst, Thomas Huth

On Wed, Jul 27, 2016 at 09:29:07PM +0800, Peter Xu wrote:

[...]

> > 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.

Btw, please ignore above message if you still prefer v1 and sure that
it works in all cases. :)

-- peterx

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH qemu] kvm-irqchip: Only do explicit IRQ routing commit when IRQCHIP is in use
  2016-07-27 13:32       ` Peter Xu
@ 2016-07-28  2:20         ` Alexey Kardashevskiy
  2016-08-02 19:48         ` Paolo Bonzini
  1 sibling, 0 replies; 8+ messages in thread
From: Alexey Kardashevskiy @ 2016-07-28  2:20 UTC (permalink / raw)
  To: Peter Xu
  Cc: qemu-devel, qemu-ppc, David Gibson, Paolo Bonzini,
	alex.williamson, mst, Thomas Huth

On 27/07/16 23:32, Peter Xu wrote:
> On Wed, Jul 27, 2016 at 09:29:07PM +0800, Peter Xu wrote:
> 
> [...]
> 
>>> 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.
> 
> Btw, please ignore above message if you still prefer v1 and sure that
> it works in all cases. :)


I am totally fine with either fix (others may have opinions though), if you
really want your fix, please do so (and you can quote me as
"Reported-by"/"Tested-by" if you feel guilt which I do not think you should) :)



-- 
Alexey

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH qemu] kvm-irqchip: Only do explicit IRQ routing commit when IRQCHIP is in use
  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
  1 sibling, 1 reply; 8+ messages in thread
From: Paolo Bonzini @ 2016-08-02 19:48 UTC (permalink / raw)
  To: Peter Xu
  Cc: Alexey Kardashevskiy, qemu-devel, qemu-ppc, David Gibson,
	alex williamson, mst, Thomas Huth

> > > 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.
> 
> Btw, please ignore above message if you still prefer v1 and sure that
> it works in all cases. :)

Peter, please post v2 according to your patch and Alexey's suggestion.
David, can you handle it?

Thanks!

Paolo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH qemu] kvm-irqchip: Only do explicit IRQ routing commit when IRQCHIP is in use
  2016-08-02 19:48         ` Paolo Bonzini
@ 2016-08-03  3:04           ` Peter Xu
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Xu @ 2016-08-03  3:04 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Alexey Kardashevskiy, qemu-devel, qemu-ppc, David Gibson,
	alex williamson, mst, Thomas Huth

On Tue, Aug 02, 2016 at 03:48:23PM -0400, Paolo Bonzini wrote:
> > > > 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.
> > 
> > Btw, please ignore above message if you still prefer v1 and sure that
> > it works in all cases. :)
> 
> Peter, please post v2 according to your patch and Alexey's suggestion.
> David, can you handle it?

Sure, then let me send a v2 later. Will CC David. Thanks!

-- peterx

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-08-03  3:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.