Re: [PATCH v1 04/11] x86/x86: Add is_tdx_guest() interface

From: Borislav Petkov
Date: Thu Jun 10 2021 - 17:07:56 EST


On Thu, Jun 10, 2021 at 02:01:41PM -0700, Kuppuswamy, Sathyanarayanan wrote:
> Is it alright to use vendor name in prot_guest_has() flag? I thought
> we want to keep them generic.

Sure but keeping them only generic doesn't work in cases like this.

And just like you have:

+/* Protected Guest Feature Flags (leave 0-0xff for arch specific flags) */

there could be ranges for vendor-specific flags.

Intel at 200-2ff
AMD at 300-3ff

which is 256 per vendor, so should be enough. :)

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette