mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-22 14:43:08 +00:00
hv.py: Add M1RACLES mitigation
Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
469b1258c0
commit
775902112d
2 changed files with 6 additions and 1 deletions
|
@ -199,7 +199,9 @@ class HV:
|
|||
|
||||
name = sysreg_name(enc)
|
||||
|
||||
skip = set()
|
||||
skip = set((
|
||||
(3, 5, 15, 10, 1), # M1RACLES mitigation
|
||||
))
|
||||
shadow = {
|
||||
#SPRR_CONFIG_EL1,
|
||||
#SPRR_PERM_EL0,
|
||||
|
@ -646,6 +648,7 @@ class HV:
|
|||
hacr.TRAP_HID = 1
|
||||
hacr.TRAP_ACC = 1
|
||||
hacr.TRAP_IPI = 1
|
||||
hacr.TRAP_SERROR_INFO = 1 # M1RACLES mitigation
|
||||
self.u.msr(HACR_EL2, hacr.value)
|
||||
|
||||
# Enable AMX
|
||||
|
|
|
@ -130,6 +130,8 @@ static bool hv_handle_msr(u64 *regs, u64 iss)
|
|||
regs[31] = 0;
|
||||
|
||||
switch (reg) {
|
||||
/* Some kind of timer */
|
||||
SYSREG_PASS(sys_reg(3, 7, 15, 1, 1));
|
||||
/* Noisy traps */
|
||||
SYSREG_MAP(SYS_ACTLR_EL1, SYS_IMP_APL_ACTLR_EL12)
|
||||
/* IPI handling */
|
||||
|
|
Loading…
Reference in a new issue