[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with
From: |
Laurent Desnogues |
Subject: |
Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with xxhash |
Date: |
Tue, 5 Apr 2016 18:33:53 +0200 |
On Tue, Apr 5, 2016 at 5:41 PM, Richard Henderson <address@hidden> wrote:
> On 04/04/2016 10:30 PM, Emilio G. Cota wrote:
>>
>> Tests show that the other element checked for in tb_find_physical,
>> cs_base, is always a match when tb_phys+pc+flags are a match,
>> so hashing cs_base is wasteful. It could be that this is an ARM-only
>> thing, though.
>
>
> The cs_base field is only used by i386 (in 16-bit modes), and sparc (for a
> TB consisting of only a delay slot).
>
> It may well still turn out to be reasonable to ignore cs_base for hashing.
>
>> +static inline
>> +uint32_t tb_hash_func(tb_page_addr_t phys_pc, target_ulong pc, uint64_t
>> flags)
>> {
>> - return (pc >> 2) & (CODE_GEN_PHYS_HASH_SIZE - 1);
>> + struct key {
>> + tb_page_addr_t phys_pc;
>> + target_ulong pc;
>> + uint64_t flags;
>
>
> The flags field should be uint32_t, not uint64_t.
> See its definition in TranslationBlock.
The 'flags' field is 64-bit. You're thinking of cflags, I guess.
Laurent
- Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with xxhash, (continued)
- Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with xxhash, Richard Henderson, 2016/04/05
- Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with xxhash, Emilio G. Cota, 2016/04/05
- Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with xxhash, Richard Henderson, 2016/04/05
- Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with xxhash, Emilio G. Cota, 2016/04/05
- Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with xxhash, Paolo Bonzini, 2016/04/06
- Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with xxhash, Emilio G. Cota, 2016/04/06
- Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with xxhash, Paolo Bonzini, 2016/04/06
- Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with xxhash, Richard Henderson, 2016/04/06
- Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with xxhash, Emilio G. Cota, 2016/04/06
- Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with xxhash, Paolo Bonzini, 2016/04/07
- Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with xxhash,
Laurent Desnogues <=
- Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with xxhash, Richard Henderson, 2016/04/05
- Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with xxhash, Laurent Desnogues, 2016/04/06
- Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with xxhash, Emilio G. Cota, 2016/04/06
- Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with xxhash, Richard Henderson, 2016/04/06
- Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with xxhash, Laurent Desnogues, 2016/04/07
Re: [Qemu-devel] [PATCH 00/10] tb hash improvements, Alex Bennée, 2016/04/05
Re: [Qemu-devel] [PATCH 00/10] tb hash improvements, Paolo Bonzini, 2016/04/05