Re: [pve-devel] [PATCH] Force CPU vendor
I applied a modified version, using a declarative vendor list: https://git.proxmox.com/?p=qemu-server.git;a=commitdiff;h=8930da746fa44c154dacb978e3e4bbb94cdb688b Please can you test? I also added +coreduo => 'GenuineIntel', +core2duo => 'GenuineIntel', which was missing in your patch. Hope that is correct? > On April 30, 2016 at 4:33 PM Andreas Steinelwrote: > > > Signed-off-by: Andreas Steinel > --- > PVE/QemuServer.pm | 22 ++ > 1 file changed, 22 insertions(+) > > diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm > index 0e3a95e..670cf90 100644 > --- a/PVE/QemuServer.pm > +++ b/PVE/QemuServer.pm > @@ -3076,6 +3076,28 @@ sub config_to_command { > > push @$cpuFlags, 'kvm=off' if $kvm_off; > > +if ( > + ( $cpu =~ m/^Opteron/ ) || > + ( $cpu eq 'athlon' ) || > + ( $cpu eq 'phenom' ) > +) { > + push @$cpuFlags, 'vendor=AuthenticAMD'; > +} else { > + if ( > + ( $cpu =~ m/^pentium/ ) || > + ( $cpu eq 'Conroe' ) || > + ( $cpu eq 'Penryn' ) || > + ( $cpu eq 'Nehalem' ) || > + ( $cpu eq 'Westmere' ) || > + ( $cpu eq 'SandyBridge' ) || > + ( $cpu eq 'IvyBridge' ) || > + ( $cpu =~ m/^Haswell/ ) || > + ( $cpu =~ m/^Broadwell/ ) > + ) { > + push @$cpuFlags, 'vendor=GenuineIntel'; > + } > +} > + > $cpu .= "," . join(',', @$cpuFlags) if scalar(@$cpuFlags); > > push @$cmd, '-cpu', $cpu; > -- > 2.6.4 (Apple Git-63) > > ___ > pve-devel mailing list > pve-devel@pve.proxmox.com > http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel > ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] [PATCH] Force CPU vendor
The host vendor. This is strange if it is presented as pentium, but is indeed AMD. On Sat, Apr 30, 2016 at 4:50 PM, Dietmar Maurerwrote: > Thanks for the patch! > > I am curios - what does qemu use if we do not set that flag? > > ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] [PATCH] Force CPU vendor
Thanks for the patch! I am curios - what does qemu use if we do not set that flag? ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH] Force CPU vendor
Signed-off-by: Andreas Steinel--- PVE/QemuServer.pm | 22 ++ 1 file changed, 22 insertions(+) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 0e3a95e..670cf90 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -3076,6 +3076,28 @@ sub config_to_command { push @$cpuFlags, 'kvm=off' if $kvm_off; +if ( + ( $cpu =~ m/^Opteron/ ) || + ( $cpu eq 'athlon' ) || + ( $cpu eq 'phenom' ) +) { + push @$cpuFlags, 'vendor=AuthenticAMD'; +} else { + if ( + ( $cpu =~ m/^pentium/ ) || + ( $cpu eq 'Conroe' ) || + ( $cpu eq 'Penryn' ) || + ( $cpu eq 'Nehalem' ) || + ( $cpu eq 'Westmere' ) || + ( $cpu eq 'SandyBridge' ) || + ( $cpu eq 'IvyBridge' ) || + ( $cpu =~ m/^Haswell/ ) || + ( $cpu =~ m/^Broadwell/ ) + ) { + push @$cpuFlags, 'vendor=GenuineIntel'; + } +} + $cpu .= "," . join(',', @$cpuFlags) if scalar(@$cpuFlags); push @$cmd, '-cpu', $cpu; -- 2.6.4 (Apple Git-63) ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel