Re: [PATCH] x86/coco: Define cc_vendor without CONFIG_ARCH_HAS_CC_PLATFORM

From: Nathan Chancellor
Date: Sat Feb 03 2024 - 14:36:05 EST


On Sat, Feb 03, 2024 at 08:07:29PM +0100, Borislav Petkov wrote:
> On Sat, Feb 03, 2024 at 09:08:06AM -0700, Nathan Chancellor wrote:
> > I have no issues with blaming a9ef277488cf but I think da86eb961184 is
> > equally blamable for removing the option to use cc_vendor in generic x86
> > code where CONFIG_ARCH_HAS_CC_PLATFORM may not be set. Hopefully that at
> > least carifies the "which is it?" question, I'll do whatever you think
> > is best.
>
> I guess I wasn't clear enough, sorry about that. Of the two, that one

Guess that makes both of us :)

> should be in Fixes which is the first one which causes the build issue
> so that the fix can be backported to the respective kernels.
>
> IOW, if you can't trigger with da86eb961184, then a9ef277488cf should be
> in Fixes and your fix should go through the KVM tree, along with
> a9ef277488cf.
>
> How does that sound?

Yeah, that seems like a fair plan to me. I was a little concerned about
a future change that would require backporting to kernels that have
da86eb961184 (i.e., 6.6) that do not have a9ef277488cf and miss this fix
but that is a bridge that can be crossed if it ever appears, no point in
thinking too hard about it at this point.

I can send a v2 on Monday, unless Paolo wants to just add

Fixes: a9ef277488cf ("x86/kvm: Fix SEV check in sev_map_percpu_data()")

directly during application. I think the rest of the patch is fine but
if there are any other changes that should be made, I am more than happy
do to so.

Cheers,
Nathan