qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-arm] [PATCH V8 2/2] arm: virt: add PMU property to mach-virt m


From: Andrew Jones
Subject: Re: [Qemu-arm] [PATCH V8 2/2] arm: virt: add PMU property to mach-virt machine type
Date: Wed, 26 Oct 2016 09:02:11 +0200
User-agent: Mutt/1.6.0.1 (2016-04-01)

On Wed, Oct 26, 2016 at 02:28:21AM -0400, Wei Huang wrote:
> CPU vPMU is now turned ON by default, but this feature wasn't introduced
> until virt-2.7 machine type. To solve this problem, this patch adds a
> PMU option in machine state, which is used to control CPU's vPMU status.
> This PMU option is not exposed to command line and is turned off in
> virt-2.6 machine type.
> 
> Reviewed-by: Andrew Jones <address@hidden>
> Signed-off-by: Wei Huang <address@hidden>
> ---
>  hw/arm/virt.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 074d11c..e64dc4a 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -85,6 +85,7 @@ typedef struct {
>      VirtBoardInfo *daughterboard;
>      bool disallow_affinity_adjustment;
>      bool no_its;
> +    bool no_pmu;
>  } VirtMachineClass;
>  
>  typedef struct {
> @@ -1353,6 +1354,10 @@ static void machvirt_init(MachineState *machine)
>              }
>          }
>  
> +        if (vmc->no_pmu && object_property_find(cpuobj, "pmu", NULL)) {
> +            object_property_set_bool(cpuobj, false, "pmu", NULL);
> +        }
> +
>          if (object_property_find(cpuobj, "reset-cbar", NULL)) {
>              object_property_set_int(cpuobj, 
> vbi->memmap[VIRT_CPUPERIPHS].base,
>                                      "reset-cbar", &error_abort);
> @@ -1588,5 +1593,7 @@ static void virt_machine_2_6_options(MachineClass *mc)
>      virt_machine_2_7_options(mc);
>      SET_MACHINE_COMPAT(mc, VIRT_COMPAT_2_6);
>      vmc->disallow_affinity_adjustment = true;
> +    /* Disable PMU for 2.6 as PMU support was first introduced in 2.7 */
> +    vmc->no_pmu = true;
>  }
>  DEFINE_VIRT_MACHINE(2, 6)
> -- 
> 1.8.3.1
> 

Reviewed-by: Andrew Jones <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]