From: Kenneth Lee <Kenneth-Lee-2012@foxmail.com>
To: qemu-devel@nongnu.org
Subject: Does the page boundary check still necessary?
Date: Wed, 15 Feb 2023 16:39:51 +0800 [thread overview]
Message-ID: <tencent_F8004464D432CD4CABBADFE9E9493EDF9607@qq.com> (raw)
Hello,
I hope I send this mail to the right place.
I'm porting a new guest arch. It jumps of out of physical page
constantly. So many TBs cannot be chained with goto_tb. I'm wondering
if the following check is still necessary?
bool translator_use_goto_tb(DisasContextBase *db, target_ulong dest)
{
/* Suppress goto_tb if requested. */
if (tb_cflags(db->tb) & CF_NO_GOTO_TB) {
return false;
}
/* Check for the dest on the same page as the start of the TB. */
return ((db->pc_first ^ dest) & TARGET_PAGE_MASK) == 0; <--- Is this check really necessary?
}
Now the chained TBs have been link with tb_link_page(), the chain will
be rebuilt if it is invalidate on page. So why is this check still there?
Acutally, I have tested some use cases with this check removed. It works
fine. Could anybody tell me in what case it is still necessary?
Thanks.
--
-Kenneth
next reply other threads:[~2023-02-15 15:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-15 8:39 Kenneth Lee [this message]
2023-02-15 17:27 ` Does the page boundary check still necessary? Richard Henderson
2023-02-16 1:45 ` Kenneth Lee
2023-02-16 2:26 ` Richard Henderson
2023-02-16 2:28 ` Kenneth Lee
2023-02-16 2:52 ` Richard Henderson
2023-02-16 9:35 ` Kenneth Lee
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=tencent_F8004464D432CD4CABBADFE9E9493EDF9607@qq.com \
--to=kenneth-lee-2012@foxmail.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).