]> www.infradead.org Git - users/dwmw2/linux.git/commit
DO NOT MERGE: Hack-a-test to verify gpc invalidation+refresh pfncache-2
authorSean Christopherson <seanjc@google.com>
Tue, 20 Aug 2024 11:46:25 +0000 (12:46 +0100)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Tue, 20 Aug 2024 19:59:24 +0000 (20:59 +0100)
commit2654dd28ec4a31e513c6b46e3d1dd680bb7cde40
tree00428fd9fb4962cbc25dd911c3ed1953012312a2
parentba5c20a60eaf2ea2fc6f6fbf6d72e67b8bc2eef3
DO NOT MERGE: Hack-a-test to verify gpc invalidation+refresh

Add a VM-wide gfn=>pfn cache and a fake MSR to let userspace control the
cache.  On writes, reflect the value of the MSR into the backing page of
a gfn=>pfn cache so that userspace can detect if a value was written to
the wrong page, i.e. to a stale mapping.

Spin up 16 vCPUs (arbitrary) to use/refresh the cache, and another thread
to trigger mmu_notifier events and memslot updates.

Co-authored-by: David Woodhouse <dwmw@amazon.co.uk>
Not-signed-off-by: Sean Christopherson <seanjc@google.com>
Not-signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
arch/x86/kvm/x86.c
include/linux/kvm_host.h
tools/testing/selftests/kvm/Makefile
tools/testing/selftests/kvm/gpc_test.c [new file with mode: 0644]