Skip to content

Commit 6971394

Browse files
committed
KVM: selftests: Drop now-redundant checks on PERF_CAPABILITIES writes
Now that vcpu_set_msr() verifies the expected "read what was wrote" semantics of all durable MSRs, including PERF_CAPABILITIES, drop the now-redundant manual checks in the VMX PMU caps test. Link: https://lore.kernel.org/r/20230311004618.920745-14-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent f138258 commit 6971394

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

tools/testing/selftests/kvm/x86_64/vmx_pmu_caps_test.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@ static void test_basic_perf_capabilities(union perf_capabilities host_cap)
5151
struct kvm_vm *vm = vm_create_with_one_vcpu(&vcpu, NULL);
5252

5353
vcpu_set_msr(vcpu, MSR_IA32_PERF_CAPABILITIES, 0);
54-
ASSERT_EQ(vcpu_get_msr(vcpu, MSR_IA32_PERF_CAPABILITIES), 0);
55-
5654
vcpu_set_msr(vcpu, MSR_IA32_PERF_CAPABILITIES, host_cap.capabilities);
57-
ASSERT_EQ(vcpu_get_msr(vcpu, MSR_IA32_PERF_CAPABILITIES), host_cap.capabilities);
5855

5956
kvm_vm_free(vm);
6057
}
@@ -67,9 +64,6 @@ static void test_fungible_perf_capabilities(union perf_capabilities host_cap)
6764
/* testcase 1, set capabilities when we have PDCM bit */
6865
vcpu_set_msr(vcpu, MSR_IA32_PERF_CAPABILITIES, PMU_CAP_FW_WRITES);
6966

70-
/* check capabilities can be retrieved with KVM_GET_MSR */
71-
ASSERT_EQ(vcpu_get_msr(vcpu, MSR_IA32_PERF_CAPABILITIES), PMU_CAP_FW_WRITES);
72-
7367
/* check whatever we write with KVM_SET_MSR is _not_ modified */
7468
vcpu_run(vcpu);
7569
ASSERT_EQ(vcpu_get_msr(vcpu, MSR_IA32_PERF_CAPABILITIES), PMU_CAP_FW_WRITES);

0 commit comments

Comments
 (0)