On 27.07.2022 16:01, Oleksandr wrote: > On 27.07.22 13:03, Jan Beulich wrote: >> On 19.07.2022 19:42, Oleksandr Tyshchenko wrote: >>> @@ -1603,6 +1610,10 @@ static int assign_device(struct domain *d, u16 seg, >>> u8 bus, u8 devfn, u32 flag) >>> pci_to_dev(pdev), flag); >>> } >>> >>> + rc = vpci_assign_device(pdev); >>> + if ( rc && deassign_device(d, seg, bus, old_devfn) ) >> ... use pdev->devfn here. > > > Thanks, good point, will drop old_devfn and use pdev->devfn. I am > wondering whether the printk after "done:" label (and other possible > printk-s down the code) should really use pdev->devfn instead of devfn > in PCI_SBDF construct?
Yes, that's intended: If assigning a phantom function fails, this should be distinguishable from failure to assign the real device. Jan
