qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/5] translate-all.c: Don't pass puc, locked to


From: Sergey Fedorov
Subject: Re: [Qemu-devel] [PATCH 1/5] translate-all.c: Don't pass puc, locked to tb_invalidate_phys_page()
Date: Mon, 16 May 2016 20:24:15 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2

On 16/05/16 20:15, Peter Maydell wrote:
> On 16 May 2016 at 18:13, Sergey Fedorov <address@hidden> wrote:
>> On 16/05/16 19:09, Peter Maydell wrote:
>>> @@ -1996,7 +1997,10 @@ int page_unprotect(target_ulong address, uintptr_t 
>>> pc, void *puc)
>>>
>>>              /* and since the content will be modified, we must invalidate
>>>                 the corresponding translated code. */
>>> -            tb_invalidate_phys_page(addr, pc, puc, true);
>>> +            if (tb_invalidate_phys_page(addr, pc)) {
>>> +                mmap_unlock();
>>> +                cpu_resume_from_signal(current_cpu, puc);
>>> +            }
>>>  #ifdef DEBUG_TB_CHECK
>>>              tb_invalidate_check(addr);
>>>  #endif
>> Just my 2 cents: we could allow that cpu_resume_from_signal() call and
>> add mmap_lock_reset() similar to tb_lock_reset() to handle resetting
>> mmap_lock after a long jump.
> There's no need -- if you look at the rest of the patchset, that
> call goes away from this function entirely and ends up in the
> caller, at which point this function's handling of the mmap
> lock is the straightforward "lock on entry, unlock before return".

Reviewed-by: Sergey Fedorov <address@hidden>

Thanks,
Sergey



reply via email to

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