Thread (10 messages) 10 messages, 4 authors, 2026-03-25

Re: [PATCH] KVM: arm64: Inject UNDEF when host is executing an smc with imm16 != 0

From: Marc Zyngier <maz@kernel.org>
Date: 2026-03-24 14:43:30
Also in: kvmarm, lkml

On Tue, 24 Mar 2026 13:57:28 +0000,
Sebastian Ene [off-list ref] wrote:
The ARM Service Calling Convention (SMCCC) specifies that the function
identifier and parameters should be passed in registers, leaving the
16-bit immediate field of the SMC instruction un-handled.
Currently, our pKVM handler ignores the immediate value, which could lead
to non-compliant software relying on implementation-defined behavior.
Enforce the host kernel running under pKVM to use an immediate value
of 0 by decoding the ISS from the ESR_EL2 and inject an undefined
instruction exception back to the caller.
No, that's completely wrong. SMC never UNDEFs, unless EL3 isn't
implemented. You can't just decide to generate an UNDEF because you
don't like the immediate.

All you are allowed to do is to return an error code.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help