qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does the page boundary check still necessary?


From: Kenneth Lee
Subject: Re: Does the page boundary check still necessary?
Date: Thu, 16 Feb 2023 09:45:09 +0800

On Wed, Feb 15, 2023 at 07:27:19AM -1000, Richard Henderson wrote:
> Date: Wed, 15 Feb 2023 07:27:19 -1000
> From: Richard Henderson <richard.henderson@linaro.org>
> To: Kenneth Lee <Kenneth-Lee-2012@foxmail.com>, qemu-devel@nongnu.org
> Subject: Re: Does the page boundary check still necessary?
> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
>  Thunderbird/102.7.1
> 
> On 2/14/23 22:39, Kenneth Lee wrote:
> > 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?
> 
> Even for a guest which doesn't use paging, and therefore does not need to
> worry about memory maps changing, we still enable breakpoints and
> watchpoints on a per-page basis.
> 

Thank you. So is this the only reason? May I write a fine grained
checking to remove this limitation?

> 
> r~

-- 
                        -Ken



reply via email to

[Prev in Thread] Current Thread [Next in Thread]