[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c4c167f335b0ee83275588aaf7346440f25ddce5.camel@infradead.org>
Date: Mon, 18 Aug 2025 12:03:10 +0100
From: David Woodhouse <dwmw2@...radead.org>
To: Borislav Petkov <bp@...en8.de>
Cc: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org, "H. Peter Anvin"
<hpa@...or.com>, "Ahmed S. Darwish" <darwi@...utronix.de>,
linux-kernel@...r.kernel.org, Konstantin Belousov <kib@....kiev.ua>, John
Baldwin <jhb@...ebsd.org>, "<cperciva@...snap.com>" <cperciva@...snap.com>
Subject: Re: [PATCH v4] x86/bhyve: Detect FreeBSD Bhyve hypervisor
On Mon, 2025-08-18 at 12:38 +0200, Borislav Petkov wrote:
> On Sat, Aug 16, 2025 at 11:06:32AM +0100, David Woodhouse wrote:
> > +static uint32_t bhyve_features(void)
> > +{
> > + if (bhyve_cpuid_max < bhyve_cpuid_base | CPUID_BHYVE_FEATURES)
>
> Forgot those parentheses again:
>
> arch/x86/kernel/cpu/bhyve.c: In function ‘bhyve_features’:
> arch/x86/kernel/cpu/bhyve.c:42:29: warning: suggest parentheses around comparison in operand of ‘|’ [-Wparentheses]
> 42 | if (bhyve_cpuid_max < bhyve_cpuid_base | CPUID_BHYVE_FEATURES)
> |
>
> Tztztz.
>
> :-P
Doh! I actually just sent v3 again by accident. In v4 I had also
dropped the comment in bhyve_x2apic_available() since I'm not sure it's
true and it doesn't actually matter. But that's only cosmetic.
> I did the below. Ok?
>
> static uint32_t bhyve_features(void)
> {
> unsigned int cpuid_leaf = bhyve_cpuid_base | CPUID_BHYVE_FEATURES;
>
> if (bhyve_cpuid_max < cpuid_leaf)
> return 0;
>
> return cpuid_eax(cpuid_leaf);
> }
>
Looks good, thanks.
Download attachment "smime.p7s" of type "application/pkcs7-signature" (5069 bytes)
Powered by blists - more mailing lists