[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZTHHapdOC0jF23DF@google.com>
Date: Thu, 19 Oct 2023 17:18:50 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: Jinrong Liang <ljr.kernel@...il.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>, Like Xu <likexu@...cent.com>,
David Matlack <dmatlack@...gle.com>,
Aaron Lewis <aaronlewis@...gle.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jinrong Liang <cloudliang@...cent.com>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 8/9] KVM: selftests: Test Intel supported fixed
counters bit mask
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.
Powered by blists - more mailing lists