Re: [RFC 01/14] x86/apic: Add new driver for Secure AVIC
From: Kirill A. Shutemov
Date: Wed Oct 09 2024 - 08:13:02 EST
On Wed, Oct 09, 2024 at 01:22:16PM +0200, Borislav Petkov wrote:
> On Wed, Oct 09, 2024 at 02:03:48PM +0300, Kirill A. Shutemov wrote:
> > I would rather convert these three attributes to synthetic X86_FEATUREs
> > next to X86_FEATURE_TDX_GUEST. I suggested it once.
>
> And back then I answered that splitting the coco checks between a X86_FEATURE
> and a cc_platform ones is confusing. Which ones do I use, X86_FEATURE or
> cc_platform?
>
> Oh, for SNP or TDX I use cpu_feature_enabled() but in generic code I use
> cc_platform.
>
> Sounds confusing to me.
If you use SNP or TDX check in generic code something is wrong. Abstraction
is broken somewhere. Generic code doesn't need to know concrete implementation.
--
Kiryl Shutsemau / Kirill A. Shutemov