mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-23 07:03:08 +00:00
hv_exc: Forward more sysregs
We don't normally trap these, but for experiments using TIDCP they are useful to avoid. Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
a383ef0b5a
commit
f5af1caee5
2 changed files with 35 additions and 8 deletions
|
@ -11,9 +11,13 @@
|
|||
|
||||
#define SYS_IMP_APL_AMX_CTL_EL1 sys_reg(3, 4, 15, 1, 4)
|
||||
#define SYS_IMP_APL_AMX_CTL_EL2 sys_reg(3, 4, 15, 4, 7)
|
||||
#define SYS_IMP_APL_AMX_CTL_EL12 sys_reg(3, 4, 15, 4, 6)
|
||||
|
||||
#define AMX_CTL_EN BIT(63)
|
||||
#define AMX_CTL_EN_EL1 BIT(62)
|
||||
|
||||
#define SYS_IMP_APL_CNTVCT_ALIAS_EL0 sys_reg(3, 4, 15, 10, 6)
|
||||
|
||||
/* HID registers */
|
||||
#define SYS_IMP_APL_HID0 sys_reg(3, 0, 15, 0, 0)
|
||||
#define HID0_FETCH_WIDTH_DISABLE BIT(28)
|
||||
|
@ -186,6 +190,8 @@
|
|||
|
||||
#define SYS_IMP_APL_SPRR_PERM_EL0 sys_reg(3, 6, 15, 1, 5)
|
||||
#define SYS_IMP_APL_SPRR_PERM_EL1 sys_reg(3, 6, 15, 1, 6)
|
||||
#define SYS_IMP_APL_SPRR_PERM_EL02 sys_reg(3, 4, 15, 5, 2)
|
||||
#define SYS_IMP_APL_SPRR_PERM_EL12 sys_reg(3, 6, 15, 15, 7)
|
||||
|
||||
#define SYS_IMP_APL_TPIDR_GL1 sys_reg(3, 6, 15, 10, 1)
|
||||
#define SYS_IMP_APL_VBAR_GL1 sys_reg(3, 6, 15, 10, 2)
|
||||
|
@ -196,6 +202,10 @@
|
|||
#define SYS_IMP_APL_FAR_GL1 sys_reg(3, 6, 15, 10, 7)
|
||||
|
||||
#define SYS_IMP_APL_VBAR_GL12 sys_reg(3, 6, 15, 9, 2)
|
||||
#define SYS_IMP_APL_SPSR_GL12 sys_reg(3, 6, 15, 9, 3)
|
||||
#define SYS_IMP_APL_ASPSR_GL12 sys_reg(3, 6, 15, 9, 4)
|
||||
#define SYS_IMP_APL_ESR_GL12 sys_reg(3, 6, 15, 9, 5)
|
||||
#define SYS_IMP_APL_ELR_GL12 sys_reg(3, 6, 15, 9, 6)
|
||||
#define SYS_IMP_APL_SP_GL12 sys_reg(3, 6, 15, 10, 0)
|
||||
|
||||
#define SYS_IMP_APL_AFSR1_GL1 sys_reg(3, 6, 15, 0, 1)
|
||||
|
@ -205,6 +215,10 @@
|
|||
#define SYS_IMP_APL_APVMKEYHI_EL2 sys_reg(3, 6, 15, 14, 5)
|
||||
#define SYS_IMP_APL_APSTS_EL12 sys_reg(3, 6, 15, 14, 7)
|
||||
|
||||
#define SYS_IMP_APL_APCTL_EL1 sys_reg(3, 4, 15, 0, 4)
|
||||
#define SYS_IMP_APL_APCTL_EL2 sys_reg(3, 6, 15, 12, 2)
|
||||
#define SYS_IMP_APL_APCTL_EL12 sys_reg(3, 6, 15, 15, 0)
|
||||
|
||||
/* VM registers */
|
||||
#define SYS_IMP_APL_VM_TMR_FIQ_ENA_EL2 sys_reg(3, 5, 15, 1, 3)
|
||||
#define VM_TMR_FIQ_ENA_ENA_V BIT(0)
|
||||
|
|
13
src/hv_exc.c
13
src/hv_exc.c
|
@ -156,6 +156,19 @@ static bool hv_handle_msr(struct exc_info *ctx, u64 iss)
|
|||
SYSREG_MAP(SYS_ACTLR_EL1, SYS_IMP_APL_ACTLR_EL12)
|
||||
SYSREG_PASS(SYS_IMP_APL_HID4)
|
||||
SYSREG_PASS(SYS_IMP_APL_EHID4)
|
||||
/* We don't normally trap hese, but if we do, they're noisy */
|
||||
SYSREG_PASS(SYS_IMP_APL_GXF_STATUS_EL1)
|
||||
SYSREG_PASS(SYS_IMP_APL_CNTVCT_ALIAS_EL0)
|
||||
SYSREG_PASS(SYS_IMP_APL_TPIDR_GL1)
|
||||
SYSREG_MAP(SYS_IMP_APL_SPSR_GL1, SYS_IMP_APL_SPSR_GL12)
|
||||
SYSREG_MAP(SYS_IMP_APL_ASPSR_GL1, SYS_IMP_APL_ASPSR_GL12)
|
||||
SYSREG_MAP(SYS_IMP_APL_ELR_GL1, SYS_IMP_APL_ELR_GL12)
|
||||
SYSREG_MAP(SYS_IMP_APL_ESR_GL1, SYS_IMP_APL_ESR_GL12)
|
||||
SYSREG_MAP(SYS_IMP_APL_SPRR_PERM_EL1, SYS_IMP_APL_SPRR_PERM_EL12)
|
||||
SYSREG_MAP(SYS_IMP_APL_APCTL_EL1, SYS_IMP_APL_APCTL_EL12)
|
||||
SYSREG_MAP(SYS_IMP_APL_AMX_CTL_EL1, SYS_IMP_APL_AMX_CTL_EL12)
|
||||
/* FIXME:Might be wrong */
|
||||
SYSREG_PASS(sys_reg(3, 4, 15, 1, 3))
|
||||
/* pass through PMU handling */
|
||||
SYSREG_PASS(SYS_IMP_APL_PMCR1)
|
||||
SYSREG_PASS(SYS_IMP_APL_PMCR2)
|
||||
|
|
Loading…
Reference in a new issue