[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 22/30] i386: Change the default Hyper-V version to match WS2016
From: |
Paolo Bonzini |
Subject: |
[PULL 22/30] i386: Change the default Hyper-V version to match WS2016 |
Date: |
Sun, 3 Oct 2021 09:42:42 +0200 |
From: Vitaly Kuznetsov <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 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>
---
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 7803495468..5d99fd9a72 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 28e1b83b9d..86223acfd3 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 d1d057fabe..a7b1b6aa93 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -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),
--
2.31.1
- [PULL 07/30] qtest/numa-test: Use detailed -smp CLIs in pc_dynamic_cpu_cfg, (continued)
- [PULL 07/30] qtest/numa-test: Use detailed -smp CLIs in pc_dynamic_cpu_cfg, Paolo Bonzini, 2021/10/03
- [PULL 11/30] machine: Tweak the order of topology members in struct CpuTopology, Paolo Bonzini, 2021/10/03
- [PULL 12/30] machine: Make smp_parse generic enough for all arches, Paolo Bonzini, 2021/10/03
- [PULL 10/30] machine: Use ms instead of global current_machine in sanity-check, Paolo Bonzini, 2021/10/03
- [PULL 13/30] machine: Remove smp_parse callback from MachineClass, Paolo Bonzini, 2021/10/03
- [PULL 14/30] machine: Move smp_prefer_sockets to struct SMPCompatProps, Paolo Bonzini, 2021/10/03
- [PULL 15/30] machine: Use g_autoptr in machine_set_smp, Paolo Bonzini, 2021/10/03
- [PULL 16/30] machine: Put all sanity-check in the generic SMP parser, Paolo Bonzini, 2021/10/03
- [PULL 17/30] i386: Support KVM_CAP_ENFORCE_PV_FEATURE_CPUID, Paolo Bonzini, 2021/10/03
- [PULL 18/30] i386: Support KVM_CAP_HYPERV_ENFORCE_CPUID, Paolo Bonzini, 2021/10/03
- [PULL 22/30] i386: Change the default Hyper-V version to match WS2016,
Paolo Bonzini <=
- [PULL 19/30] i386: Move HV_APIC_ACCESS_RECOMMENDED bit setting to hyperv_fill_cpuids(), Paolo Bonzini, 2021/10/03
- [PULL 21/30] i386: Make Hyper-V version id configurable, Paolo Bonzini, 2021/10/03
- [PULL 20/30] i386: Implement pseudo 'hv-avic' ('hv-apicv') enlightenment, Paolo Bonzini, 2021/10/03
- [PULL 23/30] configure: Loosen GCC requirement from 7.5.0 to 7.4.0, Paolo Bonzini, 2021/10/03
- [PULL 24/30] virtio-mem-pci: Fix memory leak when creating MEMORY_DEVICE_SIZE_CHANGE event, Paolo Bonzini, 2021/10/03
- [PULL 27/30] tpm: mark correct memory region range dirty when clearing RAM, Paolo Bonzini, 2021/10/03
- [PULL 26/30] monitor: Rate-limit MEMORY_DEVICE_SIZE_CHANGE qapi events per device, Paolo Bonzini, 2021/10/03
- [PULL 25/30] qapi: Include qom-path in MEMORY_DEVICE_SIZE_CHANGE qapi events, Paolo Bonzini, 2021/10/03
- [PULL 28/30] softmmu/memory_mapping: never merge ranges accross memory regions, Paolo Bonzini, 2021/10/03
- [PULL 29/30] softmmu/memory_mapping: factor out adding physical memory ranges, Paolo Bonzini, 2021/10/03