linux-stable/tools/testing/selftests/kvm
Aaron Lewis c41ef29cc1 selftests: kvm/x86: Verify the pmu event filter matches the correct event
Add a test to demonstrate that when the guest programs an event select
it is matched correctly in the pmu event filter and not inadvertently
filtered.  This could happen on AMD if the high nybble[1] in the event
select gets truncated away only leaving the bottom byte[2] left for
matching.

This is a contrived example used for the convenience of demonstrating
this issue, however, this can be applied to event selects 0x28A (OC
Mode Switch) and 0x08A (L1 BTB Correction), where 0x08A could end up
being denied when the event select was only set up to deny 0x28A.

[1] bits 35:32 in the event select register and bits 11:8 in the event
    select.
[2] bits 7:0 in the event select register and bits 7:0 in the event
    select.

Signed-off-by: Aaron Lewis <aaronlewis@google.com>
Message-Id: <20220517051238.2566934-3-aaronlewis@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-05-20 07:06:55 -04:00
..
aarch64 selftests: KVM: Free the GIC FD when cleaning up in arch_timer 2022-04-07 08:46:13 +01:00
include kvm: selftests: introduce and use more page size-related constants 2022-04-21 15:41:01 -04:00
lib kvm: selftests: introduce and use more page size-related constants 2022-04-21 15:41:01 -04:00
s390x KVM: s390: selftests: Add error memop tests 2022-03-14 16:12:27 +01:00
x86_64 selftests: kvm/x86: Verify the pmu event filter matches the correct event 2022-05-20 07:06:55 -04:00
.gitignore selftests: kvm: add tsc_scaling_sync to .gitignore 2022-04-11 13:28:56 -04:00
access_tracking_perf_test.c KVM: selftests: Move vCPU thread creation and joining to common helpers 2021-11-16 07:43:28 -05:00
config selftests: kvm: Adding config fragments 2019-08-09 16:52:38 +02:00
demand_paging_test.c KVM: selftests: Move vCPU thread creation and joining to common helpers 2021-11-16 07:43:28 -05:00
dirty_log_perf_test.c selftests: KVM: Don't leak GIC FD across dirty log test iterations 2022-04-07 08:46:13 +01:00
dirty_log_test.c KVM: selftests: Expose align() helpers to tests 2021-11-16 07:43:24 -05:00
hardware_disable_test.c KVM: selftests: Unconditionally use memslot 0 when loading elf binary 2021-06-24 04:31:17 -04:00
kvm_binary_stats_test.c KVM: selftests: Add checks for histogram stats bucket_size field 2021-08-20 16:06:32 -04:00
kvm_create_max_vcpus.c KVM: selftests: Make sure kvm_create_max_vcpus test won't hit RLIMIT_NOFILE 2021-11-26 08:14:20 -05:00
kvm_page_table_test.c KVM: selftests: Silence compiler warning in the kvm_page_table_test 2022-04-21 13:16:14 -04:00
Makefile KVM: arm64: selftests: Introduce vcpu_width_config 2022-04-06 12:29:45 +01:00
max_guest_memory_test.c KVM: selftests: Add test to populate a VM with the max possible guest mem 2022-03-08 10:59:11 -05:00
memslot_modification_stress_test.c KVM: selftests: Use perf_test_destroy_vm in memslot_modification_stress_test 2021-11-16 07:43:28 -05:00
memslot_perf_test.c KVM: selftests: Make memslot_perf_test arch independent 2021-10-21 11:36:34 +01:00
rseq_test.c KVM: selftests: Ensure all migrations are performed when test is affined 2021-09-30 04:25:57 -04:00
set_memory_region_test.c KVM: selftests: Move raw KVM_SET_USER_MEMORY_REGION helper to utils 2022-03-08 10:59:10 -05:00
settings selftests: kvm: Raise the default timeout to 120 seconds 2021-02-09 08:17:08 -05:00
steal_time.c x86: 2021-09-27 13:58:23 -07:00
system_counter_offset_test.c selftests: KVM: Introduce system counter offset test 2021-10-18 14:43:46 -04:00