]> git.proxmox.com Git - qemu-server.git/commitdiff
disable SMM check: always return false for virt machine type
authorFiona Ebner <f.ebner@proxmox.com>
Thu, 11 May 2023 11:43:17 +0000 (13:43 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 15 May 2023 09:09:33 +0000 (11:09 +0200)
There is no 'smm' flag for the 'virt' machine type.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
PVE/QemuServer.pm

index c1d0fd2d06a35bd8d996a59b44eb60345165f1b6..ab33aa375b23878711f910e973c17d6fe3ca125c 100644 (file)
@@ -3543,7 +3543,9 @@ sub query_understood_cpu_flags {
 # Since commit 277d33454f77ec1d1e0bc04e37621e4dd2424b67 in pve-qemu, smm is not off by default
 # anymore. But smm=off seems to be required when using SeaBIOS and serial display.
 my sub should_disable_smm {
-    my ($conf, $vga) = @_;
+    my ($conf, $vga, $machine) = @_;
+
+    return if $machine =~ m/^virt/; # there is no smm flag that could be disabled
 
     return (!defined($conf->{bios}) || $conf->{bios} eq 'seabios') &&
        $vga->{type} && $vga->{type} =~ m/^(serial\d+|none)$/;
@@ -4155,7 +4157,7 @@ sub config_to_command {
        push @$machineFlags, 'accel=tcg';
     }
 
-    push @$machineFlags, 'smm=off' if should_disable_smm($conf, $vga);
+    push @$machineFlags, 'smm=off' if should_disable_smm($conf, $vga, $machine_type);
 
     my $machine_type_min = $machine_type;
     if ($add_pve_version) {