@@ -2257,6 +2257,9 @@
kvm-arm.mode=
[KVM,ARM] Select one of KVM/arm64's modes of operation.
+ nvhe: Standard nVHE-based mode, without support for
+ protected guests.
+
protected: nVHE-based mode with support for guests whose
state is kept private from the host.
Not valid if the kernel is running in EL2.
@@ -37,6 +37,12 @@ static const struct reg_desc * const regs[] __initdata = {
&mmfr1,
};
+static const struct {
+ const char * const alias;
+ const char * const feature;
+} aliases[] __initdata = {
+};
+
static int __init find_field(const char *cmdline, const struct reg_desc *reg,
int f, u64 *v)
{
@@ -77,6 +83,18 @@ static void __init match_options(const char *cmdline)
}
}
+static __init void match_aliases(const char *cmdline)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(aliases); i++) {
+ char *str = strstr(cmdline, aliases[i].alias);
+
+ if ((str == cmdline || (str > cmdline && *(str - 1) == ' ')))
+ match_options(aliases[i].feature);
+ }
+}
+
static __init void parse_cmdline(void)
{
if (!IS_ENABLED(CONFIG_CMDLINE_FORCE)) {
@@ -97,6 +115,7 @@ static __init void parse_cmdline(void)
goto out;
match_options(prop);
+ match_aliases(prop);
if (!IS_ENABLED(CONFIG_CMDLINE_EXTEND))
return;
@@ -104,6 +123,7 @@ static __init void parse_cmdline(void)
out:
match_options(CONFIG_CMDLINE);
+ match_aliases(CONFIG_CMDLINE);
}
void __init init_shadow_regs(void)
In order to map the override of idregs to options that a user can easily understand, let's introduce yet another option array, which maps an option to the corresponding idreg options. Signed-off-by: Marc Zyngier <maz@kernel.org> --- .../admin-guide/kernel-parameters.txt | 3 +++ arch/arm64/kernel/idreg-override.c | 20 +++++++++++++++++++ 2 files changed, 23 insertions(+)