]> git.proxmox.com Git - qemu-server.git/commitdiff
cpu config: fix get_cpu_bitness always reverting to default cpu type
authorFilip Schauer <f.schauer@proxmox.com>
Wed, 24 Apr 2024 09:14:33 +0000 (11:14 +0200)
committerFiona Ebner <f.ebner@proxmox.com>
Wed, 24 Apr 2024 09:37:28 +0000 (11:37 +0200)
This fixes the broken prevention of starting a VM with a 32-bit CPU
using a 64-bit OVMF (UEFI) BIOS.

Fixes: 89d5b1c9 ("prevent starting a 32-bit VM using a 64-bit OVMF BIOS")
Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
[FE: add Fixes trailer, add prefix to title]
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
PVE/QemuServer/CPUConfig.pm

index 97a5e559330ad96e614169b63619ca0feb005bd5..33f7524f59ceadd562f55a1bf72c3d03d38452f4 100644 (file)
@@ -757,7 +757,7 @@ sub get_cpu_bitness {
        my $cpu = PVE::JSONSchema::parse_property_string('pve-vm-cpu-conf', $cpu_prop_str)
            or die "Cannot parse cpu description: $cpu_prop_str\n";
 
-       my $cputype = $cpu->{cputype};
+       $cputype = $cpu->{cputype};
 
        if (my $model = $builtin_models->{$cputype}) {
            $cputype = $model->{'reported-model'};