cpu config: fix depreacation mapping on CPU hotplug of custom types

we need to do the independent of is_custom_model to ensure the
reported model is understood by QEMU

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reported-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-08-30 09:25:03 +02:00
parent 0d6962f935
commit adc67fe917

View File

@ -364,7 +364,8 @@ sub print_cpu_device {
my $custom_cpu = get_custom_model($cpu);
$cpu = $custom_cpu->{'reported-model'} // $cpu_fmt->{'reported-model'}->{default};
} elsif (my $replacement_type = $depreacated_cpu_map->{$cpu}) {
}
if (my $replacement_type = $depreacated_cpu_map->{$cpu}) {
$cpu = $replacement_type;
}
}