From 0dc48c3d5b8e2056f9d089c6b82b836631bde525 Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Wed, 8 Jul 2015 10:49:06 +0200 Subject: [PATCH] cpuflags : remove -rdtscp for Opteron cpu models 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 --- PVE/QemuServer.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 17c67ab..f55e8d9 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -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; -- 2.39.2