From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: qemu-devel@nongnu.org
Cc: Eduardo Habkost <ehabkost@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
Maxim Levitsky <mlevitsk@redhat.com>,
Vadim Rozenfeld <vrozenfe@redhat.com>,
Igor Mammedov <imammedo@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: [PATCH v2 8/8] i386: Change the default Hyper-V version to match WS2016
Date: Thu, 2 Sep 2021 11:35:30 +0200 [thread overview]
Message-ID: <20210902093530.345756-9-vkuznets@redhat.com> (raw)
In-Reply-To: <20210902093530.345756-1-vkuznets@redhat.com>
KVM implements some Hyper-V 2016 functions so providing WS2008R2 version
is somewhat incorrect. While generally guests shouldn't care about it
and always check feature bits, it is known that some tools in Windows
actually check version info.
For compatibility reasons make the change for 7.2 machine types only.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
docs/hyperv.txt | 2 +-
hw/i386/pc.c | 6 +++++-
target/i386/cpu.c | 6 +++---
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/docs/hyperv.txt b/docs/hyperv.txt
index 7803495468b7..5d99fd9a72b8 100644
--- a/docs/hyperv.txt
+++ b/docs/hyperv.txt
@@ -214,7 +214,7 @@ exposing correct vCPU topology and vCPU pinning.
3.20. hv-version-id-{build,major,minor,spack,sbranch,snumber}
=============================================================
This changes Hyper-V version identification in CPUID 0x40000002.EAX-EDX from the
-default (WS2008R2).
+default (WS2016).
- hv-version-id-build sets 'Build Number' (32 bits)
- hv-version-id-major sets 'Major Version' (16 bits)
- hv-version-id-minor sets 'Minor Version' (16 bits)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 1276bfeee456..b2e4eef9d211 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -93,7 +93,11 @@
#include "trace.h"
#include CONFIG_DEVICES
-GlobalProperty pc_compat_6_1[] = {};
+GlobalProperty pc_compat_6_1[] = {
+ { TYPE_X86_CPU, "hv-version-id-build", "0x1bbc" },
+ { TYPE_X86_CPU, "hv-version-id-major", "0x0006" },
+ { TYPE_X86_CPU, "hv-version-id-minor", "0x0001" },
+};
const size_t pc_compat_6_1_len = G_N_ELEMENTS(pc_compat_6_1);
GlobalProperty pc_compat_6_0[] = {
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 5766e720093d..569840deaf93 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -6669,11 +6669,11 @@ static Property x86_cpu_properties[] = {
/* WS2008R2 identify by default */
DEFINE_PROP_UINT32("hv-version-id-build", X86CPU, hyperv_ver_id_build,
- 0x1bbc),
+ 0x3839),
DEFINE_PROP_UINT16("hv-version-id-major", X86CPU, hyperv_ver_id_major,
- 0x0006),
+ 0x000A),
DEFINE_PROP_UINT16("hv-version-id-minor", X86CPU, hyperv_ver_id_minor,
- 0x0001),
+ 0x0000),
DEFINE_PROP_UINT32("hv-version-id-spack", X86CPU, hyperv_ver_id_sp, 0),
DEFINE_PROP_UINT8("hv-version-id-sbranch", X86CPU, hyperv_ver_id_sb, 0),
DEFINE_PROP_UINT32("hv-version-id-snumber", X86CPU, hyperv_ver_id_sn, 0),
--
2.31.1
next prev parent reply other threads:[~2021-09-02 9:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-02 9:35 [PATCH v2 0/8] i386: Assorted KVM PV and Hyper-V feature improvements Vitaly Kuznetsov
2021-09-02 9:35 ` [PATCH v2 1/8] i386: Add 6.2 machine types Vitaly Kuznetsov
2021-09-02 9:35 ` [PATCH v2 2/8] i386: docs: Briefly describe KVM PV features Vitaly Kuznetsov
2021-09-29 15:26 ` Paolo Bonzini
2021-09-02 9:35 ` [PATCH v2 3/8] i386: Support KVM_CAP_ENFORCE_PV_FEATURE_CPUID Vitaly Kuznetsov
2021-09-02 9:35 ` [PATCH v2 4/8] i386: Support KVM_CAP_HYPERV_ENFORCE_CPUID Vitaly Kuznetsov
2021-09-02 9:35 ` [PATCH v2 5/8] i386: Move HV_APIC_ACCESS_RECOMMENDED bit setting to hyperv_fill_cpuids() Vitaly Kuznetsov
2021-09-02 9:35 ` [PATCH v2 6/8] i386: Implement pseudo 'hv-avic' ('hv-apicv') enlightenment Vitaly Kuznetsov
2021-09-02 9:35 ` [PATCH v2 7/8] i386: Make Hyper-V version id configurable Vitaly Kuznetsov
2021-09-02 9:35 ` Vitaly Kuznetsov [this message]
2021-09-17 8:17 ` [PATCH v2 0/8] i386: Assorted KVM PV and Hyper-V feature improvements Vitaly Kuznetsov
2021-09-29 15:29 ` Paolo Bonzini
2021-09-30 8:09 ` Vitaly Kuznetsov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210902093530.345756-9-vkuznets@redhat.com \
--to=vkuznets@redhat.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=mlevitsk@redhat.com \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=vrozenfe@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).