i386: Change the default Hyper-V version to match WS2016

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 6.2 machine types only.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20210902093530.345756-9-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Vitaly Kuznetsov 2021-09-02 11:35:30 +02:00 committed by Paolo Bonzini
parent af7228b88d
commit f701ecec2b
3 changed files with 9 additions and 5 deletions

View File

@ -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)

View File

@ -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[] = {

View File

@ -6838,11 +6838,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),