From 52cffab6b52965b4b97eba7f388ecfde32475a62 Mon Sep 17 00:00:00 2001 From: Stefan Reiter Date: Wed, 15 Jan 2020 15:36:54 +0100 Subject: [PATCH] Fixup CPU flag query to not use get_basic_machine_info get_basic_machine_info was removed by commit 045749f2fc. Use get_host_arch to get the default machine type instead, and optionally allow to specify architecture as parameter. Signed-off-by: Stefan Reiter --- PVE/QemuServer.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index f7d99e39..5835e9af 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -3418,9 +3418,12 @@ sub get_command_for_arch($) { # since kvm and tcg machines support different flags # sub query_supported_cpu_flags { - my $flags = {}; + my ($arch) = @_; - my ($arch, $default_machine) = get_basic_machine_info(); + $arch //= get_host_arch(); + my $default_machine = $default_machines->{$arch}; + + my $flags = {}; # FIXME: Once this is merged, the code below should work for ARM as well: # https://lists.nongnu.org/archive/html/qemu-devel/2019-06/msg04947.html