public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: VMX: Fixes for faults on ENCLS emulation
@ 2023-04-05 23:45 Sean Christopherson
  2023-04-05 23:45 ` [PATCH 1/2] KVM: VMX: Inject #GP on ENCLS if vCPU has paging disabled (CR0.PG==0) Sean Christopherson
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Sean Christopherson @ 2023-04-05 23:45 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini
  Cc: kvm, linux-kernel, Binbin Wu, Kai Huang

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
-- 
2.40.0.348.gf938b09366-goog


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-06-03  0:56 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-05 23:45 [PATCH 0/2] KVM: VMX: Fixes for faults on ENCLS emulation Sean Christopherson
2023-04-05 23:45 ` [PATCH 1/2] KVM: VMX: Inject #GP on ENCLS if vCPU has paging disabled (CR0.PG==0) Sean Christopherson
2023-04-06  8:54   ` Huang, Kai
2023-04-21  9:18     ` Huang, Kai
2023-04-05 23:45 ` [PATCH 2/2] KVM: VMX: Inject #GP, not #UD, if SGX2 ENCLS leafs are unsupported Sean Christopherson
2023-04-06  9:17   ` Huang, Kai
2023-04-06 18:00     ` Sean Christopherson
2023-04-12 11:15       ` Huang, Kai
2023-04-12 14:38         ` Sean Christopherson
2023-04-12 22:28           ` Huang, Kai
2023-04-21  9:17         ` Huang, Kai
2023-04-06  9:19 ` [PATCH 0/2] KVM: VMX: Fixes for faults on ENCLS emulation Huang, Kai
2023-06-03  0:55 ` Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox