Re: [PATCH v8 08/11] x86/tdx: Wire up KVM hypercalls

From: Josh Poimboeuf
Date: Wed Oct 06 2021 - 15:34:49 EST


On Mon, Oct 04, 2021 at 07:52:02PM -0700, Kuppuswamy Sathyanarayanan wrote:
> static inline long kvm_hypercall0(unsigned int nr)
> {
> long ret;
> +
> + if (cc_platform_has(CC_ATTR_GUEST_TDX))
> + return tdx_kvm_hypercall(nr, 0, 0, 0, 0);

Hm, I'm still thinking that figuring out a way to convert all the
cc_platform_has() stuff to normal cpu features -- or at least inline
wrappers around them -- would be really nice here. Then this could just
be a nice fast static_cpu_has().

--
Josh