From: Thomas Huth <1128935@bugs.launchpad.net>
To: qemu-devel@nongnu.org
Subject: [Bug 1128935] Re: MIPS r4k "TLB modified exception" generated for TLB entries that are not visible to the TLBP instruction
Date: Mon, 03 May 2021 11:28:06 -0000 [thread overview]
Message-ID: <162004128705.3909.8924140822444838619.malone@chaenomeles.canonical.com> (raw)
In-Reply-To: 20130218102749.9311.80891.malonedeb@gac.canonical.com
This is an automated cleanup. This bug report has been moved to QEMU's
new bug tracker on gitlab.com and thus gets marked as 'expired' now.
Please continue with the discussion here:
https://gitlab.com/qemu-project/qemu/-/issues/94
** Changed in: qemu
Status: New => Expired
** Bug watch added: gitlab.com/qemu-project/qemu/-/issues #94
https://gitlab.com/qemu-project/qemu/-/issues/94
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1128935
Title:
MIPS r4k "TLB modified exception" generated for TLB entries that are
not visible to the TLBP instruction
Status in HelenOS branches:
New
Status in QEMU:
Expired
Bug description:
I occasionally see that the TLBP instruction fails to find the
corresponding TLB entry in the TLB Modified exception handler. This
behavior is unexpected, because the invocation of the TLB Modified
exception suggests there indeed is such an entry in the TLB and only
requires its dirty bit to be set.
The operating system which can trigger and is susceptible to this
behavior is a HelenOS branch located in lp:~jakub/helenos/mips-malta.
The QEMU version on which this is reproducible is QEMU 1.4.0 and also
some others.
When I looked into the QEMU sources, I noticed the following
discrepancy, which could potentially explain the behavior:
65 /* MIPS32/MIPS64 R4000-style MMU emulation */
66 int r4k_map_address (CPUMIPSState *env, hwaddr *physical, int *prot,
67 target_ulong address, int rw, int access_type)
68 {
<snip>
72 for (i = 0; i < env->tlb->tlb_in_use; i++) {
1865 void r4k_helper_tlbp(CPUMIPSState *env)
1866 {
<snip>
1875 for (i = 0; i < env->tlb->nb_tlb; i++) {
From the above it appears as if the the code which searches the TLB
for a matching entry searched also the QEMU-specific "shadow" TLB
entries, which is, however, not in line with how the TLBP instruction
searches the TLB. So if a matching entry is found on index >=
tlb_in_use, the HelenOS exception handler using TLBP to locate the
entry would hit an assertion on seeing the Index register bit P set.
I also suspect there is a similar issue with the TLB Invalid
exception, but thanks to the specifics of the MIPS 4Kc CPU, HelenOS is
not susceptible in this case.
To manage notifications about this bug go to:
https://bugs.launchpad.net/helenos/+bug/1128935/+subscriptions
prev parent reply other threads:[~2021-05-03 11:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20130218102749.9311.80891.malonedeb@gac.canonical.com>
2013-04-04 17:34 ` [Qemu-devel] [Bug 1128935] qemu IA64 emulation Gigi D'Agostino
2013-04-04 18:24 ` [Qemu-devel] [Bug 1128935] " Jakub Jermar
2013-04-06 9:31 ` agraf
2013-04-06 16:01 ` Gigi D'Agostino
2013-04-06 17:01 ` Blue Swirl
2013-04-06 17:26 ` Jakub Jermar
2017-12-15 16:25 ` [Qemu-devel] [Bug 1128935] Re: MIPS r4k "TLB modified exception" generated for TLB entries that are not visible to the TLBP instruction Thomas Huth
2017-12-15 16:50 ` Jakub Jermar
2017-12-15 16:54 ` Jakub Jermar
2017-12-15 17:07 ` Jakub Jermar
2021-05-03 11:28 ` Thomas Huth [this message]
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=162004128705.3909.8924140822444838619.malone@chaenomeles.canonical.com \
--to=1128935@bugs.launchpad.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.