[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Help] Windows2012 as Guest 64+cores on KVM Halts
From: |
Vadim Rozenfeld |
Subject: |
Re: [Qemu-devel] [Help] Windows2012 as Guest 64+cores on KVM Halts |
Date: |
Thu, 16 Feb 2017 17:26:32 +1100 |
On Thu, 2017-02-16 at 01:31 +0000, Gonglei (Arei) wrote:
> Hi,
>
> >
> >
> > On Sat, 2017-02-11 at 10:39 -0500, Paolo Bonzini wrote:
> > >
> > > >
> > > >
> > > >
> > > > >
> > > > >
> > > > > On 10/02/2017 10:31, Gonglei (Arei) wrote:
> > > > > >
> > > > > >
> > > > > > But We tested the same cases on Xen platform and VMware,
> > > > > > and
> > > > > > the guest booted successfully.
> > > > >
> > > > > Were these two also tested with enlightenments enabled? TCG
> > > > > surely isn't.
> > > >
> > > > About TCG, I just remove ' accel=kvm,' and 'hy_releaxed' from
> > > > the
> > > > below QEMU
> > > > Command line, I thought the hyper-V enabled then. Sorry about
> > > > that.
> > > >
> > > > But for Xen, we set 'viridian=1' which be thought the Hyper-V
> > > > is
> > > > enabled.
> > > >
> > > > For VMWare we also enabled the Hyper-V enlightenments.
> > If I'm not mistaken, even Hyper-V server doesn't allow specify more
> > than 64 vCPUs for Generation 1 VMs.
>
> Normally yes, but I found the explanation from Microsoft document
> about it:
>
> Maximum Supported Virtual Processors
>
> On Windows operating systems versions through Windows Server 2008
> R2,
> reporting the HV#1 hypervisor interface limits the Windows virtual
> machine
> to a maximum of 64 VPs, regardless of what is reported via
> CPUID.40000005.EAX.
> Starting with Windows Server 2012 and Windows 8, if
> CPUID.40000005.EAX
> contains a value of -1, Windows assumes that the hypervisor imposes
> no 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.
>
> Link: https://docs.microsoft.com/en-us/virtualization/hyper-v-on-wind
> ows/reference/tlfs
>
> "Requirements for Implementing the Microsoft Hypervisor Interface"
>
> And the below patch works for me, I can support max 255 vcpus for
> WS2012
> with hyper-v enlightenments.
>
> diff --git a/target/i386/kvm.c b/target/i386/kvm.c
> index 27fd050..efe3cbc 100644
> --- a/target/i386/kvm.c
> +++ b/target/i386/kvm.c
> @@ -772,7 +772,7 @@ int kvm_arch_init_vcpu(CPUState *cs)
>
> c = &cpuid_data.entries[cpuid_i++];
> c->function = HYPERV_CPUID_IMPLEMENT_LIMITS;
> - c->eax = 0x40;
> + c->eax = -1;
> c->ebx = 0x40;
>
> kvm_base = KVM_CPUID_SIGNATURE_NEXT;
>
Nice.
I tried the following patch some time ago. Unfortunately it didn't work
for me for some reason:
@@ -772,8 +773,9 @@ int kvm_arch_init_vcpu(CPUState *cs)
c = &cpuid_data.entries[cpuid_i++];
c->function = HYPERV_CPUID_IMPLEMENT_LIMITS;
- c->eax = 0x40;
- c->ebx = 0x40;
+ c->eax = 0x000000f0;//0x40;
+ c->ebx = 0x00000200;//0x40;
+ c->ecx = 0x00000648;
I used the same numbers as provided by WS2016 for both Gen1 and Gen2
VMs.
> >
> > > >
> > In any case, if you are only interested in hv_relaxed, you can drop
> > it
> > off for WS2012 as long as you have cpu hypervisor flag
> > (CPUID.1:ECX [bit 31]=1) turned on.
> >
> hy_relaxed is just a example of enabling hyperv-v enlightenments.
>
> Thanks,
> -Gonglei
- [Qemu-devel] [Help] Windows2012 as Guest 64+cores on KVM Halts, hangaohuai, 2017/02/09
- Re: [Qemu-devel] [Help] Windows2012 as Guest 64+cores on KVM Halts, Yan Vugenfirer, 2017/02/09
- Re: [Qemu-devel] [Help] Windows2012 as Guest 64+cores on KVM Halts, Gonglei (Arei), 2017/02/10
- Re: [Qemu-devel] [Help] Windows2012 as Guest 64+cores on KVM Halts, Paolo Bonzini, 2017/02/10
- Re: [Qemu-devel] [Help] Windows2012 as Guest 64+cores on KVM Halts, Gonglei (Arei), 2017/02/11
- Re: [Qemu-devel] [Help] Windows2012 as Guest 64+cores on KVM Halts, Paolo Bonzini, 2017/02/11
- Re: [Qemu-devel] [Help] Windows2012 as Guest 64+cores on KVM Halts, Vadim Rozenfeld, 2017/02/13
- Re: [Qemu-devel] [Help] Windows2012 as Guest 64+cores on KVM Halts, Gonglei (Arei), 2017/02/15
- Re: [Qemu-devel] [Help] Windows2012 as Guest 64+cores on KVM Halts,
Vadim Rozenfeld <=
- Re: [Qemu-devel] [Help] Windows2012 as Guest 64+cores on KVM Halts, Paolo Bonzini, 2017/02/17
- Re: [Qemu-devel] [Help] Windows2012 as Guest 64+cores on KVM Halts, Gonglei (Arei), 2017/02/20
- Re: [Qemu-devel] [Help] Windows2012 as Guest 64+cores on KVM Halts, Paolo Bonzini, 2017/02/20
- Re: [Qemu-devel] [Help] Windows2012 as Guest 64+cores on KVM Halts, Gonglei (Arei), 2017/02/20
- Re: [Qemu-devel] [Help] Windows2012 as Guest 64+cores on KVM Halts, Paolo Bonzini, 2017/02/20
- Re: [Qemu-devel] [Help] Windows2012 as Guest 64+cores on KVM Halts, Gonglei (Arei), 2017/02/20