qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] spapr: Report kvm_irqchip_in_kernel() in 'info pic'
@ 2019-09-12 14:30 Greg Kurz
  2019-09-12 14:32 ` Cédric Le Goater
  2019-09-15  9:42 ` David Gibson
  0 siblings, 2 replies; 3+ messages in thread
From: Greg Kurz @ 2019-09-12 14:30 UTC (permalink / raw)
  To: David Gibson; +Cc: qemu-ppc, Cédric Le Goater, qemu-devel

Unless the machine was started with kernel-irqchip=on, we cannot easily
tell if we're actually using an in-kernel or an emulated irqchip. This
information is important enough that it is worth printing it in 'info
pic'.

Signed-off-by: Greg Kurz <groug@kaod.org>
---
 hw/ppc/spapr.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 761f8214c312..348c007ffbd3 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -81,6 +81,8 @@
 #include "hw/mem/memory-device.h"
 #include "hw/ppc/spapr_tpm_proxy.h"
 
+#include "monitor/monitor.h"
+
 #include <libfdt.h>
 
 /* SLOF memory layout:
@@ -4360,6 +4362,8 @@ static void spapr_pic_print_info(InterruptStatsProvider *obj,
     SpaprMachineState *spapr = SPAPR_MACHINE(obj);
 
     spapr->irq->print_info(spapr, mon);
+    monitor_printf(mon, "irqchip: %s\n",
+                   kvm_irqchip_in_kernel() ? "in-kernel" : "emulated");
 }
 
 int spapr_get_vcpu_id(PowerPCCPU *cpu)



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

* Re: [Qemu-devel] [PATCH] spapr: Report kvm_irqchip_in_kernel() in 'info pic'
  2019-09-12 14:30 [Qemu-devel] [PATCH] spapr: Report kvm_irqchip_in_kernel() in 'info pic' Greg Kurz
@ 2019-09-12 14:32 ` Cédric Le Goater
  2019-09-15  9:42 ` David Gibson
  1 sibling, 0 replies; 3+ messages in thread
From: Cédric Le Goater @ 2019-09-12 14:32 UTC (permalink / raw)
  To: Greg Kurz, David Gibson; +Cc: qemu-ppc, qemu-devel

On 12/09/2019 16:30, Greg Kurz wrote:
> Unless the machine was started with kernel-irqchip=on, we cannot easily
> tell if we're actually using an in-kernel or an emulated irqchip. This
> information is important enough that it is worth printing it in 'info
> pic'.

Nice ! 
 
> Signed-off-by: Greg Kurz <groug@kaod.org>

Reviewed-by: Cédric Le Goater <clg@kaod.org>

Thanks,

C.

> ---
>  hw/ppc/spapr.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 761f8214c312..348c007ffbd3 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -81,6 +81,8 @@
>  #include "hw/mem/memory-device.h"
>  #include "hw/ppc/spapr_tpm_proxy.h"
>  
> +#include "monitor/monitor.h"
> +
>  #include <libfdt.h>
>  
>  /* SLOF memory layout:
> @@ -4360,6 +4362,8 @@ static void spapr_pic_print_info(InterruptStatsProvider *obj,
>      SpaprMachineState *spapr = SPAPR_MACHINE(obj);
>  
>      spapr->irq->print_info(spapr, mon);
> +    monitor_printf(mon, "irqchip: %s\n",
> +                   kvm_irqchip_in_kernel() ? "in-kernel" : "emulated");
>  }
>  
>  int spapr_get_vcpu_id(PowerPCCPU *cpu)
> 



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

* Re: [Qemu-devel] [PATCH] spapr: Report kvm_irqchip_in_kernel() in 'info pic'
  2019-09-12 14:30 [Qemu-devel] [PATCH] spapr: Report kvm_irqchip_in_kernel() in 'info pic' Greg Kurz
  2019-09-12 14:32 ` Cédric Le Goater
@ 2019-09-15  9:42 ` David Gibson
  1 sibling, 0 replies; 3+ messages in thread
From: David Gibson @ 2019-09-15  9:42 UTC (permalink / raw)
  To: Greg Kurz; +Cc: qemu-ppc, Cédric Le Goater, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1353 bytes --]

On Thu, Sep 12, 2019 at 04:30:09PM +0200, Greg Kurz wrote:
65;5603;1c> Unless the machine was started with kernel-irqchip=on, we cannot easily
> tell if we're actually using an in-kernel or an emulated irqchip. This
> information is important enough that it is worth printing it in 'info
> pic'.
> 
> Signed-off-by: Greg Kurz <groug@kaod.org>

Applied, thanks.

> ---
>  hw/ppc/spapr.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 761f8214c312..348c007ffbd3 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -81,6 +81,8 @@
>  #include "hw/mem/memory-device.h"
>  #include "hw/ppc/spapr_tpm_proxy.h"
>  
> +#include "monitor/monitor.h"
> +
>  #include <libfdt.h>
>  
>  /* SLOF memory layout:
> @@ -4360,6 +4362,8 @@ static void spapr_pic_print_info(InterruptStatsProvider *obj,
>      SpaprMachineState *spapr = SPAPR_MACHINE(obj);
>  
>      spapr->irq->print_info(spapr, mon);
> +    monitor_printf(mon, "irqchip: %s\n",
> +                   kvm_irqchip_in_kernel() ? "in-kernel" : "emulated");
>  }
>  
>  int spapr_get_vcpu_id(PowerPCCPU *cpu)
> 

-- 
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: 833 bytes --]

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

end of thread, other threads:[~2019-09-15 23:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-12 14:30 [Qemu-devel] [PATCH] spapr: Report kvm_irqchip_in_kernel() in 'info pic' Greg Kurz
2019-09-12 14:32 ` Cédric Le Goater
2019-09-15  9:42 ` David Gibson

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