[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250429151134.GB26272@willie-the-truck>
Date: Tue, 29 Apr 2025 16:11:36 +0100
From: Will Deacon <will@...nel.org>
To: Anshuman Khandual <anshuman.khandual@....com>
Cc: linux-arm-kernel@...ts.infradead.org,
Ryan Roberts <ryan.roberts@....com>,
Catalin Marinas <catalin.marinas@....com>,
Marc Zyngier <maz@...nel.org>, kvmarm@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2] arm64/mm: Implement pte_po_index() for permission
overlay index
On Tue, Apr 15, 2025 at 11:14:42AM +0530, Anshuman Khandual wrote:
> From: Ryan Roberts <ryan.roberts@....com>
>
> Previously pte_access_permitted() used FIELD_GET() directly to retrieve
> the permission overlay index from the pte. However, FIELD_GET() doesn't
> work for 128 bit quanitites. Since we are about to add support for D128
> pgtables, let's create a specific helper, pte_po_index() which can do
> the required mask and shift regardless of the data type width.
You say:
"we are about to add support for D128 pgtables"
but all I've seen so far are piecemeal patches like this and it's hard
to know what to do with them, to be honest. Somebody could reasonably
turn up next week and clean this up to use FIELD_GET() again.
Grepping around, I also see that the KVM page-table code uses the FIELD_*
macros on page-table entries, so perhaps we're better off adding support
for 128-bit types to those instead of trying to avoid them?
Will
Powered by blists - more mailing lists