linux/tools/testing/selftests/kvm/lib
Peter Gonda be1bd4c539 KVM: selftests: Allow tagging protected memory in guest page tables
Add support for tagging and untagging guest physical address, e.g. to
allow x86's SEV and TDX guests to embed shared vs. private information in
the GPA.  SEV (encryption, a.k.a. C-bit) and TDX (shared, a.k.a. S-bit)
steal bits from the guest's physical address space that is consumed by the
CPU metadata, i.e. effectively aliases the "real" GPA.

Implement generic "tagging" so that the shared vs. private metadata can be
managed by x86 without bleeding too many details into common code.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Vishal Annapurve <vannapurve@google.com>
Cc: Ackerly Tng <ackerleytng@google.com>
cc: Andrew Jones <andrew.jones@linux.dev>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Michael Roth <michael.roth@amd.com>
Tested-by: Carlos Bilbao <carlos.bilbao@amd.com>
Originally-by: Michael Roth <michael.roth@amd.com>
Signed-off-by: Peter Gonda <pgonda@google.com>
Link: https://lore.kernel.org/r/20240223004258.3104051-8-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-02-28 16:39:49 -08:00
..
aarch64 KVM: selftests: Move setting a vCPU's entry point to a dedicated API 2024-02-28 20:58:05 +00:00
riscv KVM: selftests: Move setting a vCPU's entry point to a dedicated API 2024-02-28 20:58:05 +00:00
s390x KVM: selftests: Move setting a vCPU's entry point to a dedicated API 2024-02-28 20:58:05 +00:00
x86_64 KVM: selftests: Allow tagging protected memory in guest page tables 2024-02-28 16:39:49 -08:00
assert.c KVM: selftests: Gracefully handle empty stack traces 2022-09-30 06:38:00 -04:00
elf.c KVM: selftests: kvm_vm_elf_load() and elfhdr_get() should close fd 2023-01-24 10:06:30 -08:00
guest_modes.c KVM: selftests: arm64: Support P52V48 4K and 16K guest_modes 2023-11-27 15:03:50 +00:00
guest_sprintf.c KVM: selftests: Treat %llx like %lx when formatting guest printf 2023-10-04 12:53:04 -07:00
io.c selftests: kvm: Uses TEST_FAIL in tests/utilities 2020-03-16 17:59:11 +01:00
kvm_util.c KVM: selftests: Allow tagging protected memory in guest page tables 2024-02-28 16:39:49 -08:00
memstress.c KVM: selftests: Introduce VM "shape" to allow tests to specify the VM type 2023-11-14 08:01:07 -05:00
rbtree.c KVM: selftests: Keep track of memslots more efficiently 2021-05-27 07:45:54 -04:00
sparsebit.c KVM: selftests: Make sparsebit structs const where appropriate 2024-02-28 20:58:12 +00:00
string_override.c KVM: selftests: Add strnlen() to the string overrides 2023-08-02 14:41:59 -07:00
test_util.c KVM: selftests: Assert that vasprintf() is successful 2023-09-20 12:26:31 -04:00
ucall_common.c KVM: selftests: Explicitly ucall pool from shared memory 2024-02-28 20:58:13 +00:00
userfaultfd_util.c KVM: selftests: Allow dumping per-vcpu info for uffd threads 2023-05-31 14:05:15 -07:00