]> git.proxmox.com Git - qemu-server.git/commitdiff
don't use amd64-specific cpu options on arm
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 12 Nov 2018 13:10:43 +0000 (14:10 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 13 Nov 2018 13:44:28 +0000 (14:44 +0100)
FIXME: This function needs proper reorganisation...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
PVE/QemuServer.pm

index 95e2c4ab41e0edf5d863265b620f5cad6fd98ab1..dd7d1f63df367403b73a9526c986c4de3fb792ff 100644 (file)
@@ -3344,7 +3344,7 @@ sub get_cpu_options {
        }
     }
 
-    push @$cpuFlags , '+lahf_lm' if $cpu eq 'kvm64';
+    push @$cpuFlags , '+lahf_lm' if $cpu eq 'kvm64' && $arch eq 'x86_64';
 
     push @$cpuFlags , '-x2apic'
        if $conf->{ostype} && $conf->{ostype} eq 'solaris';
@@ -3353,7 +3353,7 @@ sub get_cpu_options {
 
     push @$cpuFlags, '-rdtscp' if $cpu =~ m/^Opteron/;
 
-    if (qemu_machine_feature_enabled ($machine_type, $kvmver, 2, 3)) {
+    if (qemu_machine_feature_enabled ($machine_type, $kvmver, 2, 3) && $arch eq 'x86_64') {
 
        push @$cpuFlags , '+kvm_pv_unhalt' if $kvm;
        push @$cpuFlags , '+kvm_pv_eoi' if $kvm;
@@ -3361,7 +3361,7 @@ sub get_cpu_options {
 
     add_hyperv_enlightenments($cpuFlags, $winversion, $machine_type, $kvmver, $conf->{bios}, $gpu_passthrough) if $kvm;
 
-    push @$cpuFlags, 'enforce' if $cpu ne 'host' && $kvm;
+    push @$cpuFlags, 'enforce' if $cpu ne 'host' && $kvm && $arch eq 'x86_64';
 
     push @$cpuFlags, 'kvm=off' if $kvm_off;