[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v8 16/25] cputlb and arm/sparc targets: convert
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [PATCH v8 16/25] cputlb and arm/sparc targets: convert mmuidx flushes from varg to bitmap |
Date: |
Wed, 01 Feb 2017 11:03:19 +0000 |
User-agent: |
mu4e 0.9.19; emacs 25.1.91.6 |
Richard Henderson <address@hidden> writes:
> On 01/27/2017 02:39 AM, Alex Bennée wrote:
>> + for (mmu_idx = 0; mmu_idx < NB_MMU_MODES; mmu_idx++) {
>>
>> - tlb_debug("%d\n", mmu_idx);
>> + if (test_bit(mmu_idx, &mmu_idx_bitmask)) {
>> + tlb_debug("%d\n", mmu_idx);
>>
>> - memset(env->tlb_table[mmu_idx], -1, sizeof(env->tlb_table[0]));
>> - memset(env->tlb_v_table[mmu_idx], -1, sizeof(env->tlb_v_table[0]));
>> + memset(env->tlb_table[mmu_idx], -1, sizeof(env->tlb_table[0]));
>> + memset(env->tlb_v_table[mmu_idx], -1,
>> sizeof(env->tlb_v_table[0]));
>> + }
>
> Perhaps it doesn't matter since NB_MMU_MODES is so small but
>
> for (; idxmap != 0; idxmap &= idxmap - 1) {
> int mmu_idx = ctz32(idxmap);
> ...
> }
Perhaps but if it is OK with you I'll skip this optimisation for now? We
are basically in the slow path by this point and for clarity I'd prefer
to keep it as is.
--
Alex Bennée