[RFC 03/12] KVM: arm64: Hide TLBID from guest sysregs
Steffen Eiden
seiden at linux.ibm.com
Mon Oct 12 01:12:54 PDT 2026
On Thu, Oct 01, 2026 at 12:06:46PM +0100, Kristina Martšenko wrote:
> Don't expose FEAT_TLBID to guests. It wouldn't be useful in the general
> case since a guest doesn't know which domains exist and its vCPUs can be
> moved between any physical CPUs.
>
> Try to hide TLBID sysregs and sysreg fields from the guest:
>
> * Report the feature as not supported in the ID register
> ID_AA64MMFR4_EL1.TLBID.
>
> * Configure the TLBIDIDR_EL1 sysreg to UNDEF via the FGU mechanism.
> Sanitize a nested hypervisor's HFGRTR2.nTLBIDIDR.
>
> * Sanitize a nested hypervisor's HCRX.{VTLBIDEn,VTLBIDOSEn,FNB}.
>
> * VTLBID{OS}<n>_EL2 registers are VNCR-backed and not exposed to
> guests (apart from being able to read/write into the VNCR page) so
> no need to handle them in sys_reg_descs or elsewhere.
>
> * The guest is free to set SCTLR2_EL{1,2}.TLBOSNIS, which shouldn't
> matter to KVM.
>
What confuse me where a bit that you wrote 'try to hide'.
For me this indicates that the hiding process may not be successful.
For me the code looks like it will always succeddin hiding the feature
from the guest, no? Did I miss anything?
Same for the next patch.
Steffen
More information about the linux-arm-kernel
mailing list