The INVEPT & INVVPID cause vmexit unconditionally, pKVM must have handler for them. It's a tmp solution, just call global invept for invept/invvpid. After pKVM supported shadow EPT, such emulation shall be done based on shadow EPT. Signed-off-by: Jason Chen CJ <jason.cj.chen@xxxxxxxxx> --- arch/x86/kvm/vmx/pkvm/hyp/vmexit.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/x86/kvm/vmx/pkvm/hyp/vmexit.c b/arch/x86/kvm/vmx/pkvm/hyp/vmexit.c index 27b6518032b5..8e7392010887 100644 --- a/arch/x86/kvm/vmx/pkvm/hyp/vmexit.c +++ b/arch/x86/kvm/vmx/pkvm/hyp/vmexit.c @@ -251,6 +251,11 @@ int pkvm_main(struct kvm_vcpu *vcpu) case EXIT_REASON_INTERRUPT_WINDOW: handle_irq_window(vcpu); break; + case EXIT_REASON_INVEPT: + case EXIT_REASON_INVVPID: + ept_sync_global(); + skip_instruction = true; + break; default: pkvm_dbg("CPU%d: Unsupported vmexit reason 0x%x.\n", vcpu->cpu, vmx->exit_reason.full); skip_instruction = true; -- 2.25.1