Skip to content

Commit cfa2e47

Browse files
author
Vineeth Pillai (Google)
committed
REVERTME: pkvm: x86: Temporarily fail pkvm initialization
Until pVMCS is ready, temporarily fail pKVM initialization so that the reprivilege code gets more test coverage. Signed-off-by: Vineeth Pillai (Google) <[email protected]>
1 parent 55dd66d commit cfa2e47

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

arch/x86/kvm/pkvm/init.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "mmu.h"
1010
#include "pkvm.h"
1111
#include "trace.h"
12+
#include "debug.h"
1213

1314
static void *hyp_pgt_base;
1415
static void *host_pgt_base;
@@ -282,6 +283,15 @@ int pkvm_init(struct pkvm_mem_info infos[], int nr_infos)
282283
if (ret)
283284
return ret;
284285

286+
/*
287+
* XXX: Revert
288+
* Temporrarily fail pkvm initialization until pVMCS is fully merged.
289+
* pKVM doesn't serve any real purpose until we have pVMCS reasy and
290+
* this failure helps us test reprivilege code when pKVM is enabled.
291+
*/
292+
pkvm_err("%s: Explicitly triggering pkvm initialization failure!\n", __func__);
293+
return -EFAULT;
294+
285295
pkvm_init_percpu_fpu();
286296

287297
pkvm_vcpu_perf_init(this_cpu_read(host_vcpu));

0 commit comments

Comments
 (0)