mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-16 06:31:51 -06:00
target/arm/ptw: Remove last uses of ptw->in_secure
Replace the last uses of ptw->in_secure with appropriate checks on ptw->in_space. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20230807141514.19075-10-peter.maydell@linaro.org
This commit is contained in:
parent
b9c139dc58
commit
cdbae5e7e1
1 changed files with 7 additions and 4 deletions
|
@ -3249,7 +3249,6 @@ static bool get_phys_addr_nogpc(CPUARMState *env, S1Translate *ptw,
|
||||||
ARMMMUFaultInfo *fi)
|
ARMMMUFaultInfo *fi)
|
||||||
{
|
{
|
||||||
ARMMMUIdx mmu_idx = ptw->in_mmu_idx;
|
ARMMMUIdx mmu_idx = ptw->in_mmu_idx;
|
||||||
bool is_secure = ptw->in_secure;
|
|
||||||
ARMMMUIdx s1_mmu_idx;
|
ARMMMUIdx s1_mmu_idx;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -3257,8 +3256,8 @@ static bool get_phys_addr_nogpc(CPUARMState *env, S1Translate *ptw,
|
||||||
* cannot upgrade a NonSecure translation regime's attributes
|
* cannot upgrade a NonSecure translation regime's attributes
|
||||||
* to Secure or Realm.
|
* to Secure or Realm.
|
||||||
*/
|
*/
|
||||||
result->f.attrs.secure = is_secure;
|
|
||||||
result->f.attrs.space = ptw->in_space;
|
result->f.attrs.space = ptw->in_space;
|
||||||
|
result->f.attrs.secure = arm_space_is_secure(ptw->in_space);
|
||||||
|
|
||||||
switch (mmu_idx) {
|
switch (mmu_idx) {
|
||||||
case ARMMMUIdx_Phys_S:
|
case ARMMMUIdx_Phys_S:
|
||||||
|
@ -3272,8 +3271,12 @@ static bool get_phys_addr_nogpc(CPUARMState *env, S1Translate *ptw,
|
||||||
case ARMMMUIdx_Stage1_E0:
|
case ARMMMUIdx_Stage1_E0:
|
||||||
case ARMMMUIdx_Stage1_E1:
|
case ARMMMUIdx_Stage1_E1:
|
||||||
case ARMMMUIdx_Stage1_E1_PAN:
|
case ARMMMUIdx_Stage1_E1_PAN:
|
||||||
/* First stage lookup uses second stage for ptw. */
|
/*
|
||||||
ptw->in_ptw_idx = is_secure ? ARMMMUIdx_Stage2_S : ARMMMUIdx_Stage2;
|
* First stage lookup uses second stage for ptw; only
|
||||||
|
* Secure has both S and NS IPA and starts with Stage2_S.
|
||||||
|
*/
|
||||||
|
ptw->in_ptw_idx = (ptw->in_space == ARMSS_Secure) ?
|
||||||
|
ARMMMUIdx_Stage2_S : ARMMMUIdx_Stage2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ARMMMUIdx_Stage2:
|
case ARMMMUIdx_Stage2:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue