[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241009135335.GKZwaK32jOZlA477HX@fat_crate.local>
Date: Wed, 9 Oct 2024 15:53:35 +0200
From: Borislav Petkov <bp@...en8.de>
To: "Kirill A. Shutemov" <kirill@...temov.name>
Cc: Neeraj Upadhyay <Neeraj.Upadhyay@....com>, linux-kernel@...r.kernel.org,
tglx@...utronix.de, mingo@...hat.com, dave.hansen@...ux.intel.com,
Thomas.Lendacky@....com, nikunj@....com, Santosh.Shukla@....com,
Vasant.Hegde@....com, Suravee.Suthikulpanit@....com,
David.Kaplan@....com, x86@...nel.org, hpa@...or.com,
peterz@...radead.org, seanjc@...gle.com, pbonzini@...hat.com,
kvm@...r.kernel.org
Subject: Re: [RFC 01/14] x86/apic: Add new driver for Secure AVIC
On Wed, Oct 09, 2024 at 03:12:41PM +0300, Kirill A. Shutemov wrote:
> 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.
That's perhaps because you're thinking that the *actual* coco implementation type
should be hidden away from generic code. But SNP and TDX are pretty different
so we might as well ask for them by their name.
But I can see why you'd think there might be some abstraction violation there.
My goal here - even though there might be some bad taste of abstraction
violation here - is simplicity. As expressed a bunch of times already, having
cc_platform *and* X86_FEATURE* things used in relation to coco code can be
confusing. So I'd prefer to avoid that confusion.
Nothing says anywhere that arch code cannot use cc_platform interfaces.
Absolutely nothing. So for the sake of KISS I'm going in that direction.
If it turns out later that this was a bad idea and we need to change it, we
can always can. As we do for other interfaces in the kernel.
If you're still not convinced, I already asked you:
"Do you have a better idea which is cleaner than what we do now?"
Your turn.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists