From: "Luis Pureza" <pureza@student.dei.uc.pt>
To: Paul Brook <paul@codesourcery.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Weird behavior while using the instruction counter
Date: Thu, 24 Jul 2008 18:58:58 +0100 [thread overview]
Message-ID: <3e1533500807241058p4b8c3011r31a426a726b622d3@mail.gmail.com> (raw)
In-Reply-To: <200807241702.56609.paul@codesourcery.com>
On Thu, Jul 24, 2008 at 5:02 PM, Paul Brook <paul@codesourcery.com> wrote:
>> > I don't think this is correct. If we have chained TBs then the jump cache
>> > entry may have been overwritten by a different TB.
>> > It's also inefficient. If we didn't get here via cpu_exec_nocache then we
>> > can invalidate a TB unnecessarily.
>> >
>> > Anywhere that uses tb_find_pc/cpu_restore_state is probably broken and
>> > will need auditing for the problems I mentioned above.
>>
>> Ok. In the meanwhile, I'll stick with
>>
>> tb2 = env->tb_jmp_cache[tb_jmp_cache_hash_func(tb->pc)];
>> if (tb2 && tb2 != tb && tb2->pc == tb->pc && tb2->cs_base ==
>> tb->cs_base && tb2->flags == tb->flags) {
>> tb_phys_invalidate(tb2, -1);
>> }
>>
>> Unless, of course, you tell me there's something horribly wrong with this
>> :-) Thank you,
>
> If by "horribly wrong" you mean won't work reliably and is just making the bug
> a bit harder to find, then it's no better then the previous change.
> It just avoids a few of the unnecessary (but harmless) invalidations.
I see.
One last try then... Would the invalidation of the original TB by
cpu_exec_nocache() solve the problem (despite being terribly
inefficient)?
Thanks,
Luis Pureza
next prev parent reply other threads:[~2008-07-24 17:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-24 10:42 [Qemu-devel] Weird behavior while using the instruction counter Luis Pureza
2008-07-24 12:44 ` Paul Brook
2008-07-24 13:54 ` Luis Pureza
2008-07-24 14:02 ` Paul Brook
[not found] ` <3e1533500807240742u488272b7x12c4429cbfbb9297@mail.gmail.com>
2008-07-24 14:49 ` Fwd: " Luis Pureza
[not found] ` <200807241556.48810.paul@codesourcery.com>
2008-07-24 15:17 ` Luis Pureza
2008-07-24 16:02 ` Paul Brook
2008-07-24 17:58 ` Luis Pureza [this message]
2008-07-24 23:59 ` Paul Brook
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=3e1533500807241058p4b8c3011r31a426a726b622d3@mail.gmail.com \
--to=pureza@student.dei.uc.pt \
--cc=paul@codesourcery.com \
--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).