diff options
author | Sean Christopherson <seanjc@google.com> | 2023-10-27 21:22:11 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2023-11-14 16:01:07 +0300 |
commit | 672eaa351015d8165c41fff644ee7d2b369cea12 (patch) | |
tree | 82eee321227c2957d9a33c86b5e1dd6b5d25f6e9 /tools/testing/selftests/kvm/aarch64 | |
parent | 01244fce2fa22176e46609c051f6fe15cf81e188 (diff) | |
download | linux-672eaa351015d8165c41fff644ee7d2b369cea12.tar.xz |
KVM: selftests: Introduce VM "shape" to allow tests to specify the VM type
Add a "vm_shape" structure to encapsulate the selftests-defined "mode",
along with the KVM-defined "type" for use when creating a new VM. "mode"
tracks physical and virtual address properties, as well as the preferred
backing memory type, while "type" corresponds to the VM type.
Taking the VM type will allow adding tests for KVM_CREATE_GUEST_MEMFD
without needing an entirely separate set of helpers. At this time,
guest_memfd is effectively usable only by confidential VM types in the
form of guest private memory, and it's expected that x86 will double down
and require unique VM types for TDX and SNP guests.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20231027182217.3615211-30-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/aarch64')
-rw-r--r-- | tools/testing/selftests/kvm/aarch64/page_fault_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/kvm/aarch64/page_fault_test.c b/tools/testing/selftests/kvm/aarch64/page_fault_test.c index eb4217b7c768..08a5ca5bed56 100644 --- a/tools/testing/selftests/kvm/aarch64/page_fault_test.c +++ b/tools/testing/selftests/kvm/aarch64/page_fault_test.c @@ -705,7 +705,7 @@ static void run_test(enum vm_guest_mode mode, void *arg) print_test_banner(mode, p); - vm = ____vm_create(mode); + vm = ____vm_create(VM_SHAPE(mode)); setup_memslots(vm, p); kvm_vm_elf_load(vm, program_invocation_name); setup_ucall(vm); |