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

Borislav Petkov
2025-08-22T13:54:59Z

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 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. If yes, let's
hear it.

Just this hypothetically, maybe we'd need it, maybe not, it might be a good
idea ... bla is muddying the water unnecessarily. So let's focus pls and
address *only* the issue(s) at hand.

Thx.

--
Regards/Gruss,
Boris.