diff --git a/arch/arm64/kvm/pkvm.c b/arch/arm64/kvm/pkvm.c index ab74515ca6fa..062f47b940bc 100644 --- a/arch/arm64/kvm/pkvm.c +++ b/arch/arm64/kvm/pkvm.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -30,6 +31,9 @@ #include +#include +#include + #include "hyp_constants.h" #include "hyp_trace.h" @@ -870,6 +874,7 @@ static int __init __pkvm_request_early_module(char *module_name, "PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL }; + static bool proc; char **argv; int idx = 0; @@ -901,6 +906,15 @@ static int __init __pkvm_request_early_module(char *module_name, /* Even with CONFIG_STATIC_USERMODEHELPER we really want this path */ info->path = modprobe_path; + if (!proc) { + wait_for_initramfs(); + if (init_mount("proc", "/proc", "proc", + MS_SILENT | MS_NOEXEC | MS_NOSUID, NULL)) + pr_warn("Couldn't mount /proc, pKVM module parameters will be ignored\n"); + + proc = true; + } + return call_usermodehelper_exec(info, UMH_WAIT_PROC | UMH_KILLABLE); err: kfree(argv);