qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Does the page boundary check still necessary?
@ 2023-02-15  8:39 Kenneth Lee
  2023-02-15 17:27 ` Richard Henderson
  0 siblings, 1 reply; 7+ messages in thread
From: Kenneth Lee @ 2023-02-15  8:39 UTC (permalink / raw)
  To: qemu-devel

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-02-16  9:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-15  8:39 Does the page boundary check still necessary? Kenneth Lee
2023-02-15 17:27 ` 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

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).