Re: [PATCH RESEND V2 1/2] x86/mce: Fix missing address mask in recovery for errors in TDX/SEAM non-root mode

From: Adrian Hunter
Date: Fri Aug 22 2025 - 10:59:08 EST


On 22/08/2025 16:54, Borislav Petkov wrote:
> On Fri, Aug 22, 2025 at 10:57:36AM +0300, Adrian Hunter wrote:
>> Not exactly. I just want to fix the bug whereby the mce handler fails
>> to mark the affected page as poisoned because it does not remove the KeyID
>> from the address before looking-up the page.
>
> Lemme ask this differently then: are you ever going to need KeyID in mci_addr?

No

>
>> No one expects to find non-address bits in struct mce addr,
>
> You're preaching to the choir - I don't know whose idea it was to shove
> a key ID in an address value... it sure sounds silly.
>
>> However, it is allowed to extend struct mce, so adding KeyID or raw MCI ADDR
>> later is quite possible.
>
> Why would you want to do that? Do you have a use case?
>
> If not, you can drop that whole angle about adding KeyID later

Droppin' it.