[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fcec0903-69ed-078a-5abd-c9d4198eca4b@intel.com>
Date: Wed, 11 May 2022 08:26:53 +0800
From: "Yang, Weijiang" <weijiang.yang@...el.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: "likexu@...cent.com" <likexu@...cent.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>
Subject: Re: [PATCH] KVM: selftests: x86: Skip unsupported test when Arch LBR
is available
On 5/10/2022 11:06 PM, Paolo Bonzini wrote:
> Hi,
>
>> - ret = _vcpu_set_msr(vm, 0, MSR_IA32_PERF_CAPABILITIES, PMU_CAP_LBR_FMT);
>> - TEST_ASSERT(ret == 0, "Bad PERF_CAPABILITIES didn't fail.");
>> + /* Note, on Arch LBR capable platforms, LBR_FMT in perf capability msr is 0x3f,
>> + * so skip below test if running on these platforms. */
>> + if (host_cap.lbr_format != PMU_CAP_LBR_FMT) {
>> + ret = _vcpu_set_msr(vm, 0, MSR_IA32_PERF_CAPABILITIES, PMU_CAP_LBR_FMT);
>> + TEST_ASSERT(ret == 0, "Bad PERF_CAPABILITIES didn't fail.");
>> + }
> Why not try a different value?
OK, I'll select a "real" invalid format and re-post the patch, thanks!
>
> Paolo
>
>
Powered by blists - more mailing lists