]> git.proxmox.com Git - qemu-server.git/commitdiff
cpuflags : remove -rdtscp for Opteron cpu models
authorAlexandre Derumier <aderumier@odiso.com>
Wed, 8 Jul 2015 08:49:06 +0000 (10:49 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 22 Jul 2015 10:38:47 +0000 (12:38 +0200)
rdtscp is not supported by qemu and with enforce it's not starting
warning: host doesn't support requested feature: CPUID.80000001H:EDX.rdtscp [bit 27]

from to qemu wiki
http://wiki.qemu.org/Features/CPUModels#Disabling_features_that_were_always_disabled_on_KVM
"Fact: currently libvirt runs CPU models having rdtscp without the "enforce" flag, and rdtscp is silently disabled
Consequence: libvirt SHOULD use something like "-cpu Opteron_G5,-rdtscp",
especially when it starts using (or emulating) enforce mode
This will require a solution on libvirt side. QEMU will just provide the mechanisms to report CPU model information
and check what the host and QEMU supports, but the decision to disable rdtscp to be able
to run Opteron_G[2345] needs to be taken by libvirt."

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
PVE/QemuServer.pm

index 17c67ab57d12a578feb2097f8f1ef2e8a8b39291..f55e8d9aae7bc787a2f65007eaa751f0a6cf9e1e 100644 (file)
@@ -2842,6 +2842,8 @@ sub config_to_command {
 
     push @$cpuFlags, '+sep' if $cpu eq 'kvm64' || $cpu eq 'kvm32';
 
+    push @$cpuFlags, '-rdtscp' if $cpu =~ m/^Opteron/;
+
     if (qemu_machine_feature_enabled ($machine_type, $kvmver, 2, 3)) {
 
        push @$cpuFlags , '+kvm_pv_unhalt' if !$nokvm;