[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0d1b4a13-965f-4b1e-bebc-9a8f1cc395b4@oracle.com>
Date: Wed, 17 Dec 2025 10:47:19 -0800
From: ross.philipson@...cle.com
To: Dave Hansen <dave.hansen@...el.com>, linux-kernel@...r.kernel.org,
x86@...nel.org, linux-integrity@...r.kernel.org,
linux-doc@...r.kernel.org, linux-crypto@...r.kernel.org,
kexec@...ts.infradead.org, linux-efi@...r.kernel.org,
iommu@...ts.linux.dev
Cc: dpsmith@...rtussolutions.com, tglx@...utronix.de, mingo@...hat.com,
bp@...en8.de, hpa@...or.com, dave.hansen@...ux.intel.com,
ardb@...nel.org, mjg59@...f.ucam.org,
James.Bottomley@...senpartnership.com, peterhuewe@....de,
jarkko@...nel.org, jgg@...pe.ca, luto@...capital.net,
nivedita@...m.mit.edu, herbert@...dor.apana.org.au,
davem@...emloft.net, corbet@....net, ebiederm@...ssion.com,
dwmw2@...radead.org, baolu.lu@...ux.intel.com,
kanth.ghatraju@...cle.com, andrew.cooper3@...rix.com,
trenchboot-devel@...glegroups.com, ross.philipson@...cle.com
Subject: Re: [PATCH v15 22/28] x86: Secure Launch kernel early boot stub
On 12/16/25 2:32 PM, Dave Hansen wrote:
> On 12/15/25 15:33, Ross Philipson wrote:
>> +static u64 sl_txt_read(u32 reg)
>> +{
>> + return readq((void *)(u64)(TXT_PRIV_CONFIG_REGS_BASE + reg));
>> +}
>> +
>> +static void sl_txt_write(u32 reg, u64 val)
>> +{
>> + writeq(val, (void *)(u64)(TXT_PRIV_CONFIG_REGS_BASE + reg));
>> +}
>
> Man, that's a lot of casting. If TXT_PRIV_CONFIG_REGS_BASE were just a
> pointer to being with, it could be:
>
> writeq(val, TXT_PRIV_CONFIG_REGS_BASE + reg);
>
> Right?
Indeed, we can simplify this per your suggestion.
>
> This _looks_ like it was just written and then had casts added to it
> until it compiled.
Thank you for you feedback so far.
Ross
Powered by blists - more mailing lists