On Sat, 14 Mar 2026 17:51:32 +0000, Yeoreum Yun <[email protected]> wrote: > > Use the CAST instruction to swap the guest descriptor when FEAT_LSUI > is enabled, avoiding the need to clear the PAN bit. > > FEAT_LSUI is introduced in Armv9.6, where FEAT_PAN is mandatory. However, > this assumption may not always hold: > > - Some CPUs may advertise FEAT_LSUI but lack FEAT_PAN. > - Virtualization or ID register overrides may expose invalid feature > combinations. > > Therefore, instead of disabling FEAT_LSUI when FEAT_PAN is absent, wrap > LSUI instructions with uaccess_ttbr0_enable()/disable() when > ARM64_SW_TTBR0_PAN is enabled. > > Signed-off-by: Yeoreum Yun <[email protected]>
Reviewed-by: Marc Zyngier <[email protected]> M. -- Without deviation from the norm, progress is not possible.

