From: "Aiqun(Maria) Yu" <quic_aiquny@quicinc.com>
To: Marc Zyngier <maz@kernel.org>
Cc: <will@kernel.org>, <corbet@lwn.net>, <catalin.marinas@arm.com>,
<quic_pkondeti@quicinc.com>, <quic_kaushalk@quicinc.com>,
<quic_satyap@quicinc.com>, <quic_shashim@quicinc.com>,
<quic_songxue@quicinc.com>, <linux-doc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] arm64: Add the arm64.nolse_atomics command line option
Date: Wed, 12 Jul 2023 16:03:36 +0800 [thread overview]
Message-ID: <c38179ec-ff16-7b38-8124-87d009aafac8@quicinc.com> (raw)
In-Reply-To: <87h6q9a8pu.wl-maz@kernel.org>
On 7/12/2023 3:29 PM, Marc Zyngier wrote:
> On Wed, 12 Jul 2023 03:47:55 +0100,
> "Aiqun(Maria) Yu" <quic_aiquny@quicinc.com> wrote:
>>
>> On 7/11/2023 6:38 PM, Marc Zyngier wrote:
>>> On Tue, 11 Jul 2023 11:12:48 +0100,
>>> "Aiqun(Maria) Yu" <quic_aiquny@quicinc.com> wrote:
>>>>
>>>> For the KVM part, per my understanding, as long as the current feature
>>>> id being overriden, the KVM system also get the current vcpu without
>>>> the lse atomic feature enabled.
>>>> KVM vcpu will read the sys reg from host arm64_ftr_regs which is
>>>> already been controled by the idreg_overrides.
>>>
>>> You're completely missing the point.
>>>
>>> The guest is free to map memory as non-cacheable *and* to use LSE
>>> atomics even if the idregs pretend this is not available. At which
>> The guest also can have the current linux kernel mechanism of LSE
>> ATOMIC way.
>
> [snip useless diagrams]
>
> Yes, the guest can do the right thing. The guest, a totally
> unprivileged piece of SW, can also ignore the idregs and take the
> whole machine down because your HW is broken.
>
if the guest ignore the idregs, it is not supported by the current Linux
KVM id reg emulation as well. The similar rule is applied to other cpu
feature as well.
So it can be an expected machine down because of this.
We want to support/utilize the current HW with current inline runtime
patching for lse atomic ops.
>> Just like other KVM vcpu cpu features, lse atomic can be a feature
>> inherit from the pysical cpu features for the KVM vcpus.
>
> See above. Your reasoning applies to a well behaved guest, which is
> the *wrong* way to reason about these things.
The feature supported is not always that *freely* even for current cpu
features as well.
Our current target is that the software can utilize the HW as best as
software can.
The current HW can be possible with Generic common Image with other cpu
which support lse atomic. So the Image can have inline runtime patching
for lse atomic operations. And from software side it can have option to
support this.
For example, for current newer memory controller the far lse atomic
operations is supported, and the atomic operation is not limited to
non-cached memory mapping as well.
Also the lse atomic instead of FWB performance in specific scenarios can
be different with current hardware design as well.
we are trying to do possible improvement with HW design change instead
of ruin it.
Feel free to comment if it is not same understanding.
>
> M.
>
--
Thx and BRs,
Aiqun(Maria) Yu
next prev parent reply other threads:[~2023-07-12 8:04 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-10 5:59 Maria Yu
2023-07-10 6:07 ` Randy Dunlap
2023-07-10 6:13 ` Aiqun(Maria) Yu
2023-07-10 7:27 ` Marc Zyngier
2023-07-10 8:19 ` Aiqun(Maria) Yu
2023-07-10 9:31 ` Marc Zyngier
2023-07-11 3:30 ` Aiqun(Maria) Yu
2023-07-11 6:57 ` Marc Zyngier
2023-07-11 10:12 ` Aiqun(Maria) Yu
2023-07-11 10:38 ` Marc Zyngier
2023-07-12 2:47 ` Aiqun(Maria) Yu
2023-07-12 7:29 ` Marc Zyngier
2023-07-12 8:03 ` Aiqun(Maria) Yu [this message]
2023-07-10 9:37 ` Will Deacon
2023-07-11 4:02 ` Aiqun(Maria) Yu
2023-07-11 8:22 ` Will Deacon
2023-07-11 10:15 ` Aiqun(Maria) Yu
2023-07-11 10:25 ` Will Deacon
2023-07-12 3:09 ` Aiqun(Maria) Yu
2023-07-12 7:36 ` Mark Rutland
2023-07-13 2:24 ` Aiqun(Maria) Yu
2023-07-13 11:20 ` Mark Rutland
2023-07-13 14:08 ` Aiqun(Maria) Yu
2023-07-13 19:08 ` Mark Rutland
2023-07-14 1:56 ` Aiqun(Maria) Yu
2023-07-14 8:23 ` Will Deacon
2023-07-14 10:12 ` Aiqun(Maria) Yu
2023-07-14 12:09 ` Will Deacon
2023-07-17 2:01 ` Aiqun(Maria) Yu
2023-07-11 10:34 ` Mark Rutland
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=c38179ec-ff16-7b38-8124-87d009aafac8@quicinc.com \
--to=quic_aiquny@quicinc.com \
--cc=catalin.marinas@arm.com \
--cc=corbet@lwn.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=quic_kaushalk@quicinc.com \
--cc=quic_pkondeti@quicinc.com \
--cc=quic_satyap@quicinc.com \
--cc=quic_shashim@quicinc.com \
--cc=quic_songxue@quicinc.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®