[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230214004510.4qfcsxjy3sqbzl5z@box.shutemov.name>
Date: Tue, 14 Feb 2023 03:45:10 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: Juergen Gross <jgross@...e.com>
Cc: Borislav Petkov <bp@...en8.de>, linux-kernel@...r.kernel.org,
x86@...nel.org, lists@...dbynature.de, mikelley@...rosoft.com,
torvalds@...ux-foundation.org,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH v2 2/8] x86/mtrr: support setting MTRR state for software
defined MTRRs
On Mon, Feb 13, 2023 at 03:07:07PM +0100, Juergen Gross wrote:
> > So this here needs to check:
> >
> > if (!cpu_feature_enabled(X86_FEATURE_HYPERVISOR) &&
> > !(cpu_feature_enabled(X86_FEATURE_SEV_SNP) ||
> > cpu_feature_enabled(X86_FEATURE_XENPV))) {
> > WARN_ON_ONCE(1);
> > return;
> > }
> >
> > as we don't want this to be called somewhere or by something else.
>
> Wouldn't !cpu_feature_enabled(X86_FEATURE_HYPERVISOR) be enough?
>
> I'm not sure we won't need that for TDX guests, too.
TDX guests are covered by X86_FEATURE_HYPERVISOR.
--
Kiryl Shutsemau / Kirill A. Shutemov
Powered by blists - more mailing lists