qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 03/11] RISC-V: Adding T-Head SYNC instructions


From: Christoph Müllner
Subject: Re: [PATCH 03/11] RISC-V: Adding T-Head SYNC instructions
Date: Fri, 9 Sep 2022 19:21:34 +0200



On Thu, Sep 8, 2022 at 9:30 AM Richard Henderson <richard.henderson@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~

reply via email to

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