File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ std::shared_ptr<Device> Container::attachDevice(devices::PciDevice &pdev) {
197197 throw RuntimeError (" Failed to load kernel driver: vfio_pci" );
198198
199199 // Bind PCI card to vfio-pci driver if not already bound
200- if (pdev.getDriver () != kernelDriver) {
200+ if ( !( pdev.driver (). has_value ()) || pdev. driver (). value ()-> name () != kernelDriver) {
201201 log->debug (" Bind PCI card to kernel driver '{}'" , kernelDriver);
202202 pdev.attachDriver (kernelDriver);
203203 }
@@ -215,7 +215,7 @@ std::shared_ptr<Device> Container::attachDevice(devices::PciDevice &pdev) {
215215 }
216216
217217 // Get IOMMU group of device
218- int index = isIommuEnabled () ? pdev.getIommuGroup () : 0 ;
218+ int index = isIommuEnabled () ? pdev.iommu_group (). value () : 0 ;
219219 if (index < 0 ) {
220220 ret = kernel::getCmdlineParam (" intel_iommu" , iommu_state,
221221 sizeof (iommu_state));
You can’t perform that action at this time.
0 commit comments