[pve-devel] [PATCH 7/7] enable cpu enforce

Alexandre Derumier aderumier at odiso.com
Mon Mar 16 05:57:47 CET 2015


It wasn't working with 2.6.32,
now that 3.10 kernel is the default, we can enable it.

It's help to be sure that all cpu flags are supported by host && qemu,
to be sure that nothing break

Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuServer.pm |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index f4a1349..33bbf60 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2917,9 +2917,7 @@ sub config_to_command {
 
     $cpu .= "," . join(',', @$cpuFlags) if scalar(@$cpuFlags);
 
-    # Note: enforce needs kernel 3.10, so we do not use it for now
-    # push @$cmd, '-cpu', "$cpu,enforce";
-    push @$cmd, '-cpu', $cpu;
+    push @$cmd, '-cpu', "$cpu,enforce";
 
     my $memory = $conf->{memory} || $defaults->{memory};
     my $static_memory = 0;
-- 
1.7.10.4




More information about the pve-devel mailing list