[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 05/16] translate-all: iterate over TBs in a page
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 05/16] translate-all: iterate over TBs in a page with PAGE_FOR_EACH_TB |
Date: |
Wed, 28 Feb 2018 13:40:15 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 02/26/2018 09:39 PM, Emilio G. Cota wrote:
> +/* list iterators for lists of tagged pointers in TranslationBlock */
> +#define TB_FOR_EACH_TAGGED(head, tb, n, field) \
> + for (n = (head) & 1, \
> + tb = (TranslationBlock *)((head) & ~1); \
> + tb; \
> + tb = (TranslationBlock *)tb->field[n], \
> + n = (uintptr_t)tb & 1, \
> + tb = (TranslationBlock *)((uintptr_t)tb & ~1))
> +
> +#define PAGE_FOR_EACH_TB(pagedesc, tb, n) \
> + TB_FOR_EACH_TAGGED((pagedesc)->first_tb, tb, n, page_next)
> +
I'm not sure I like the generalization of TB_FOR_EACH_TAGGED. Do you use it
for anything besides PAGE_FOR_EACH_TB?
Weird indentation in the clauses.
Otherwise,
Reviewed-by: Richard Henderson <address@hidden>
r~
- Re: [Qemu-devel] [PATCH 06/16] translate-all: make l1_map lockless, (continued)
- [Qemu-devel] [PATCH 09/16] translate-all: move tb_invalidate_phys_page_range up in the file, Emilio G. Cota, 2018/02/27
- [Qemu-devel] [PATCH 12/16] translate-all: discard TB when tb_link_page returns an existing matching TB, Emilio G. Cota, 2018/02/27
- [Qemu-devel] [PATCH 01/16] qht: require a default comparison function, Emilio G. Cota, 2018/02/27
- [Qemu-devel] [PATCH 11/16] translate-all: add page_collection assertions, Emilio G. Cota, 2018/02/27
- [Qemu-devel] [PATCH 15/16] translate-all: remove tb_lock mention from cpu_restore_state_from_tb, Emilio G. Cota, 2018/02/27
- [Qemu-devel] [PATCH 14/16] cputlb: remove tb_lock from tlb_flush functions, Emilio G. Cota, 2018/02/27
- [Qemu-devel] [PATCH 05/16] translate-all: iterate over TBs in a page with PAGE_FOR_EACH_TB, Emilio G. Cota, 2018/02/27
- Re: [Qemu-devel] [PATCH 05/16] translate-all: iterate over TBs in a page with PAGE_FOR_EACH_TB,
Richard Henderson <=
- [Qemu-devel] [PATCH 03/16] tcg: track TBs with per-region BST's, Emilio G. Cota, 2018/02/27
- [Qemu-devel] [PATCH 10/16] translate-all: use per-page locking in !user-mode, Emilio G. Cota, 2018/02/27
- [Qemu-devel] [PATCH 16/16] tcg: remove tb_lock, Emilio G. Cota, 2018/02/27