From: Yongbok Kim <yongbok.kim@imgtec.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
James Hogan <james.hogan@imgtec.com>,
Aurelien Jarno <aurelien@aurel32.net>
Subject: [Qemu-devel] [PULL 03/14] target/mips: Weaken TLB flush on UX, SX, KX, ASID changes
Date: Fri, 21 Jul 2017 03:37:04 +0100 [thread overview]
Message-ID: <1500604635-15027-4-git-send-email-yongbok.kim@imgtec.com> (raw)
In-Reply-To: <1500604635-15027-1-git-send-email-yongbok.kim@imgtec.com>
From: James Hogan <james.hogan@imgtec.com>
There is no need to invalidate any shadow TLB entries when the ASID
changes or when access to one of the 64-bit segments has been disabled,
since doing so doesn't reveal to software whether any TLB entries have
been evicted into the shadow half of the TLB.
Therefore weaken the tlb flushes in these cases to only flush the QEMU
TLB.
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Yongbok Kim <yongbok.kim@imgtec.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Yongbok Kim <yongbok.kim@imgtec.com>
Signed-off-by: Yongbok Kim <yongbok.kim@imgtec.com>
---
target/mips/helper.c | 2 +-
target/mips/op_helper.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/mips/helper.c b/target/mips/helper.c
index 166f0d1..11d6a86 100644
--- a/target/mips/helper.c
+++ b/target/mips/helper.c
@@ -290,7 +290,7 @@ void cpu_mips_store_status(CPUMIPSState *env, target_ulong val)
#if defined(TARGET_MIPS64)
if ((env->CP0_Status ^ old) & (old & (7 << CP0St_UX))) {
/* Access to at least one of the 64-bit segments has been disabled */
- cpu_mips_tlb_flush(env);
+ tlb_flush(CPU(mips_env_get_cpu(env)));
}
#endif
if (env->CP0_Config3 & (1 << CP0C3_MT)) {
diff --git a/target/mips/op_helper.c b/target/mips/op_helper.c
index 6393eff..091afd5 100644
--- a/target/mips/op_helper.c
+++ b/target/mips/op_helper.c
@@ -1416,7 +1416,7 @@ void helper_mtc0_entryhi(CPUMIPSState *env, target_ulong arg1)
/* If the ASID changes, flush qemu's TLB. */
if ((old & env->CP0_EntryHi_ASID_mask) !=
(val & env->CP0_EntryHi_ASID_mask)) {
- cpu_mips_tlb_flush(env);
+ tlb_flush(CPU(mips_env_get_cpu(env)));
}
}
--
2.7.4
next prev parent reply other threads:[~2017-07-21 2:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-21 2:37 [Qemu-devel] [PULL 00/14] target-mips queue Yongbok Kim
2017-07-21 2:37 ` [Qemu-devel] [PULL 01/14] target/mips: Fix MIPS64 MFC0 UserLocal on BE host Yongbok Kim
2017-07-21 2:37 ` [Qemu-devel] [PULL 02/14] target/mips: Fix TLBWI shadow flush for EHINV, XI, RI Yongbok Kim
2017-07-21 2:37 ` Yongbok Kim [this message]
2017-07-21 2:37 ` [Qemu-devel] [PULL 04/14] target/mips: Add CP0_Ebase.WG (write gate) support Yongbok Kim
2017-07-21 2:37 ` [Qemu-devel] [PULL 05/14] target/mips: Prepare loads/stores for EVA Yongbok Kim
2017-07-21 2:37 ` [Qemu-devel] [PULL 06/14] target/mips: Decode MIPS32 EVA load & store instructions Yongbok Kim
2017-07-21 2:37 ` [Qemu-devel] [PULL 07/14] target/mips: Decode microMIPS " Yongbok Kim
2017-07-21 2:37 ` [Qemu-devel] [PULL 08/14] target/mips: Check memory permissions with mem_idx Yongbok Kim
2017-07-21 2:37 ` [Qemu-devel] [PULL 09/14] target/mips: Abstract mmu_idx from hflags Yongbok Kim
2017-07-21 2:37 ` [Qemu-devel] [PULL 10/14] target/mips: Add an MMU mode for ERL Yongbok Kim
2017-07-21 2:37 ` [Qemu-devel] [PULL 11/14] target/mips: Add segmentation control registers Yongbok Kim
2017-07-21 2:37 ` [Qemu-devel] [PULL 12/14] target/mips: Implement segmentation control Yongbok Kim
2017-07-21 2:37 ` [Qemu-devel] [PULL 13/14] target/mips: Add EVA support to P5600 Yongbok Kim
2017-07-21 2:37 ` [Qemu-devel] [PULL 14/14] target/mips: Enable CP0_EBase.WG on MIPS64 CPUs Yongbok Kim
2017-07-21 13:08 ` [Qemu-devel] [PULL 00/14] target-mips queue Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1500604635-15027-4-git-send-email-yongbok.kim@imgtec.com \
--to=yongbok.kim@imgtec.com \
--cc=aurelien@aurel32.net \
--cc=james.hogan@imgtec.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).