Thread (37 messages) flat view 37 messages, 3 authors, 10h ago

Re: [PATCH v20 06/14] KVM: arm64: Validate GCS exception lock when emulating ERET

From: Leonardo Bras <hidden>
Date: 2026-09-07 10:55:38
Also in: kvmarm, linux-doc, linux-kselftest, lkml

On Fri, Sep 04, 2026 at 10:56:48PM +0100, Mark Brown wrote:
On Fri, Sep 04, 2026 at 02:16:34PM +0100, Leonardo Bras wrote:
quoted
On Thu, Sep 03, 2026 at 08:22:44PM +0100, Mark Brown wrote:
quoted
On Thu, Sep 03, 2026 at 04:37:37PM +0100, Leonardo Bras wrote:
quoted
quoted
quoted
quoted
+	if (kvm_check_illegal_exlock_return(vcpu, spsr))
+		return false;
quoted
quoted
quoted
quoted
 	/* If ERETAx fails, take the slow path */
 	if (esr_iss_is_eretax(esr)) {
 		if (!(vcpu_has_ptrauth(vcpu) && kvm_auth_eretax(vcpu, &elr)))
...
quoted
quoted
We need this because ERETs from vEL2 are handled in software, modulo the
NV3 fast path mentioned at the top of the function.
quoted
Oh, and this is done in __fixup_guest_exit() because vEL2 is not a 
nested guest. It would be it's guests' exit that would be dealt in 
fixup_nv_guest_exit().
quoted
Is this correct?
Well, it's as much because that is the point where we handle the EC
specifics.  __fixup_guest_exit() does general handling of guest exits
that applies to all ECs and then dispatches to an EC specific handler,
it is common code with nVHE.  When we have NV then fixup_nv_guest_exit()
is run beforehand to do extra handling that applies to all ECs in the NV
case, but any EC specifics for NV still go in the relevant EC specific
handler.

Humm, okay.

FWIW:
Reviewed-by: Leonardo Bras <redacted>

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help