[PATCH 12/18] KVM: arm64: nv: Handle PSCI call via smc from the guest

Oliver Upton oliver.upton at linux.dev
Sat Feb 11 10:17:09 PST 2023


On Sat, Feb 11, 2023 at 10:31:59AM +0000, Marc Zyngier wrote:
> On Sat, 11 Feb 2023 10:07:41 +0000, Oliver Upton <oliver.upton at linux.dev> wrote:

[...]

> > This also has the subtle effect of allowing smc instructions from a
> > non-nested guest to hit our hypercall surface too.
> 
> I think we'll have to eventually allow that (see the TRNG spec which
> we blatantly deviate from by requiring an HVC), but we don't have to
> cross that bridge just yet.

Perhaps I'll continue to bury my head in the sand and act like you
didn't say that :)

I seem to recall that the SMCCC suggests either the SMC or HVC
instruction could be used if both EL2 and EL3 are implemented. So we've
messed that up too.

My only worry is if we open up the use of SMCs and userspace does
something silly in ACPI/DT and unconditionally picks SMCs over HVCs. The
VM won't get far on pre-NV hardware w/o EL3...

We could always just hide the presence of EL3 for non-NV guests :)

-- 
Thanks,
Oliver



More information about the linux-arm-kernel mailing list