qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 10/45] translate-all: guarantee that tb_hash


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v2 10/45] translate-all: guarantee that tb_hash only holds valid TBs
Date: Mon, 17 Jul 2017 19:29:57 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 07/17/2017 06:54 PM, Emilio G. Cota wrote:
What threw me off was that in lookup_tb_ptr we're not checking tb->invalid,
and that biased me into thinking that it's not needed. But I should have
tried harder. Also, that's a bug, and yet another reason to have tb_lookup,
so that we fix these things at once in one place.

Yes, me as well.  Quite right we need only one copy of this code.

         (tb->flags & (CF_HASH_MASK | CF_INVALID)) == cf_mask

So that we continue to check CF_INVALID each time we lookup a TB, but now we
get it for free as a part of the other flags check.

With the annoying atomic_read thrown in there :-) but yes, will do.

Yes of course.  ;-)


r~



reply via email to

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