[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 02/10] arm/pci: Maintain PCI assignable list


  • To: Jan Beulich <jbeulich@xxxxxxxx>, Oleksandr Andrushchenko <andr2000@xxxxxxxxx>
  • From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
  • Date: Wed, 11 Nov 2020 15:28:09 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.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-SenderADCheck; bh=o7yX6/AQXuuo70d0FtI7GkAPxZz5dsPz2NaD4N/5R3c=; b=Skw2zAp+D54lRSKW4fUyo/XzzVvTnIN6R9GwB+5NEnkBAMPCt4B6O+Qi3FKM0ObuUPQFmrgRwJEKe62HudfXEN3sV8ifSzeM2NkdqEkQd36p3jpYdJptrSDQd/yWHRouRjTFgX8bMH2aELZEfYTSf0FHXGZ56QME7txn0wAmxyx2JGORCefqGzjb2T2l76ovsBxOec9TFvu7Z9bbkehixCCPOVR0LM4ManNms7iZ3xT6Njw27jVcu6buobwDIkQfQWbVuFYE0UHL8TPP0Xt6/vU/lLQjM1n+cOirWv2PP7+eeqUY8YMnjqJNv1id/XVWrfcGvZFMRR04OQ8s3BwifQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dDkZmIj9AYjOsJ4vO7ltv3EAZbjUUumH/IW0GuDhZ41zXDHs9ZFmU+zNFUT9zXh2hopdvw2dFKUJrXgC3fB1su4rwGlBpvj+f1Mrf4Pqr3NyL2beUCfjmTr47evZEkg5a8LOZFhw44I5x7MNyr4AI2FOYfZIBYWmQ9XRWDw1IQ+fDjr67D/EQgybea5bf6Im3kLQL5w6NGZnyIOI0chdQym0cGJcHHRM/PBwINO1CreJk1xorHTSM4Xq44xzvTTEIPc/WPCq6fYjNY4tV879LfTdcSWf1HGpBKKhkicDRiyo8RRyS6CalxDIMk+blv/cVhhi80IDX9qDZzgOYtW3Lw==
  • Authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=epam.com;
  • Cc: "Rahul.Singh@xxxxxxx" <Rahul.Singh@xxxxxxx>, "Bertrand.Marquis@xxxxxxx" <Bertrand.Marquis@xxxxxxx>, "julien.grall@xxxxxxx" <julien.grall@xxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "iwj@xxxxxxxxxxxxxx" <iwj@xxxxxxxxxxxxxx>, "wl@xxxxxxx" <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 11 Nov 2020 15:28:23 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHWtpbuKiRgL1HiZkyNC2yoNcmnl6nC9s6AgAAMvACAAAbRAIAAAv4AgAADNACAAADJgA==
  • Thread-topic: [PATCH 02/10] arm/pci: Maintain PCI assignable list

On 11/11/20 5:25 PM, Jan Beulich wrote:
> On 11.11.2020 16:13, Oleksandr Andrushchenko wrote:
>> On 11/11/20 5:03 PM, Roger Pau Monné wrote:
>>> On Wed, Nov 11, 2020 at 02:38:47PM +0000, Oleksandr Andrushchenko wrote:
>>>> On 11/11/20 3:53 PM, Roger Pau Monné wrote:
>>>>> On Mon, Nov 09, 2020 at 02:50:23PM +0200, Oleksandr Andrushchenko wrote:
>>>>>> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
>>>>>>
>>>>>> The original code depends on pciback to manage assignable device list.
>>>>>> The functionality which is implemented by the pciback and the toolstack
>>>>>> and which is relevant/missing/needed for ARM:
>>>>>>
>>>>>> 1. pciback is used as a database for assignable PCI devices, e.g. xl
>>>>>>       pci-assignable-{add|remove|list} manipulates that list. So, 
>>>>>> whenever the
>>>>>>       toolstack needs to know which PCI devices can be passed through it 
>>>>>> reads
>>>>>>       that from the relevant sysfs entries of the pciback.
>>>>>>
>>>>>> 2. pciback is used to hold the unbound PCI devices, e.g. when passing 
>>>>>> through
>>>>>>       a PCI device it needs to be unbound from the relevant device 
>>>>>> driver and bound
>>>>>>       to pciback (strictly speaking it is not required that the device 
>>>>>> is bound to
>>>>>>       pciback, but pciback is again used as a database of the passed 
>>>>>> through PCI
>>>>>>       devices, so we can re-bind the devices back to their original 
>>>>>> drivers when
>>>>>>       guest domain shuts down)
>>>>>>
>>>>>> 1. As ARM doesn't use pciback implement the above with additional 
>>>>>> sysctls:
>>>>>>     - XEN_SYSCTL_pci_device_set_assigned
>>>>> I don't see the point in having this sysfs, Xen already knows when a
>>>>> device is assigned because the XEN_DOMCTL_assign_device hypercall is
>>>>> used.
>>>> But how does the toolstack know about that? When the toolstack needs to
>>>>
>>>> list/know all assigned devices it queries pciback's sysfs entries. So, with
>>>>
>>>> XEN_DOMCTL_assign_device we make that knowledge available to Xen,
>>>>
>>>> but there are no means for the toolstack to get it back.
>>> But the toolstack will figure out whether a device is assigned or
>>> not by using
>>> XEN_SYSCTL_pci_device_get_assigned/XEN_SYSCTL_pci_device_enum_assigned?
>>>
>>> AFAICT XEN_SYSCTL_pci_device_set_assigned tells Xen a device has been
>>> assigned, but Xen should already know it because
>>> XEN_DOMCTL_assign_device would have been used to assign the device?
>> Ah, I misunderstood you then. So, we only want to drop 
>> XEN_DOMCTL_assign_device
>>
>> and keep the rest.
> Was this a typo? Why would you want to drop XEN_DOMCTL_assign_device?

Indeed it was: s/XEN_DOMCTL_assign_device/XEN_SYSCTL_pci_device_set_assigned

Sorry for confusion

>
> Jan

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.