lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aJ4YnmxWspw1bb-1@lx-t490>
Date: Thu, 14 Aug 2025 19:10:54 +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 __init bhyve_detect(void)
> +{
> +	if (boot_cpu_data.cpuid_level < 0 ||
> ...

The CPUID API at <asm/cpuid/api.h> provides a cpuid_feature() macro for
this.  Let's please use that instead.

I understand that arch/x86/kernel/kvm.c and arch/x86/kernel/jailhouse.c
does a similar "cpuid_level < 0" check, but they should also be using
cpuid_feature() instead.

Thanks!
Ahmed

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ