mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
This is the same as the v3 posted except a re-base and a few extra signoffs
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJYeOOmAAoJEPvQ2wlanipE3ZUH/Rsfpl23kXCMmqoXEIhWXy+h yf8ARWCmpU6UKfwb+sH4vLegBfU56f62vVkGQ6oaaAbuyQ4SxCUlZGMO/rqY8/TE m57aM+VfEE+bIdinAtLjFM24EVp/exMfkeutK7ItzLv7GwlrBos0J5veyCuyJ15q pccV24jrpbJGilEeJ2GblKp3r2I3dInQGauOQhtoP3MNjHmYNSQD7noSbdN/JiTR 9H2eV700pg3ZPaSfO+CTVQN+cHjK1FC6qLi6916YZY9llnSOnDAegBYgbwE1RIBw AULpWrezYveKy71eFhHVtGxnPeCJ8J4GVECMK0P0cdxzprIXFh1kZezyM4bxAGk= =sboI -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/stsquad/tags/pull-tcg-common-tlb-reset-20170113-r1' into staging This is the same as the v3 posted except a re-base and a few extra signoffs # gpg: Signature made Fri 13 Jan 2017 14:26:46 GMT # gpg: using RSA key 0xFBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" # Primary key fingerprint: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44 * remotes/stsquad/tags/pull-tcg-common-tlb-reset-20170113-r1: cputlb: drop flush_global flag from tlb_flush cpu_common_reset: wrap TCG specific code in tcg_enabled() qom/cpu: move tlb_flush to cpu_common_reset Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
a8c611e113
57 changed files with 151 additions and 148 deletions
|
@ -2820,8 +2820,6 @@ static void x86_cpu_reset(CPUState *s)
|
|||
|
||||
memset(env, 0, offsetof(CPUX86State, end_reset_fields));
|
||||
|
||||
tlb_flush(s, 1);
|
||||
|
||||
env->old_exception = -1;
|
||||
|
||||
/* init to reset state */
|
||||
|
|
|
@ -1123,10 +1123,12 @@ typedef struct CPUX86State {
|
|||
uint8_t nmi_injected;
|
||||
uint8_t nmi_pending;
|
||||
|
||||
/* Fields up to this point are cleared by a CPU reset */
|
||||
struct {} end_reset_fields;
|
||||
|
||||
CPU_COMMON
|
||||
|
||||
/* Fields from here on are preserved across CPU reset. */
|
||||
struct {} end_reset_fields;
|
||||
/* Fields after CPU_COMMON are preserved across CPU reset. */
|
||||
|
||||
/* processor features (e.g. for CPUID insn) */
|
||||
/* Minimum level/xlevel/xlevel2, based on CPU model + features */
|
||||
|
|
|
@ -1465,7 +1465,7 @@ void helper_xrstor(CPUX86State *env, target_ulong ptr, uint64_t rfbm)
|
|||
}
|
||||
if (env->pkru != old_pkru) {
|
||||
CPUState *cs = CPU(x86_env_get_cpu(env));
|
||||
tlb_flush(cs, 1);
|
||||
tlb_flush(cs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -586,7 +586,7 @@ void x86_cpu_set_a20(X86CPU *cpu, int a20_state)
|
|||
|
||||
/* when a20 is changed, all the MMU mappings are invalid, so
|
||||
we must flush everything */
|
||||
tlb_flush(cs, 1);
|
||||
tlb_flush(cs);
|
||||
env->a20_mask = ~(1 << 20) | (a20_state << 20);
|
||||
}
|
||||
}
|
||||
|
@ -599,7 +599,7 @@ void cpu_x86_update_cr0(CPUX86State *env, uint32_t new_cr0)
|
|||
qemu_log_mask(CPU_LOG_MMU, "CR0 update: CR0=0x%08x\n", new_cr0);
|
||||
if ((new_cr0 & (CR0_PG_MASK | CR0_WP_MASK | CR0_PE_MASK)) !=
|
||||
(env->cr[0] & (CR0_PG_MASK | CR0_WP_MASK | CR0_PE_MASK))) {
|
||||
tlb_flush(CPU(cpu), 1);
|
||||
tlb_flush(CPU(cpu));
|
||||
}
|
||||
|
||||
#ifdef TARGET_X86_64
|
||||
|
@ -641,7 +641,7 @@ void cpu_x86_update_cr3(CPUX86State *env, target_ulong new_cr3)
|
|||
if (env->cr[0] & CR0_PG_MASK) {
|
||||
qemu_log_mask(CPU_LOG_MMU,
|
||||
"CR3 update: CR3=" TARGET_FMT_lx "\n", new_cr3);
|
||||
tlb_flush(CPU(cpu), 0);
|
||||
tlb_flush(CPU(cpu));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -656,7 +656,7 @@ void cpu_x86_update_cr4(CPUX86State *env, uint32_t new_cr4)
|
|||
if ((new_cr4 ^ env->cr[4]) &
|
||||
(CR4_PGE_MASK | CR4_PAE_MASK | CR4_PSE_MASK |
|
||||
CR4_SMEP_MASK | CR4_SMAP_MASK | CR4_LA57_MASK)) {
|
||||
tlb_flush(CPU(cpu), 1);
|
||||
tlb_flush(CPU(cpu));
|
||||
}
|
||||
|
||||
/* Clear bits we're going to recompute. */
|
||||
|
|
|
@ -387,7 +387,7 @@ static int cpu_post_load(void *opaque, int version_id)
|
|||
env->dr[7] = dr7 & ~(DR7_GLOBAL_BP_MASK | DR7_LOCAL_BP_MASK);
|
||||
cpu_x86_update_dr7(env, dr7);
|
||||
}
|
||||
tlb_flush(cs, 1);
|
||||
tlb_flush(cs);
|
||||
|
||||
if (tcg_enabled()) {
|
||||
cpu_smm_update(cpu);
|
||||
|
|
|
@ -635,5 +635,5 @@ void helper_wrpkru(CPUX86State *env, uint32_t ecx, uint64_t val)
|
|||
}
|
||||
|
||||
env->pkru = val;
|
||||
tlb_flush(cs, 1);
|
||||
tlb_flush(cs);
|
||||
}
|
||||
|
|
|
@ -289,7 +289,7 @@ void helper_vmrun(CPUX86State *env, int aflag, int next_eip_addend)
|
|||
break;
|
||||
case TLB_CONTROL_FLUSH_ALL_ASID:
|
||||
/* FIXME: this is not 100% correct but should work for now */
|
||||
tlb_flush(cs, 1);
|
||||
tlb_flush(cs);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue