Re: [PATCH] db: add Hyper-V leaf 0x40000001
Luigi Leonardi <[email protected]>
| Newsgroups | dev.linux.lists.x86-cpuid |
|---|---|
| Message-ID | <anW5m3Mb-Puk5hBu@leonardi-redhat> |
Hi Tanish,
On Tue, Jul 21, 2026 at 11:01:59PM +0530, Tanish Desai wrote:
>This patch adds CPUID.40000001:EAX, the vendor-neutral Hyper-V
>interface signature ("Hv#1"). It is used by COCONUT SVSM for
>Hyper-V host detection before enabling Hyper-V specific paths.
>
>Signed-off-by: Tanish Desai <[email protected]>
>Link: https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/tlfs/feature-discovery
>---
> db/xml/leaf_40000001.xml | 29 +++++++++++++++++++++++++++++
> 1 file changed, 29 insertions(+)
> create mode 100644 db/xml/leaf_40000001.xml
>
>diff --git a/db/xml/leaf_40000001.xml b/db/xml/leaf_40000001.xml
>new file mode 100644
>index 0000000..c37bb90
>--- /dev/null
>+++ b/db/xml/leaf_40000001.xml
>@@ -0,0 +1,29 @@
>+<!--
>+*** SPDX-FileCopyrightText: 2026 Linutronix GmbH
>+*** SPDX-License-Identifier: GPL-2.0-only
>+-->
>+<leaf id="0x40000001">
>+ <desc>Hypervisor interface signature</desc>
>+ <text>
>+ Vendor-neutral hypervisor interface identification. This determines the
>+ semantics of leaves 0x40000002 through 0x400000ff. Software should base
>+ compatibility decisions on this signature rather than the vendor ID from
>+ leaf 0x40000000.
>+ </text>
>+ <hypervisors>
>+ <hypervisor>Hyperv</hypervisor>
>+ </hypervisors>
looking at the leaf_40000001 `hypervisors` are put in the subleaf section. Not an
expert, I just noted this. I'll leave to maintainers to decide if it
makes sense to change this or not.
>+ <subleaf id="0">
>+ <eax>
>+ <bit0 len="32" id="hyp_interface" desc="Hypervisor interface signature">
>+ <text>
>+ Hypervisors conforming to the Microsoft hypervisor interface return
>+ the ASCII signature "Hv#1" (0x31237648) in this field.
>+ </text>
>+ <values>
>+ <value id="0x31237648" desc="Hv#1" />
>+ </values>
>+ </bit0>
>+ </eax>
>+ </subleaf>
>+</leaf>
>--
>2.15.0
>
Thanks for the patch, this would be very useful for SVSM!
Luigi