Re: [PATCH 2/3] target/arm: Always add pmu property

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

 



On Mon, 1 Jul 2024 at 13:17, Akihiko Odaki <akihiko.odaki@xxxxxxxxxx> wrote:
>
> On 2024/07/01 20:54, Peter Maydell wrote:
> > On Sat, 29 Jun 2024 at 13:51, Akihiko Odaki <akihiko.odaki@xxxxxxxxxx> wrote:
> >>
> >> kvm-steal-time and sve properties are added for KVM even if the
> >> corresponding features are not available. Always add pmu property too.
> >>
> >> Signed-off-by: Akihiko Odaki <akihiko.odaki@xxxxxxxxxx>
> >> ---
> >>   target/arm/cpu.c | 3 ++-
> >>   1 file changed, 2 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/target/arm/cpu.c b/target/arm/cpu.c
> >> index 35fa281f1b98..0da72c12a5bd 100644
> >> --- a/target/arm/cpu.c
> >> +++ b/target/arm/cpu.c
> >> @@ -1770,9 +1770,10 @@ void arm_cpu_post_init(Object *obj)
> >>
> >>       if (arm_feature(&cpu->env, ARM_FEATURE_PMU)) {
> >>           cpu->has_pmu = true;
> >> -        object_property_add_bool(obj, "pmu", arm_get_pmu, arm_set_pmu);
> >>       }
> >>
> >> +    object_property_add_bool(obj, "pmu", arm_get_pmu, arm_set_pmu);
> >
> > This will allow the user to set the ARM_FEATURE_PMU feature
> > bit on TCG CPUs where that doesn't make sense. If we want to
> > make the property visible on all CPUs, we need to make it
> > be an error to set it when it's not valid to set it (probably
> > by adding some TCG/hvf equivalent to the "raise an error
> > in arm_set_pmu()" code branch we already have for KVM).
>
> Doesn't TCG support PMU though?

Not for every CPU. If the CPU is, say, an ARM1176, then it's
too old to have the PMUv3 that our TCG code emulates. And
that kind of PMU doesn't exist on the M-profile CPUs either.

thanks
-- PMM




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux