mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-10 11:04:58 -06:00
target/ppc: Remove msr_pr macro
msr_pr macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Víctor Colombo <victor.colombo@eldorado.org.br> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220504210541.115256-4-victor.colombo@eldorado.org.br> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
92984c96df
commit
d41ccf6eea
8 changed files with 30 additions and 23 deletions
|
@ -191,12 +191,13 @@ static bool ppc_radix64_check_prot(PowerPCCPU *cpu, MMUAccessType access_type,
|
|||
}
|
||||
|
||||
/* Determine permissions allowed by Encoded Access Authority */
|
||||
if (!partition_scoped && (pte & R_PTE_EAA_PRIV) && msr_pr) {
|
||||
if (!partition_scoped && (pte & R_PTE_EAA_PRIV) &&
|
||||
FIELD_EX64(env->msr, MSR, PR)) {
|
||||
*prot = 0;
|
||||
} else if (mmuidx_pr(mmu_idx) || (pte & R_PTE_EAA_PRIV) ||
|
||||
partition_scoped) {
|
||||
*prot = ppc_radix64_get_prot_eaa(pte);
|
||||
} else { /* !msr_pr && !(pte & R_PTE_EAA_PRIV) && !partition_scoped */
|
||||
} else { /* !MSR_PR && !(pte & R_PTE_EAA_PRIV) && !partition_scoped */
|
||||
*prot = ppc_radix64_get_prot_eaa(pte);
|
||||
*prot &= ppc_radix64_get_prot_amr(cpu); /* Least combined permissions */
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue