Skip to content

Commit 849c181

Browse files
committed
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>
1 parent e9e60c8 commit 849c181

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tools/testing/selftests/kvm/set_memory_region_test.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,11 @@ static void test_invalid_memory_region_flags(void)
333333
struct kvm_vm *vm;
334334
int r, i;
335335

336-
#ifdef __x86_64__
336+
#if defined __aarch64__ || defined __x86_64__
337337
supported_flags |= KVM_MEM_READONLY;
338+
#endif
338339

340+
#ifdef __x86_64__
339341
if (kvm_check_cap(KVM_CAP_VM_TYPES) & BIT(KVM_X86_SW_PROTECTED_VM))
340342
vm = vm_create_barebones_protected_vm();
341343
else

0 commit comments

Comments
 (0)