target/arm: Introduce KVMID_AA64_SYS_REG64
Allow us to create kvm ids directly, rather than going through ENCODE_AA64_CP_REG + cpreg_to_kvm_id. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
4ccca2cc05
commit
363e612c2e
1 changed files with 11 additions and 0 deletions
|
|
@ -180,4 +180,15 @@ MISMATCH_CHECK(CP_REG_ARM64_SYSREG_OP2_SHIFT, KVM_REG_ARM64_SYSREG_OP2_SHIFT);
|
|||
|
||||
#undef MISMATCH_CHECK
|
||||
|
||||
#define KVMID_AA64_SYS_REG_(op0, op1, crn, crm, op2) \
|
||||
(CP_REG_AA64_MASK | CP_REG_ARM64_SYSREG | \
|
||||
((op0) << CP_REG_ARM64_SYSREG_OP0_SHIFT) | \
|
||||
((op1) << CP_REG_ARM64_SYSREG_OP1_SHIFT) | \
|
||||
((crn) << CP_REG_ARM64_SYSREG_CRN_SHIFT) | \
|
||||
((crm) << CP_REG_ARM64_SYSREG_CRM_SHIFT) | \
|
||||
((op2) << CP_REG_ARM64_SYSREG_OP2_SHIFT))
|
||||
|
||||
#define KVMID_AA64_SYS_REG64(op0, op1, crn, crm, op2) \
|
||||
(KVMID_AA64_SYS_REG_(op0, op1, crn, crm, op2) | CP_REG_SIZE_U64)
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue