[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aJ4iwpQOnrc_iN8Y@lx-t490>
Date: Thu, 14 Aug 2025 19:54:10 +0200
From: "Ahmed S. Darwish" <darwi@...utronix.de>
To: David Woodhouse <dwmw2@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>,
David Woodhouse <dwmw@...zon.co.uk>, linux-kernel@...r.kernel.org,
Konstantin Belousov <kib@....kiev.ua>,
John Baldwin <jhb@...ebsd.org>,
"<cperciva@...snap.com>" <cperciva@...snap.com>
Subject: Re: [PATCH v2] x86/bhyve: Detect FreeBSD Bhyve hypervisor
On Thu, 14 Aug 2025, David Woodhouse wrote:
> +
> +static uint32_t bhyve_cpuid_base;
> +static uint32_t bhyve_cpuid_max;
> +
...
> +static uint32_t __init bhyve_detect(void)
> +{
> + if (boot_cpu_data.cpuid_level < 0 ||
> + !cpu_feature_enabled(X86_FEATURE_HYPERVISOR))
> + return 0;
> +
> + bhyve_cpuid_base = cpuid_base_hypervisor("bhyve bhyve ", 0);
> + if (!bhyve_cpuid_base)
> + return 0;
> +
> + bhyve_cpuid_max = cpuid_eax(bhyve_cpuid_max);
> +
^^^
You're using CPUID(0x0) by mistake here ;)
I guess you just meant:
bhyve_cpuid_max = cpuid_eax(bhyve_cpuid_base);
Thanks!
Ahmed
Powered by blists - more mailing lists