[pve-devel] [PATCH v2 qemu-server 11/12] don't use amd64-specific cpu options on arm

Wolfgang Bumiller w.bumiller at proxmox.com
Mon Nov 12 14:10:43 CET 2018


FIXME: This function needs proper reorganisation...

Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
---
 PVE/QemuServer.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 95e2c4a..dd7d1f6 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -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;
 
-- 
2.11.0





More information about the pve-devel mailing list