]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: selftests: Verify get/set PERF_CAPABILITIES w/o guest PDMC behavior
authorSean Christopherson <seanjc@google.com>
Fri, 2 Aug 2024 18:55:10 +0000 (11:55 -0700)
committerSean Christopherson <seanjc@google.com>
Fri, 1 Nov 2024 16:22:35 +0000 (09:22 -0700)
commitb799e3e7da2c8b2ae03c977307b2f082fac6140e
tree13172025e06e7983a91939552779260121299012
parent1ded7a57b8050ea92c0ab0253b11a917ae1427ff
KVM: selftests: Verify get/set PERF_CAPABILITIES w/o guest PDMC behavior

Add another testcase to x86's PMU capabilities test to verify that KVM's
handling of userspace accesses to PERF_CAPABILITIES when the vCPU doesn't
support the MSR (per the vCPU's CPUID).  KVM's (newly established) ABI is
that userspace MSR accesses are subject to architectural existence checks,
but that if the MSR is advertised as supported _by KVM_, "bad" reads get
'0' and writes of '0' are always allowed.

Link: https://lore.kernel.org/r/20240802185511.305849-9-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/x86_64/vmx_pmu_caps_test.c