[PATCH 6.6 4/4] riscv: Use accessors to page table entries instead of direct dereference
Greg KH
gregkh at linuxfoundation.org
Sun Sep 8 07:10:19 PDT 2024
On Fri, Sep 06, 2024 at 04:22:39PM +0800, WangYuli wrote:
> From: Alexandre Ghiti <alexghiti at rivosinc.com>
>
> [ Upstream commit edf955647269422e387732870d04fc15933a25ea ]
>
> As very well explained in commit 20a004e7b017 ("arm64: mm: Use
> READ_ONCE/WRITE_ONCE when accessing page tables"), an architecture whose
> page table walker can modify the PTE in parallel must use
> READ_ONCE()/WRITE_ONCE() macro to avoid any compiler transformation.
>
> So apply that to riscv which is such architecture.
>
> Signed-off-by: Alexandre Ghiti <alexghiti at rivosinc.com>
> Acked-by: Anup Patel <anup at brainfault.org>
> Link: https://lore.kernel.org/r/20231213203001.179237-5-alexghiti@rivosinc.com
> Signed-off-by: Palmer Dabbelt <palmer at rivosinc.com>
> Signed-off-by: WangYuli <wangyuli at uniontech.com>
> ---
all now queued up, thanks.
greg k-h
More information about the kvm-riscv
mailing list