[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <a9f4eb49-b06e-4941-a75a-df39f5d3d735@app.fastmail.com>
Date: Fri, 07 Nov 2025 15:24:12 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Yeoreum Yun" <yeoreum.yun@....com>
Cc: "Catalin Marinas" <catalin.marinas@....com>,
"Will Deacon" <will@...nel.org>, "Marc Zyngier" <maz@...nel.org>,
"Mark Brown" <broonie@...nel.org>, "Oliver Upton" <oliver.upton@...ux.dev>,
miko.lenczewski@....com, "Kevin Brodsky" <kevin.brodsky@....com>,
"Ard Biesheuvel" <ardb@...nel.org>,
"Suzuki K Poulose" <suzuki.poulose@....com>,
"Lorenzo Pieralisi" <lpieralisi@...nel.org>, yangyicong@...ilicon.com,
scott@...amperecomputing.com, "Joey Gouly" <joey.gouly@....com>,
"Zenghui Yu" <yuzenghui@...wei.com>, "Paolo Bonzini" <pbonzini@...hat.com>,
shuah <shuah@...nel.org>, "Mark Rutland" <mark.rutland@....com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
kvmarm@...ts.linux.dev, kvm@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v11 9/9] arm64: armv8_deprecated: apply FEAT_LSUI for swpX
emulation.
On Fri, Nov 7, 2025, at 15:19, Yeoreum Yun wrote:
>> On Thu, Nov 6, 2025, at 10:40, Yeoreum Yun wrote:
>> > apply FEAT_LSUI instruction to emulate deprecated swpX instruction.
>>
>> Can you explain in the changrelog why you do this?
>>
>> In particular, is this a performance optimization or is this required
>> for correctness in some scenario?
>
> I think the main purpose using for this is to "remove the toggling the
> PSTATE.PAN" bit. so that remove some *potential* problem which can
> happen when PAN bit is cleared.
Ok, I see. This should definitely be part of the commit
log for the patch in addition to the cover letter.
> also, though swpb might add some complexity, but swp can get
> a little bit of benifit by removing the ll/sc way and reduce
> the amount of instructions.
This part I think you can ignore in the patch description,
unless there is an additional problem with possibly mixing ll/sc
and lse atomics that you are trying to solve.
Arnd
Powered by blists - more mailing lists