[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V7 02/11] vpci: add hooks for PCI device assign/de-assign
- To: Oleksandr <olekstysh@xxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Wed, 27 Jul 2022 16:35:31 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=BXqUcNOF3G5Yb9/Q8ml6EsXPGSoHXS4xG436JcArDjY=; b=kY3pMGGo1TuSA4y2W5X7jFLMCabcqy0zJEb9zssIfATunT5rufk7j+9r+1xnaG+mUo0Vk++jaw6whQ9XhCJJJT/3JhyZWCwyta2/KTnMbz2lXoSxh6hLpNV/hYmFHHulrry5YOHuNX/dzxnoa88q/pr8i3n1p+Vmvmct0zDhYYt9ia+sfQcSj/3zPkXYoRZv1kGUBm+e9d7wvA83nAnceWXP5Yn/4gGqJq0NGmF1RKSPXNuoVm4X6eOvhjJ1GTSQXhzOk/IroXSvWeAa2QtiVzqQRwf02y7/qty4A2x2w33w0HU957eID9/RK4sLV3eNCewylHbCtIu+55MdJWQHyw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ROIVX14GLnxT/J6ZPk5YVu1kMVGMH/xfq3GkxW+jB5zZ7tQwYCHrFtDCEJJVEuGSF5pokqsQ8cQUgsS3Whgwv0+ChIXh/GcK49D5wyg0kvh+3W08RMrx3OW9lxDknIl7LNNIxs0N6WzkM7+HFp6IyZioef3Jtgsp/CDlgldbPrBnEpS5xKloBHQK0AM/NmGh1x1elPz2lX9ciBFonZUp8xaqfYQpJNO0Sm1siTG4Qlx+oDmHCHwxHzfKjkSZuhrLZQ0EWhC759yyu1g6ZDWEHzhJrocKh9YPp4jMb8rgPhsnj0iwx9rSFhPDQ9H6LjmYSNgvKVe7OJegAXTlJx5cEg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Paul Durrant <paul@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Wed, 27 Jul 2022 14:35:39 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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
|