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: Peter Maydell
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 18:15:45 +0100

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".

thanks
-- PMM



reply via email to

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