mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-02 08:32:55 +00:00
KVM: selftests: fix supported_flags for aarch64
KVM/Arm supports readonly memslots; fix the calculation of supported_flags in set_memory_region_test.c, otherwise the test fails. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
e9e60c82fe
commit
849c181643
@ -333,9 +333,11 @@ static void test_invalid_memory_region_flags(void)
|
|||||||
struct kvm_vm *vm;
|
struct kvm_vm *vm;
|
||||||
int r, i;
|
int r, i;
|
||||||
|
|
||||||
#ifdef __x86_64__
|
#if defined __aarch64__ || defined __x86_64__
|
||||||
supported_flags |= KVM_MEM_READONLY;
|
supported_flags |= KVM_MEM_READONLY;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __x86_64__
|
||||||
if (kvm_check_cap(KVM_CAP_VM_TYPES) & BIT(KVM_X86_SW_PROTECTED_VM))
|
if (kvm_check_cap(KVM_CAP_VM_TYPES) & BIT(KVM_X86_SW_PROTECTED_VM))
|
||||||
vm = vm_create_barebones_protected_vm();
|
vm = vm_create_barebones_protected_vm();
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user