[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aKNWuX6UHd_6wJoR@lx-t490>
Date: Mon, 18 Aug 2025 18:37:13 +0200
From: "Ahmed S. Darwish" <darwi@...utronix.de>
To: David Woodhouse <dwmw2@...radead.org>
Cc: Borislav Petkov <bp@...en8.de>, Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Cooper <andrew.cooper3@...rix.com>,
"H. Peter Anvin" <hpa@...or.com>,
Sean Christopherson <seanjc@...gle.com>,
Peter Zijlstra <peterz@...radead.org>,
Sohil Mehta <sohil.mehta@...el.com>,
John Ogness <john.ogness@...utronix.de>, x86@...nel.org,
x86-cpuid@...ts.linux.dev, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 00/34] x86: Introduce a centralized CPUID data model
Hi!
On Sat, 16 Aug 2025, David Woodhouse wrote:
>
> Nice work.
>
Thanks a lot.
>
> Looks like you haven't attempted to address hypervisor CPUID yet.
>
Yeah, I plan to tackle the hypervisor stuff after the X86_FEATURE(s)
dependency graph mentioned in the Bhyve thread:
https://lore.kernel.org/lkml/aKL0WlA4wIU8l9RT@lx-t490
> I've attempted to document that in a section at the end of
> http://david.woodhou.se/ExtDestId.pdf — I wonder if we should find
> somewhere to publish it as canonical?
That PDF, and the text file it links to, is some of the best
documentation I ever saw in kernel land...
I would be more than happy to cover the last section of that PDF
('Hhypervisor Detection via CPUID') under the x86-cpuid-db umbrella.
There's some very basic hypervisor-related things:
https://gitlab.com/x86-cpuid.org/x86-cpuid-db/-/blob/tip/db/xml/hypervisors.xml
https://gitlab.com/x86-cpuid.org/x86-cpuid-db/-/blob/tip/db/xml/leaf_40000000.xml
But the idea of CPUID block "ranges", as in cpuid_base_hypervisor(), is
not yet covered. Also, the only thing these XMLs above actually do is
generating the 'struct leaf_0x40000000_0' data type:
Subject: [PATCH v4 06/34] x86/cpuid: Introduce <asm/cpuid/leaf_types.h>
https://lore.kernel.org/lkml/20250815070227.19981-7-darwi@linutronix.de
>
> I suspect our loop in cpuid_base_hypervisor() should be 'fixed' to
> comply with the new rule I just made up, that it should only scan each
> block at 0x4000_0.00 until it finds an empty block, rather than going
> all the way up to 0x4001_0000?
>
> Are there any hypervisors which provide more than one block, that
> *aren't* just putting the Hyper-V leaves at 0x4000_0000 and their own
> native leaves at 0x4000_0100 ?
>
I think, no, but you and others at Cc are definitely the more experienced
folks regarding this :)
Thanks!
--
Ahmed S. Darwish
Linutronix GmbH
Powered by blists - more mailing lists