selftests: kvm: add tests for KVM_SEV_INIT2

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-ID: <20240404121327.3107131-15-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini
2024-04-04 08:13:24 -04:00
parent 4dd5ecacb9
commit dfc083a181
4 changed files with 159 additions and 8 deletions
@@ -890,17 +890,15 @@ static inline struct kvm_vm *vm_create_barebones(void)
return ____vm_create(VM_SHAPE_DEFAULT);
}
#ifdef __x86_64__
static inline struct kvm_vm *vm_create_barebones_protected_vm(void)
static inline struct kvm_vm *vm_create_barebones_type(unsigned long type)
{
const struct vm_shape shape = {
.mode = VM_MODE_DEFAULT,
.type = KVM_X86_SW_PROTECTED_VM,
.type = type,
};
return ____vm_create(shape);
}
#endif
static inline struct kvm_vm *vm_create(uint32_t nr_runnable_vcpus)
{