[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: |
Emilio G. Cota |
Subject: |
Re: [Qemu-devel] [PATCH v2 10/45] translate-all: guarantee that tb_hash only holds valid TBs |
Date: |
Tue, 18 Jul 2017 19:30:35 -0400 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Mon, Jul 17, 2017 at 19:29:57 -1000, Richard Henderson wrote:
> 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. ;-)
Gaah, we'll need to update all readers of tb->cflags, of which we have
plenty (~145, mostly in target code) to avoid C11 undefined behaviour
and make Paolo happy.
Should I do those updates in the same patch where tb->invalid is brought
over to cflags? Alternatives: have a later patch where all readers
are converted to atomic_read, or keep tb->invalid as a separate field (we
could use that 4-byte hole in struct tb_tc..)
E.
- [Qemu-devel] [PATCH v2 40/45] osdep: introduce qemu_mprotect_rwx/none, (continued)
- [Qemu-devel] [PATCH v2 40/45] osdep: introduce qemu_mprotect_rwx/none, Emilio G. Cota, 2017/07/16
- [Qemu-devel] [PATCH v2 32/45] tcg: take tb_ctx out of TCGContext, Emilio G. Cota, 2017/07/16
- [Qemu-devel] [PATCH v2 10/45] translate-all: guarantee that tb_hash only holds valid TBs, Emilio G. Cota, 2017/07/16
- Re: [Qemu-devel] [PATCH v2 10/45] translate-all: guarantee that tb_hash only holds valid TBs, Richard Henderson, 2017/07/17
- Re: [Qemu-devel] [PATCH v2 10/45] translate-all: guarantee that tb_hash only holds valid TBs, Emilio G. Cota, 2017/07/17
- Re: [Qemu-devel] [PATCH v2 10/45] translate-all: guarantee that tb_hash only holds valid TBs, Richard Henderson, 2017/07/17
- Re: [Qemu-devel] [PATCH v2 10/45] translate-all: guarantee that tb_hash only holds valid TBs, Emilio G. Cota, 2017/07/18
- Re: [Qemu-devel] [PATCH v2 10/45] translate-all: guarantee that tb_hash only holds valid TBs, Richard Henderson, 2017/07/18
- Re: [Qemu-devel] [PATCH v2 10/45] translate-all: guarantee that tb_hash only holds valid TBs,
Emilio G. Cota <=
- Re: [Qemu-devel] [PATCH v2 10/45] translate-all: guarantee that tb_hash only holds valid TBs, Richard Henderson, 2017/07/18
[Qemu-devel] [PATCH v2 29/45] exec-all: rename tb_free to tb_remove, Emilio G. Cota, 2017/07/16
[Qemu-devel] [PATCH v2 14/45] tcg: define CF_PARALLEL and use it for TB hashing, Emilio G. Cota, 2017/07/16
[Qemu-devel] [PATCH v2 35/45] gen-icount: fold exitreq_label into TCGContext, Emilio G. Cota, 2017/07/16
[Qemu-devel] [PATCH v2 16/45] target/hppa: check CF_PARALLEL instead of parallel_cpus, Emilio G. Cota, 2017/07/16
[Qemu-devel] [PATCH v2 15/45] target/arm: check CF_PARALLEL instead of parallel_cpus, Emilio G. Cota, 2017/07/16