From ce71be5c053d6433534a8e36a230b67a4e8839f8 Mon Sep 17 00:00:00 2001 From: Gonglei Date: Mon, 5 Mar 2018 00:00:21 -0500 Subject: [PATCH] i386/cpu/hyperv: support over 64 vcpus for windows guests Starting with Windows Server 2012 and Windows 8, if CPUID.40000005.EAX contains a value of -1, Windows assumes specific limit to the number of VPs. In this case, Windows Server 2012 guest VMs may use more than 64 VPs, up to the maximum supported number of processors applicable to the specific Windows version being used. https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/tlfs For compatibility, Let's introduce a new property for X86CPU, named "x-hv-max-vps" as Eduardo's suggestion, and set it to 0x40 before machine 2.10. (The "x-" prefix indicates that the property is not supposed to be a stable user interface.) Backports relevant parts of commit 6c69dfb67e84747cf071958594d939e845dfcc0c from qemu --- qemu/target/i386/cpu.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qemu/target/i386/cpu.h b/qemu/target/i386/cpu.h index 6662ebbb..4a9a0c71 100644 --- a/qemu/target/i386/cpu.h +++ b/qemu/target/i386/cpu.h @@ -1253,6 +1253,8 @@ typedef struct X86CPU { int32_t core_id; int32_t thread_id; + int32_t hv_max_vps; + /* Features to be added */ FeatureWordArray plus_features; /* Features to be removed */