Re: [PATCH] KVM: VMX: Always reflect SGX EPCM #PFs back into the guest

From: Sean Christopherson

Date: Mon Jan 12 2026 - 12:42:26 EST


On Fri, 21 Nov 2025 14:20:18 -0800, Sean Christopherson wrote:
> When handling intercepted #PFs, reflect EPCM (Enclave Page Cache Map)
> violations, i.e. #PFs with the SGX flag set, back into the guest. KVM
> doesn't shadow EPCM entries (the EPCM deals only with virtual/linear
> addresses), and so EPCM violation cannot be due to KVM interference,
> and more importantly can't be resolved by KVM.
>
> On pre-SGX2 hardware, EPCM violations are delivered as #GP(0) faults, but
> on SGX2+ hardware, they are delivered as #PF(SGX). Failure to account for
> the SGX2 behavior could put a vCPU into an infinite loop due to KVM not
> realizing the #PF is the guest's responsibility.
>
> [...]

Applied to kvm-x86 vmx, thanks!

[1/1] KVM: VMX: Always reflect SGX EPCM #PFs back into the guest
https://github.com/kvm-x86/linux/commit/ff8071eb3aa5

--
https://github.com/kvm-x86/linux/tree/next