mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
target-mips: flush QEMU TLB when disabling 64-bit addressing
CP0.Status.KX/SX/UX bits are responsible for enabling access to 64-bit Kernel/Supervisor/User Segments. If bit is cleared an access to corresponding segment should generate Address Error Exception. However, the guest may still be able to access some pages belonging to the disabled 64-bit segment because we forget to flush QEMU TLB. This patch fixes it. Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
This commit is contained in:
parent
7871abb94c
commit
f93c3a8d0c
2 changed files with 17 additions and 14 deletions
|
@ -23,10 +23,6 @@
|
|||
#include "exec/cpu_ldst.h"
|
||||
#include "sysemu/kvm.h"
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
static inline void cpu_mips_tlb_flush (CPUMIPSState *env, int flush_global);
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Exceptions processing helpers */
|
||||
|
||||
|
@ -1846,15 +1842,6 @@ target_ulong helper_yield(CPUMIPSState *env, target_ulong arg)
|
|||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
/* TLB management */
|
||||
static void cpu_mips_tlb_flush (CPUMIPSState *env, int flush_global)
|
||||
{
|
||||
MIPSCPU *cpu = mips_env_get_cpu(env);
|
||||
|
||||
/* Flush qemu's TLB and discard all shadowed entries. */
|
||||
tlb_flush(CPU(cpu), flush_global);
|
||||
env->tlb->tlb_in_use = env->tlb->nb_tlb;
|
||||
}
|
||||
|
||||
static void r4k_mips_tlb_flush_extra (CPUMIPSState *env, int first)
|
||||
{
|
||||
/* Discard entries from env->tlb[first] onwards. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue