Commit cb7c4f36 authored by Marc Zyngier's avatar Marc Zyngier

KVM: selftests: arm64: Initialise default guest mode at test startup time

As we are going to add support for a variable default mode on arm64,
let's make sure it is setup first by using a constructor that gets
called before the actual test runs.
Suggested-by: default avatarAndrew Jones <drjones@redhat.com>
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Reviewed-by: default avatarAndrew Jones <drjones@redhat.com>
Link: https://lore.kernel.org/r/20211227124809.1335409-2-maz@kernel.org
parent d58071a8
...@@ -432,3 +432,12 @@ uint32_t guest_get_vcpuid(void) ...@@ -432,3 +432,12 @@ uint32_t guest_get_vcpuid(void)
{ {
return read_sysreg(tpidr_el1); return read_sysreg(tpidr_el1);
} }
/*
* arm64 doesn't have a true default mode, so start by computing the
* available IPA space and page sizes early.
*/
void __attribute__((constructor)) init_guest_modes(void)
{
guest_modes_append_default();
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment