lkml.org 
[lkml]   [2023]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH v4 8/9] KVM: selftests: Test Intel supported fixed counters bit mask
    From
    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.

    \
     
     \ /
      Last update: 2023-10-20 02:20    [W:6.403 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site