5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-25 06:03:52 +03:00

add 'flags' property to cpu option

Currently this only allows specifying '+pcid' or '-pcid'
but might be extended in the future.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2018-01-09 15:30:14 +01:00 committed by Fabian Grünbichler
parent 13bca7b4de
commit 39fd79e2ad

View File

@ -150,6 +150,16 @@ my $cpu_fmt = {
optional => 1,
default => 0
},
flags => {
description => "Override CPU flags. Currently only the 'pcid' flag is supported."
. " Use '+pcid' or '-pcid' to enable or disable."
. " This takes precedence over flags coming from the cpu type or changed implicitly via the OS type.",
format_description => 'flaglist',
type => 'string',
pattern => '[+-]pcid',
optional => 1,
default => '',
},
};
my $watchdog_fmt = {
@ -3143,6 +3153,10 @@ sub config_to_command {
or die "Cannot parse cpu description: $cputype\n";
$cpu = $cpuconf->{cputype};
$kvm_off = 1 if $cpuconf->{hidden};
if (defined(my $flags = $cpuconf->{flags})) {
push @$cpuFlags, $flags;
}
}
push @$cpuFlags , '+lahf_lm' if $cpu eq 'kvm64';