Re: [PATCH v4 4/5] KVM: VMX: Synthesize nested EPT violation GVA_IS_VALID/GVA_TRANSLATED bits

From: David Woodhouse

Date: Sun Sep 20 2026 - 10:39:59 EST


On Fri, 2026-05-22 at 16:27 -0700, Sean Christopherson wrote:
> From: Kevin Cheng <chengkev@xxxxxxxxxx>
>
> When injecting an EPT Violation into L2 in response to a fault detected
> while emulating an L2 GVA access, synthesize the GVA_IS_VALID and
> GVA_TRANSLATED bits using information provided by the walker, instead of
> pulling the bits from vmcs02.EXIT_QUALIFICATION.  The information in
> vmcs02.EXIT_QUALIFICATION is valid/correct if and only if the fault being
> injected into L1 is the direct result of an EPT Violation VM-Exit from L2.
>
> E.g. if KVM is emulating an I/O instruction and the memory operand's
> translation through L1's EPT fails, using vmcs02.EXIT_QUALIFICATION is
> wrong as the semantics for EXIT_QUALIFICATION would be for an I/O exit,
> not an EPT Violation exit.
>
> Opportunistically clean up the formatting for creating the mask of bits
> to pull from vmcs02.EXIT_QUALIFICATION.
>
> Signed-off-by: Kevin Cheng <chengkev@xxxxxxxxxx>
> [sean: use plumbed in @access bits, massage changelog]
> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>

I think this wants a Fixes: a9466078687f and backports to stable? Broke
my testing environment on a 6.12-based distro.

Attachment: smime.p7s
Description: S/MIME cryptographic signature