From: Qingfang Deng <qingfang.deng@linux.dev>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Linux-Arch <linux-arch@vger.kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Anshuman Khandual <anshuman.khandual@arm.com>,
Vikram Sethi <vsethi@nvidia.com>, Mike Rapoport <rppt@kernel.org>,
Shanker Donthineni <sdonthineni@nvidia.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] arm64: use generic MMIO accessors
Date: Sun, 20 Sep 2026 17:24:58 +0800 [thread overview]
Message-ID: <9895e60c-6a3c-40c8-b188-51891ee6b216@linux.dev> (raw)
In-Reply-To: <5847c824-8d69-4d02-af2f-896bf47f0732@app.fastmail.com>
Hi,
On 2026/9/20 16:08, Arnd Bergmann wrote:
> On Sun, Sep 20, 2026, at 03:43, Qingfang Deng wrote:
>> Use the generic raw write accessors in place of the inline assembly
>> stores. Include asm-generic/mmio.h after the arm64 ordering hooks so
>> these accessors are also available to the write-combining helpers
>> before asm-generic/io.h is included.
>>
>> Retain the raw read overrides when either the Cortex-A57 erratum 832075
>> or NVIDIA Olympus erratum 1027 workaround is configured. This preserves
>> the alternative-patched load-acquire instructions and pre-load barriers.
>> Use generic raw reads when neither workaround is enabled.
>>
>> Assisted-by: Codex:gpt-6-astra
>> Signed-off-by: Qingfang Deng <qingfang.deng@linux.dev>
> Sorry, this is no good, we need the compiler to issue the exact
> instructions from the inline asm here, both in order to guarantee
> these can be virtualized, and to prevent it from splitting up
> larger register accesses into byte load/store on unaligned pointers.
You're right about virtualization: an AArch64 compiler can generate
writeback addressing loads/stores, which KVM's MMIO handler does not
support.
Regarding unaligned accesses, the splitting can only happen when the
address is known to be unaligned at compile-time. Do these accessors
need to support unaligned MMIO? If so, I could add
OPTIMIZER_HIDE_VAR(addr) to the generic accessors.
Best regards,
Qingfang
next prev parent reply other threads:[~2026-09-20 9:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-20 1:43 [PATCH v2 1/3] asm-generic: split MMIO accessors out of io.h Qingfang Deng
2026-09-20 1:43 ` [PATCH v2 2/3] riscv: use generic MMIO accessors Qingfang Deng
2026-09-20 8:11 ` Arnd Bergmann
2026-09-20 1:43 ` [PATCH v2 3/3] arm64: " Qingfang Deng
2026-09-20 8:08 ` Arnd Bergmann
2026-09-20 9:24 ` Qingfang Deng [this message]
2026-09-20 9:30 ` Arnd Bergmann
2026-09-20 9:35 ` Arnd Bergmann
2026-09-20 8:13 ` [PATCH v2 1/3] asm-generic: split MMIO accessors out of io.h Arnd Bergmann
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=9895e60c-6a3c-40c8-b188-51891ee6b216@linux.dev \
--to=qingfang.deng@linux.dev \
--cc=anshuman.khandual@arm.com \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=rppt@kernel.org \
--cc=sdonthineni@nvidia.com \
--cc=vsethi@nvidia.com \
--cc=will@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®