mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-07-27 14:01:27 +00:00
pci: mapping: check mdev config against hardware
By passing the mapping config to assert_valid, not only the specific mapping. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Reviewed-by: Christoph Heiss <c.heiss@proxmox.com> Reviewed-by: Fiona Ebner <f.ebner@proxmox.com> Tested-by: Christoph Heiss <c.heiss@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
b204fad0b4
commit
4a9d773711
@ -432,8 +432,10 @@ sub parse_hostpci {
|
|||||||
my $devices = PVE::Mapping::PCI::find_on_current_node($mapping);
|
my $devices = PVE::Mapping::PCI::find_on_current_node($mapping);
|
||||||
die "PCI device mapping not found for '$mapping'\n" if !$devices || !scalar($devices->@*);
|
die "PCI device mapping not found for '$mapping'\n" if !$devices || !scalar($devices->@*);
|
||||||
|
|
||||||
|
my $config = PVE::Mapping::PCI::config();
|
||||||
|
|
||||||
for my $device ($devices->@*) {
|
for my $device ($devices->@*) {
|
||||||
eval { PVE::Mapping::PCI::assert_valid($mapping, $device) };
|
eval { PVE::Mapping::PCI::assert_valid($mapping, $device, $config->{ids}->{$mapping}) };
|
||||||
die "PCI device mapping invalid (hardware probably changed): $@\n" if $@;
|
die "PCI device mapping invalid (hardware probably changed): $@\n" if $@;
|
||||||
push $alternatives->@*, [split(/;/, $device->{path})];
|
push $alternatives->@*, [split(/;/, $device->{path})];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user