On Thu, Sep 8, 2022 at 9:30 AM Richard Henderson < richard.hender...@linaro.org> wrote:
> On 9/6/22 13:22, Christoph Muellner wrote: > > +NOP_PRIVCHECK(th_sfence_vmas, REQUIRE_PRIV_MHS) > > +NOP_PRIVCHECK(th_sync, REQUIRE_PRIV_MHSU) > > +NOP_PRIVCHECK(th_sync_i, REQUIRE_PRIV_MHSU) > > +NOP_PRIVCHECK(th_sync_is, REQUIRE_PRIV_MHSU) > > +NOP_PRIVCHECK(th_sync_s, REQUIRE_PRIV_MHSU) > > These should not be nops: th_sfence_vmas requires a tlb flush; > th.sync{,.i} needs to end > the current translation block; th.sync.{s,is} needs multiprocessor sync, > which involves a > call to async_safe_run_on_cpu. > Understood. For a new revision, I'll do the following: * th_sfence_vmas: async_safe_run_on_cpu() with run_on_cpu_func which flushes TLB on all CPUs (similar like trans_sfence_vma()) * th_sync/th_sync_i: end the TB (similar like trans_fence_i()) * th_sync_s/th_sync_is: async_safe_run_on_cpu() with run_on_cpu_func which ends the TB (similar like trans_fence_i()) Thanks! > > > r~ >