[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211014002506.2rqkgzrvy5ki2rcw@treble>
Date: Wed, 13 Oct 2021 17:25:06 -0700
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Borislav Petkov <bp@...en8.de>,
Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@...ux.intel.com>,
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 v10 03/11] x86/cpufeatures: Add TDX Guest CPU feature
On Thu, Oct 14, 2021 at 01:19:23AM +0200, Thomas Gleixner wrote:
> I'm amazed that it's so hard to see that this
>
> use()
> init()
>
> pattern is broken to begin with.
>
> So why are you arguing about the placement of this variable in the first
> place instead of actually looking at the code, wondering about the
> obscenity and then asking about the call ordering?
>
> In case that I might miss something important here due to my lack of CS
> education, please let me know.
I agree that's better.
I'd suggested doing setup_force_cpu_cap(X86_FEATURE_TDX_GUEST) early,
and then just check that instead of needing this new static variable. I
think Boris said that's not possible because of some ordering reasons
which are eluding me (and I didn't have time to investigate).
--
Josh
Powered by blists - more mailing lists