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: Richard Henderson
Subject: Re: Does the page boundary check still necessary?
Date: Wed, 15 Feb 2023 07:27:19 -1000
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.


r~



reply via email to

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