Fixed Guest VM registering as Passthrough VM

Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I0edc36e1a114166647dc10ebc646665b62c5d88e


[ROCm/amdsmi commit: 037f8689fe]
Этот коммит содержится в:
Maisam Arif
2024-08-09 17:20:36 -05:00
родитель 1eaf218f2f
Коммит 0a28df87c8
+4 -5
Просмотреть файл
@@ -807,12 +807,11 @@ class AMDSMIHelpers():
pci_devices_path = "/sys/bus/pci/devices"
pci_devices: set[str] = set()
for device in os.listdir(pci_devices_path):
subsystem_device_path = os.path.join(pci_devices_path, device, "subsystem_device")
device_path = os.path.join(pci_devices_path, device, "device")
try:
with open(subsystem_device_path, 'r') as f:
subsystem_device = f.read().strip()
pci_devices.add(subsystem_device)
with open(device_path, 'r') as f:
device = f.read().strip()
pci_devices.add(device)
except Exception as _:
continue
return pci_devices