mirror of
				https://git.proxmox.com/git/qemu-server
				synced 2025-10-31 19:16:22 +00:00 
			
		
		
		
	pci: cleanup pci: unregister mdev directly inline
not worth the hassle of a break/depends cycle Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
		
							parent
							
								
									c963efc882
								
							
						
					
					
						commit
						faf72d6cbf
					
				| @ -5930,7 +5930,12 @@ sub cleanup_pci_devices { | ||||
| 	my $hostpciindex = $1; | ||||
| 	my $uuid = PVE::SysFSTools::generate_mdev_uuid($vmid, $hostpciindex); | ||||
| 	my $d = parse_hostpci($conf->{$key}); | ||||
| 	PVE::SysFSTools::pci_cleanup_mdev_device($uuid) if $d->{mdev}; | ||||
| 	if ($d->{mdev}) { | ||||
| 	    # NOTE: avoid PVE::SysFSTools::pci_cleanup_mdev_device as it requires PCI ID and we | ||||
| 	    # don't want to break ABI just for this two liner | ||||
| 	    my $dev_sysfs_dir = "/sys/bus/mdev/devices/$uuid"; | ||||
| 	    PVE::SysFSTools::file_write("$dev_sysfs_dir/remove", "1") if -e $dev_sysfs_dir; | ||||
| 	} | ||||
|     } | ||||
|     PVE::QemuServer::PCI::remove_pci_reservation($vmid); | ||||
| } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Thomas Lamprecht
						Thomas Lamprecht