[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZsYwF5QJ8gqto8Mm@google.com>
Date: Wed, 21 Aug 2024 18:21:11 +0000
From: Mingwei Zhang <mizhang@...gle.com>
To: Colton Lewis <coltonlewis@...gle.com>
Cc: kvm@...r.kernel.org, Jinrong Liang <ljr.kernel@...il.com>,
Jim Mattson <jmattson@...gle.com>,
Aaron Lewis <aaronlewis@...gle.com>,
Sean Christopherson <seanjc@...gle.com>,
Paolo Bonzini <pbonzini@...hat.com>, Shuah Khan <shuah@...nel.org>,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/6] KVM: x86: selftests: Fix typos in macro variable use
On Tue, Aug 13, 2024, Colton Lewis wrote:
> Without the leading underscore, these variables are referencing a
> variable in the calling scope. It only worked before by accident
> because all calling scopes had a variable with the right name.
>
> Signed-off-by: Colton Lewis <coltonlewis@...gle.com>
This might need a fixes tag, right?
Fixes: cd34fd8c758e ("KVM: selftests: Test PMC virtualization with forced emulation")
no need to cc stable tree though, since this is very minor.
Reviewed-by: Mingwei Zhang <mizhang@...gle.com>
> ---
> tools/testing/selftests/kvm/x86_64/pmu_counters_test.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tools/testing/selftests/kvm/x86_64/pmu_counters_test.c b/tools/testing/selftests/kvm/x86_64/pmu_counters_test.c
> index 698cb36989db..0e305e43a93b 100644
> --- a/tools/testing/selftests/kvm/x86_64/pmu_counters_test.c
> +++ b/tools/testing/selftests/kvm/x86_64/pmu_counters_test.c
> @@ -174,7 +174,7 @@ do { \
>
> #define GUEST_TEST_EVENT(_idx, _event, _pmc, _pmc_msr, _ctrl_msr, _value, FEP) \
> do { \
> - wrmsr(pmc_msr, 0); \
> + wrmsr(_pmc_msr, 0); \
> \
> if (this_cpu_has(X86_FEATURE_CLFLUSHOPT)) \
> GUEST_MEASURE_EVENT(_ctrl_msr, _value, "clflushopt .", FEP); \
> @@ -331,9 +331,9 @@ __GUEST_ASSERT(expect_gp ? vector == GP_VECTOR : !vector, \
> expect_gp ? "#GP" : "no fault", msr, vector) \
>
> #define GUEST_ASSERT_PMC_VALUE(insn, msr, val, expected) \
> - __GUEST_ASSERT(val == expected_val, \
> + __GUEST_ASSERT(val == expected, \
> "Expected " #insn "(0x%x) to yield 0x%lx, got 0x%lx", \
> - msr, expected_val, val);
> + msr, expected, val);
>
> static void guest_test_rdpmc(uint32_t rdpmc_idx, bool expect_success,
> uint64_t expected_val)
> --
> 2.46.0.76.ge559c4bf1a-goog
>
Powered by blists - more mailing lists