Re: [PATCH] x86/mm: Fix memory encryption features advertisement

From: Kirill A. Shutemov
Date: Thu Jan 11 2024 - 05:43:55 EST


On Wed, Jan 10, 2024 at 03:33:13PM -0600, Tom Lendacky wrote:
> On 1/10/24 13:35, Kirill A. Shutemov wrote:
> > When memory encryption is enabled, the kernel prints the encryption
> > flavor that the system supports.
> >
> > The check assumes that everything is AMD SME/SEV if it has the TDX CPU
>
> s/if it has/if it doesn't have/

Oopsie.

> > feature set.
> >
> > To avoid confusion, check the cc_vendor directly.
>
> Is this because of the setting of cc_vendor in hv_vtom_init() without
> setting the TDX feature and so "Intel TDX" isn't printed and instead "AMD"
> is printed?
>
> If so, the commit message should really have some info about how this
> relates to Hyper-V isolation VMs.

That's one of the issue. But the code is generally has flawed logic that
worth addressing.

Will send v2 with better commit message.

--
Kiryl Shutsemau / Kirill A. Shutemov