[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211006141105.offh3fqhyupzqs7v@treble>
Date: Wed, 6 Oct 2021 07:11:05 -0700
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Borislav Petkov <bp@...en8.de>
Cc: "Kuppuswamy, Sathyanarayanan"
<sathyanarayanan.kuppuswamy@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
Paolo Bonzini <pbonzini@...hat.com>,
David Hildenbrand <david@...hat.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Juergen Gross <jgross@...e.com>, Deep Shah <sdeep@...are.com>,
VMware Inc <pv-drivers@...are.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>, Peter H Anvin <hpa@...or.com>,
Dave Hansen <dave.hansen@...el.com>,
Tony Luck <tony.luck@...el.com>,
Dan Williams <dan.j.williams@...el.com>,
Andi Kleen <ak@...ux.intel.com>,
Kirill Shutemov <kirill.shutemov@...ux.intel.com>,
Sean Christopherson <seanjc@...gle.com>,
Kuppuswamy Sathyanarayanan <knsathya@...nel.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v8 03/11] x86/cpufeatures: Add TDX Guest CPU feature
On Wed, Oct 06, 2021 at 02:47:42PM +0200, Borislav Petkov wrote:
> On Tue, Oct 05, 2021 at 10:03:09PM -0700, Josh Poimboeuf wrote:
> > I'm not suggesting getting rid of the feature flag. I'm suggesting
> > getting rid of the global variable. Is there a reason you can't check
> > the feature flag instead of checking the global variable?
>
> The reason is that cc_platform_has() is used too early, even before
> get_cpu_cap(). So you need to have TDX guest detected even before
> feature flags.
Ok. At least it sounds like cc_platform_has() needs a comment stating
that caps can't be relied on, and why.
--
Josh
Powered by blists - more mailing lists