mirror of https://github.com/xemu-project/xemu.git
target/arm: Cache the GP bit for a page in MemTxAttrs
Caching the bit means that we will not have to re-walk the page tables to look up the bit during translation. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20190128223118.5255-6-richard.henderson@linaro.org [PMM: no need to OR in guarded bit status] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
d3765835ed
commit
1bafc2ba7e
|
@ -10577,6 +10577,7 @@ static bool get_phys_addr_lpae(CPUARMState *env, target_ulong address,
|
||||||
bool ttbr1_valid;
|
bool ttbr1_valid;
|
||||||
uint64_t descaddrmask;
|
uint64_t descaddrmask;
|
||||||
bool aarch64 = arm_el_is_aa64(env, el);
|
bool aarch64 = arm_el_is_aa64(env, el);
|
||||||
|
bool guarded = false;
|
||||||
|
|
||||||
/* TODO:
|
/* TODO:
|
||||||
* This code does not handle the different format TCR for VTCR_EL2.
|
* This code does not handle the different format TCR for VTCR_EL2.
|
||||||
|
@ -10756,6 +10757,7 @@ static bool get_phys_addr_lpae(CPUARMState *env, target_ulong address,
|
||||||
}
|
}
|
||||||
/* Merge in attributes from table descriptors */
|
/* Merge in attributes from table descriptors */
|
||||||
attrs |= nstable << 3; /* NS */
|
attrs |= nstable << 3; /* NS */
|
||||||
|
guarded = extract64(descriptor, 50, 1); /* GP */
|
||||||
if (param.hpd) {
|
if (param.hpd) {
|
||||||
/* HPD disables all the table attributes except NSTable. */
|
/* HPD disables all the table attributes except NSTable. */
|
||||||
break;
|
break;
|
||||||
|
@ -10801,6 +10803,10 @@ static bool get_phys_addr_lpae(CPUARMState *env, target_ulong address,
|
||||||
*/
|
*/
|
||||||
txattrs->secure = false;
|
txattrs->secure = false;
|
||||||
}
|
}
|
||||||
|
/* When in aarch64 mode, and BTI is enabled, remember GP in the IOTLB. */
|
||||||
|
if (aarch64 && guarded && cpu_isar_feature(aa64_bti, cpu)) {
|
||||||
|
txattrs->target_tlb_bit0 = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (cacheattrs != NULL) {
|
if (cacheattrs != NULL) {
|
||||||
if (mmu_idx == ARMMMUIdx_S2NS) {
|
if (mmu_idx == ARMMMUIdx_S2NS) {
|
||||||
|
|
Loading…
Reference in New Issue