On 05.12.2019 09:35, Durrant, Paul wrote: > --- a/xen/drivers/passthrough/pci.c > +++ b/xen/drivers/passthrough/pci.c > @@ -1696,16 +1696,12 @@ int iommu_do_pci_domctl( > > pcidevs_lock(); > ret = device_assigned(seg, bus, devfn); > - if ( domctl->cmd == XEN_DOMCTL_test_assign_device ) > + if ( ret && domctl->cmd == XEN_DOMCTL_test_assign_device ) > { > - if ( ret ) > - { > - printk(XENLOG_G_INFO > - "%04x:%02x:%02x.%u already assigned, or > non-existent\n", > - seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); > - ret = -EINVAL; > - } > - break; > + printk(XENLOG_G_INFO > + "%04x:%02x:%02x.%u already assigned, or non-existent\n", > + seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); > + ret = -EINVAL; > }
But this seems wrong - you'd end up calling assign_device() even for the XEN_DOMCTL_test_assign_device case, when ret is 0. All we want is to delete the break statement afaict. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel