[pve-devel] [PATCH] Force CPU vendor

Dietmar Maurer dietmar at proxmox.com
Sun May 1 09:33:50 CEST 2016


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 Steinel <A.Steinel at gmail.com> wrote:
> 
> 
> Signed-off-by: Andreas Steinel <A.Steinel at gmail.com>
> ---
>  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 at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 




More information about the pve-devel mailing list