[PATCH v1 0/2] KVM: arm: Refuse to enable KVM on systems with SME but not FGT

Mark Brown broonie at kernel.org
Mon Oct 31 05:38:04 PDT 2022


On Sat, Oct 29, 2022 at 12:46:43PM +0100, Marc Zyngier wrote:

> I think this goes the wrong way around. SME without FGT is invalid,
> and yet you keep SME around and device to kill virtualisation support.

> I'd rather it is SME that gets disabled when the kernel boots at EL2.
> Furthermore, this is only working around a QEMU issue which can be
> fixed (as opposed to HW that is forever baked).

I do agree that it would be better if we were able to do this the other
way around however access to SMPRI_EL1 at EL1 is not controlled by the
SME enable control for EL2, it is controlled by either the fine grained
trap or the EL3 SME enable trap.  This was the primary driver here
rather than the issues with writing to the FGT registers.

> To me, it looks like the most reasonable course of action is a mention
> in the QEMU release notes that virtualization and SME are currently
> incompatible, and that the user needs to chose one or the other.

Trying to resolve it at the qemu level would certainly be fine, though
note that qemu has already released versions with problems so there's a
bit of stable door/horse issue and it'd just be a note on the web site
and any point releases.

> We had similar issues in the past where QEMU would ignore certain trap
> bits (HCR_EL2.TID{1,2,3}), leading to KVM misbehaving. Did we disable
> KVM? No, we fixed QEMU instead. This case isn't different.

OK.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20221031/3d397de3/attachment.sig>


More information about the linux-arm-kernel mailing list