[PATCH v2 09/14] KVM: arm64: Hide FEAT_NMI from guests

Mark Brown broonie at kernel.org
Mon Dec 5 11:03:50 PST 2022


On Mon, Dec 05, 2022 at 06:06:24PM +0000, Marc Zyngier wrote:
> Mark Brown <broonie at kernel.org> wrote:

> > FEAT_NMI is not yet useful to guests pending implementation of vGIC
> > support. Mask out the feature from the ID register and prevent guests
> > creating state in ALLINT.ALLINT by activating the trap on write provided
> > in HCRX_EL2.TALLINT when they are running. There is no trap available
> > for reads from ALLINT.

> > We do not need to check for FEAT_HCRX since it is mandatory since v8.7
> > and FEAT_NMI is a v8.8 feature.

> And yet you check for it in hyp-stub.S after having checked for
> FEAT_NMI. What gives?

Being aware that you have a strong preference for not having safety
checks for mandatory features I didn't add any here but noted it so
people could see why they were omitted.  The checks in hyp-stub.S were
probably written before I'd checked the dependency situation out.

I can remove those checks if preferred but TBH given that the failure
mode in hyp-stub.S is typically going to be to die with no output if
something goes wrong it does feel like it's worth the extra couple of
instructions to double check things just in case, especially with the
virtual platforms being so easy to misconfigure.
-------------- 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/20221205/60d675eb/attachment.sig>


More information about the linux-arm-kernel mailing list