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 <alex.ben...@linaro.org> > --- > cputlb.c | 55 > +++++++++++++++++++++++++++++++++++---------------- > include/exec/cputlb.h | 2 -- > 2 files changed, 38 insertions(+), 19 deletions(-)
Reviewed-by: Richard Henderson <r...@twiddle.net> r~