Skip to content

KVM: VMX: Fixes for faults on ENCLS emulation

Sean Christopherson kvm lkml 1 version Applied

Status from this message: Applied to kvm-x86 vmx, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 10 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2KVM: VMX: Inject #GP on ENCLS if vCPU has paging disabled (CR0.PG==0)arch/x86/kvm/vmx/sgx.c+1 -12 replies
2/2KVM: VMX: Inject #GP, not #UD, if SGX2 ENCLS leafs are unsupportedarch/x86/kvm/vmx/sgx.c+9 -66 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchKai Huang
1/2R-b T-b
2/2R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] KVM: VMX: Fixes for faults on ENCLS emulation

Found-by-inspection (when reviewing Binbin's patch) fixes for incorrect emulation of faults when KVMintercepts and emulates (sort of) ENCLS.

Very much compile tested only. Ideally, someone with SGX hardware can confirm that these patches are correct, e.g. my assessment that KVM needs to manually check CR0.PG is based purely of SDM pseudocode.

Sean Christopherson (2):
KVM: VMX: Inject #GP on ENCLS if vCPU has paging disabled (CR0.PG==0)
KVM: VMX: Inject #GP, not #UD, if SGX2 ENCLS leafs are unsupported

 arch/x86/kvm/vmx/sgx.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

base-commit: 27d6845d258b67f4eb3debe062b7dacc67e0c393

Signature · 1 line
2.40.0.348.gf938b09366-goog