Re: [PATCH v4 8/9] KVM: selftests: Test Intel supported fixed counters bit mask

From: Sean Christopherson
Date: Thu Oct 19 2023 - 20:18:58 EST


On Mon, Sep 11, 2023, Jinrong Liang wrote:
> +static void test_fixed_counters(void)
> +{
> + uint8_t nr_fixed_counters = kvm_cpu_property(X86_PROPERTY_PMU_NR_FIXED_COUNTERS);
> + uint32_t ecx;
> + uint8_t edx;
> +
> + for (edx = 0; edx <= nr_fixed_counters; edx++)
> + /* KVM doesn't emulate more fixed counters than it can support. */
> + for (ecx = 0; ecx <= (BIT_ULL(nr_fixed_counters) - 1); ecx++)
> + __test_fixed_counters(ecx, edx);

Outer for-loop needs curly braces.