qemu-devel
[Top][All Lists]
Advanced

[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: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v8 16/25] cputlb and arm/sparc targets: convert mmuidx flushes from varg to bitmap
Date: Wed, 1 Feb 2017 10:03:12 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0

On 02/01/2017 03:03 AM, Alex Bennée wrote:
> 
> 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.

That's fine.


r~




reply via email to

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