Re: [Qemu-devel] [PATCH] hmp: fix qemu crash due to ioapic state dump w/ split irqchip

2016-09-26 Thread Paolo Bonzini


On 23/09/2016 05:47, Wanpeng Li wrote:
> From: Wanpeng Li 
> 
> The qemu will crash when info ioapic through hmp if irqchip 
> is split. Below message is splat:
> 
> KVM_GET_IRQCHIP failed: Unknown error -6
> 
> This patch fix it by dumping the ioapic state from the qemu 
> emulated ioapic if irqchip is split.
> 
> Cc: Paolo Bonzini 
> Cc: Richard Henderson 
> Cc: Eduardo Habkost 
> Signed-off-by: Wanpeng Li 
> ---
>  target-i386/monitor.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/target-i386/monitor.c b/target-i386/monitor.c
> index fccfe40..bf1e983 100644
> --- a/target-i386/monitor.c
> +++ b/target-i386/monitor.c
> @@ -504,7 +504,8 @@ void hmp_info_local_apic(Monitor *mon, const QDict *qdict)
>  
>  void hmp_info_io_apic(Monitor *mon, const QDict *qdict)
>  {
> -if (kvm_irqchip_in_kernel()) {
> +if (kvm_irqchip_in_kernel() &&
> +!kvm_irqchip_is_split()) {
>  kvm_ioapic_dump_state(mon, qdict);
>  } else {
>  ioapic_dump_state(mon, qdict);
> 

Queued, thanks.



Re: [Qemu-devel] [PATCH] hmp: fix qemu crash due to ioapic state dump w/ split irqchip

2016-09-23 Thread Peter Xu
On Fri, Sep 23, 2016 at 11:47:36AM +0800, Wanpeng Li wrote:
> From: Wanpeng Li 
> 
> The qemu will crash when info ioapic through hmp if irqchip 
> is split. Below message is splat:
> 
> KVM_GET_IRQCHIP failed: Unknown error -6
> 
> This patch fix it by dumping the ioapic state from the qemu 
> emulated ioapic if irqchip is split.
> 
> Cc: Paolo Bonzini 
> Cc: Richard Henderson 
> Cc: Eduardo Habkost 
> Signed-off-by: Wanpeng Li 

Reviewed-by: Peter Xu 



[Qemu-devel] [PATCH] hmp: fix qemu crash due to ioapic state dump w/ split irqchip

2016-09-22 Thread Wanpeng Li
From: Wanpeng Li 

The qemu will crash when info ioapic through hmp if irqchip 
is split. Below message is splat:

KVM_GET_IRQCHIP failed: Unknown error -6

This patch fix it by dumping the ioapic state from the qemu 
emulated ioapic if irqchip is split.

Cc: Paolo Bonzini 
Cc: Richard Henderson 
Cc: Eduardo Habkost 
Signed-off-by: Wanpeng Li 
---
 target-i386/monitor.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target-i386/monitor.c b/target-i386/monitor.c
index fccfe40..bf1e983 100644
--- a/target-i386/monitor.c
+++ b/target-i386/monitor.c
@@ -504,7 +504,8 @@ void hmp_info_local_apic(Monitor *mon, const QDict *qdict)
 
 void hmp_info_io_apic(Monitor *mon, const QDict *qdict)
 {
-if (kvm_irqchip_in_kernel()) {
+if (kvm_irqchip_in_kernel() &&
+!kvm_irqchip_is_split()) {
 kvm_ioapic_dump_state(mon, qdict);
 } else {
 ioapic_dump_state(mon, qdict);
-- 
1.9.1