diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index ce884dfe30..81e0166ba6 100644 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -7865,7 +7865,7 @@ class LibvirtDriver(driver.ComputeDriver): # Make sure we register all the types as the compute service could # be calling this method before init_host() - if len(CONF.devices.enabled_mdev_types) > 1: + if len(CONF.devices.enabled_mdev_types) > 0: nova.conf.devices.register_dynamic_opts(CONF) for vgpu_type in CONF.devices.enabled_mdev_types: @@ -7945,10 +7945,6 @@ class LibvirtDriver(driver.ComputeDriver): if not self.supported_vgpu_types: return - if len(self.supported_vgpu_types) == 1: - # The operator wanted to only support one single type so we can - # blindly return it for every single pGPU - return self.supported_vgpu_types[0] device_address = self._get_pci_id_from_libvirt_name(device_address) if not device_address: return