Re: [kvm-unit-tests PATCH 7/8] x86/pmu: Skip the tests on PMU version 1

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

 



Hi Nadav,

Nadav Amit <nadav.amit@xxxxxxxxx> 于2021年6月10日周四 上午2:33写道:
>
> From: Nadav Amit <nadav.amit@xxxxxxxxx>
>
> x86's PMU tests are not compatible with version 1. Instead of finding
> how to adapt them, just skip them if the PMU version is too old.

Instead of skipping pmu.v1, it would be better to just skip the tests
of fixed counters.
But considering this version is really too old, this change looks fine to me.

>
> Signed-off-by: Nadav Amit <nadav.amit@xxxxxxxxx>
> ---
>  x86/pmu.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/x86/pmu.c b/x86/pmu.c
> index 5a3d55b..ec61ac9 100644
> --- a/x86/pmu.c
> +++ b/x86/pmu.c
> @@ -544,6 +544,12 @@ int main(int ac, char **av)
>                 printf("No pmu is detected!\n");
>                 return report_summary();
>         }
> +
> +       if (eax.split.version_id == 1) {
> +               printf("PMU version 1 is not supported\n");
> +               return report_summary();
> +       }
> +
>         printf("PMU version:         %d\n", eax.split.version_id);
>         printf("GP counters:         %d\n", eax.split.num_counters);
>         printf("GP counter width:    %d\n", eax.split.bit_width);
> --
> 2.25.1
>




[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