From: Greg KH <gregkh@linuxfoundation.org>
To: kvm-riscv@lists.infradead.org
Subject: [PATCH 6.6 4/4] riscv: Use accessors to page table entries instead of direct dereference
Date: Sun, 8 Sep 2024 16:10:19 +0200 [thread overview]
Message-ID: <2024090808-elusive-deviate-3bbb@gregkh> (raw)
In-Reply-To: <D68939319C9C81B0+20240906082254.435410-4-wangyuli@uniontech.com>
On Fri, Sep 06, 2024 at 04:22:39PM +0800, WangYuli wrote:
> From: Alexandre Ghiti <alexghiti@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@rivosinc.com>
> Acked-by: Anup Patel <anup@brainfault.org>
> Link: https://lore.kernel.org/r/20231213203001.179237-5-alexghiti at rivosinc.com
> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
> Signed-off-by: WangYuli <wangyuli@uniontech.com>
> ---
all now queued up, thanks.
greg k-h
WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <gregkh@linuxfoundation.org>
To: WangYuli <wangyuli@uniontech.com>
Cc: stable@vger.kernel.org, sashal@kernel.org,
alexghiti@rivosinc.com, palmer@rivosinc.com,
paul.walmsley@sifive.com, palmer@dabbelt.com,
aou@eecs.berkeley.edu, anup@brainfault.org,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
rdunlap@infradead.org, dvlachos@ics.forth.gr, bhe@redhat.com,
samuel.holland@sifive.com, guoren@kernel.org,
linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org,
willy@infradead.org, akpm@linux-foundation.org,
fengwei.yin@intel.com, prabhakar.mahadev-lad.rj@bp.renesas.com,
conor.dooley@microchip.com, glider@google.com, elver@google.com,
dvyukov@google.com, kasan-dev@googlegroups.com, ardb@kernel.org,
linux-efi@vger.kernel.org, atishp@atishpatra.org,
kvm@vger.kernel.org, kvm-riscv@lists.infradead.org,
qiaozhe@iscas.ac.cn, ryan.roberts@arm.com,
ryabinin.a.a@gmail.com, andreyknvl@gmail.com,
vincenzo.frascino@arm.com, namcao@linutronix.de
Subject: Re: [PATCH 6.6 4/4] riscv: Use accessors to page table entries instead of direct dereference
Date: Sun, 8 Sep 2024 16:10:19 +0200 [thread overview]
Message-ID: <2024090808-elusive-deviate-3bbb@gregkh> (raw)
In-Reply-To: <D68939319C9C81B0+20240906082254.435410-4-wangyuli@uniontech.com>
On Fri, Sep 06, 2024 at 04:22:39PM +0800, WangYuli wrote:
> From: Alexandre Ghiti <alexghiti@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@rivosinc.com>
> Acked-by: Anup Patel <anup@brainfault.org>
> Link: https://lore.kernel.org/r/20231213203001.179237-5-alexghiti@rivosinc.com
> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
> Signed-off-by: WangYuli <wangyuli@uniontech.com>
> ---
all now queued up, thanks.
greg k-h
WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <gregkh@linuxfoundation.org>
To: WangYuli <wangyuli@uniontech.com>
Cc: stable@vger.kernel.org, sashal@kernel.org,
alexghiti@rivosinc.com, palmer@rivosinc.com,
paul.walmsley@sifive.com, palmer@dabbelt.com,
aou@eecs.berkeley.edu, anup@brainfault.org,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
rdunlap@infradead.org, dvlachos@ics.forth.gr, bhe@redhat.com,
samuel.holland@sifive.com, guoren@kernel.org,
linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org,
willy@infradead.org, akpm@linux-foundation.org,
fengwei.yin@intel.com, prabhakar.mahadev-lad.rj@bp.renesas.com,
conor.dooley@microchip.com, glider@google.com, elver@google.com,
dvyukov@google.com, kasan-dev@googlegroups.com, ardb@kernel.org,
linux-efi@vger.kernel.org, atishp@atishpatra.org,
kvm@vger.kernel.org, kvm-riscv@lists.infradead.org,
qiaozhe@iscas.ac.cn, ryan.roberts@arm.com,
ryabinin.a.a@gmail.com, andreyknvl@gmail.com,
vincenzo.frascino@arm.com, namcao@linutronix.de
Subject: Re: [PATCH 6.6 4/4] riscv: Use accessors to page table entries instead of direct dereference
Date: Sun, 8 Sep 2024 16:10:19 +0200 [thread overview]
Message-ID: <2024090808-elusive-deviate-3bbb@gregkh> (raw)
In-Reply-To: <D68939319C9C81B0+20240906082254.435410-4-wangyuli@uniontech.com>
On Fri, Sep 06, 2024 at 04:22:39PM +0800, WangYuli wrote:
> From: Alexandre Ghiti <alexghiti@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@rivosinc.com>
> Acked-by: Anup Patel <anup@brainfault.org>
> Link: https://lore.kernel.org/r/20231213203001.179237-5-alexghiti@rivosinc.com
> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
> Signed-off-by: WangYuli <wangyuli@uniontech.com>
> ---
all now queued up, thanks.
greg k-h
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2024-09-08 14:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240906082254.435410-1-wangyuli@uniontech.com>
2024-09-06 8:22 ` [PATCH 6.6 2/4] mm: Introduce pudp/p4dp/pgdp_get() functions WangYuli
2024-09-06 8:22 ` WangYuli
2024-09-06 8:22 ` WangYuli
2024-09-06 8:22 ` [PATCH 6.6 3/4] riscv: mm: Only compile pgtable.c if MMU WangYuli
2024-09-06 8:22 ` WangYuli
2024-09-06 8:22 ` WangYuli
2024-09-06 8:22 ` [PATCH 6.6 4/4] riscv: Use accessors to page table entries instead of direct dereference WangYuli
2024-09-06 8:22 ` WangYuli
2024-09-06 8:22 ` WangYuli
2024-09-08 14:10 ` Greg KH [this message]
2024-09-08 14:10 ` Greg KH
2024-09-08 14:10 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2024090808-elusive-deviate-3bbb@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=kvm-riscv@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.