From e1bdb0ad44e8def0658beb1c4911129f05e3dc4a Mon Sep 17 00:00:00 2001 From: Fiona Ebner Date: Tue, 23 Jul 2024 17:25:39 +0200 Subject: [PATCH] code cleanup: drop unused parameter from get_vm_machine() The parameter was added by ac0077cc ("Use 'QEMU version' -> '+pve-version' mapping for machine types") but it doesn't seem like there ever was a caller. In particular, none of the current callers pass in a value and it's not clear when one would require passing a different version than the KVM binary version. Signed-off-by: Fiona Ebner Reviewed-by: Daniel Kral Tested-by: Daniel Kral --- PVE/QemuServer.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 2046a7c5..e6d449ca 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -3313,13 +3313,13 @@ sub windows_get_pinned_machine_version { } sub get_vm_machine { - my ($conf, $forcemachine, $arch, $add_pve_version, $kvmversion) = @_; + my ($conf, $forcemachine, $arch, $add_pve_version) = @_; my $machine_conf = PVE::QemuServer::Machine::parse_machine($conf->{machine}); my $machine = $forcemachine || $machine_conf->{type}; if (!$machine || $machine =~ m/^(?:pc|q35|virt)$/) { - $kvmversion //= kvm_user_version(); + my $kvmversion //= kvm_user_version(); # we must pin Windows VMs without a specific version to 5.1, as 5.2 fixed a bug in ACPI # layout which confuses windows quite a bit and may result in various regressions.. # see: https://lists.gnu.org/archive/html/qemu-devel/2021-02/msg08484.html