]> www.infradead.org Git - users/dwmw2/linux.git/commit
DO NOT MERGE: Hack-a-test to verify gpc invalidation+refresh pfncache-3
authorSean Christopherson <seanjc@google.com>
Tue, 20 Aug 2024 11:46:25 +0000 (12:46 +0100)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 21 Aug 2024 20:20:28 +0000 (21:20 +0100)
commit62197424e65621346b86ecb59fbabb056ddf7410
tree3f91141728fd0f93f79f7d3e42af457931554379
parentb03f63695df098f961af0310f7da4622b1c098cd
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]