qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC v4 27/28] cputlb: make tlb_reset_dirty safe for MT


From: Richard Henderson
Subject: Re: [Qemu-devel] [RFC v4 27/28] cputlb: make tlb_reset_dirty safe for MTTCG
Date: Thu, 8 Sep 2016 10:34:00 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 08/11/2016 08:24 AM, Alex Bennée wrote:
> The main use case for tlb_reset_dirty is to set the TLB_NOTDIRTY flags
> in TLB entries to force the slow-path on writes. This is used to mark
> page ranges containing code which has been translated so it can be
> invalidated if written to. To do this safely we need to ensure the TLB
> entries in question for all vCPUs are updated before we attempt to run
> the code otherwise a race could be introduced.
> 
> To achieve this we atomically set the flag in tlb_reset_dirty_range and
> take care when setting it when the TLB entry is filled.
> 
> The helper function is made static as it isn't used outside of cputlb.
> 
> Signed-off-by: Alex Bennée <address@hidden>
> ---
>  cputlb.c              | 55 
> +++++++++++++++++++++++++++++++++++----------------
>  include/exec/cputlb.h |  2 --
>  2 files changed, 38 insertions(+), 19 deletions(-)

Reviewed-by: Richard Henderson <address@hidden>


r~



reply via email to

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