forked from torvalds/linux
Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
KVM: arm64: Trap SME usage in guest
SME defines two new traps which need to be enabled for guests to ensure that they can't use SME, one for the main SME operations which mirrors the traps for SVE and another for access to TPIDR2 in SCTLR_EL2. For VHE manage SMEN along with ZEN in activate_traps() and the FP state management callbacks. For nVHE the value to be used for CPTR_EL2 in the guest is stored in vcpu->arch.cptr_el2, set TSM there during initialisation. It will be cleared in __deactivate_traps_common() by virtue of not being set in CPTR_EL2_DEFAULT. For both VHE and nVHE cases handle SCTLR_EL2.EnTPIDR2 in the shared __active_traps_common() and __deactivate_traps_common(), there is no existing dynamic management of SCTLR_EL2. Signed-off-by: Mark Brown <broonie@kernel.org>
- Loading branch information
1 parent
4a04f6a
commit 35adc3582db36b4cefefdbdf3afa245a69e529ae
Showing
2 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters