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

Re: ARM/PCI passthrough: libxl_pci, sysfs and pciback questions


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
  • Date: Tue, 27 Oct 2020 17:45:44 +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=QxMtAn0oVQ8AIZRTVRlBeBKcXCog6gx3h8ndcnk02q0=; b=d+wgvZZ475zOBXTJ8Mx1XBBQjIrYfvrULco5ntlZr82YCaybkyI46zJ5S81R/aXhnjjqWHq74Q8G2KPutsPb4BGb7RsgloLEVEn1ZN3SIYv4USGMzCSzVgN3O664BcJXKyj2cGEGmqPm2FSyJ8TSSq+HMT4QUlzHovyAfEI01IpRRY881tkmqnxIBUV2QuII/Xm9QIEbaxKhInmNQgrrxf5UbzMj83YVc7Ki0iY9y5IinIFDbwGaeyReo/CxxmlT8Jj2A5RBwiP1p+3rOBDuZa4EuQ4SbaC1DGeQRJjfa9OU2LGRaA9I/SzrdFmAAeRqCVeYLAwaLYyrObjxsL7Wbw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FpNNHHQG/GlLyivcHn2uUx5U1NBgqlmw36XjSD4XPaGeDizIvcHmb+6n2HHHiTPxVOZXys6hom9+yeyfyl9/3nrtsu++GKHuK/tTuwBwBrKtJ//ZgSt0sltDymluSsREJq1uI2hTKMlfQZvWfKxTRmr8XesyjpMdfTHhGgtMQfcGM0WB5Kugbz6aRvU/GBR35fpcdK3LIiRUqJCpui8A4IaeMU6Tq8vHmzoMbrj6KvF5bSxBEa8VZCUAxxwgGAh8dF2QiabQK2cPUDrWIIa94v6HhFfEPVUo5JwyjNLc/3PZ64u9EnJalMl1MBxdzbILUICCDytHD10pF9eyGgbvbw==
  • Authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=epam.com;
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, "andrew.cooper3@xxxxxxxxxx" <andrew.cooper3@xxxxxxxxxx>, "george.dunlap@xxxxxxxxxx" <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "wl@xxxxxxx" <wl@xxxxxxx>, "paul@xxxxxxx" <paul@xxxxxxx>, Artem Mygaiev <Artem_Mygaiev@xxxxxxxx>, Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Rahul Singh <Rahul.Singh@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 27 Oct 2020 17:45:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHWrEfNmyZZUV4zgEum5lDBP9dPxqmraEMAgAAxlICAABfnAIAAB66A
  • Thread-topic: ARM/PCI passthrough: libxl_pci, sysfs and pciback questions

On 10/27/20 7:18 PM, Jan Beulich wrote:
> On 27.10.2020 16:52, Oleksandr Andrushchenko wrote:
>> On 10/27/20 2:55 PM, Roger Pau Monné wrote:
>>> On Tue, Oct 27, 2020 at 09:59:05AM +0000, Oleksandr Andrushchenko wrote:
>>>>     5. An alternative route for 3-4 could be to store that data in 
>>>> XenStore, e.g.
>>>>        MMIOs, IRQ, bind sysfs path etc. This would require more code on 
>>>> Xen side to
>>>>        access XenStore and won’t work if MMIOs/IRQs are passed via device 
>>>> tree/ACPI
>>>>        tables by the bootloaders.
>>> As above, I think I need more context to understand what and why you
>>> need to save such information.
>> Well, with pciback absence we loose a "database" which holds all the 
>> knowledge
>>
>> about which devices are assigned, bound etc.
> What hasn't become clear to me (sorry if I've overlooked it) is
> why some form of pciback is not an option on Arm.
Yes, it is probably possible to run pciback even without running

pcifront instances in guests and only use that functionality

which is needed for the toolstack. We can even have it as is without

modifications given that pcifront won't run and that part of the pciback

related to PCI config space, MSI etc. won't simply be used, but still

present in the pciback driver. We can try that (pciback is x86

only in the kernel).

> Where it would
> need to run in your split hardware-domain / Dom0 setup (if I got
> that right in the first place) would be a secondary question.

This actually becomes a problem if we think about hwdom != Dom0:

Dom0/toolstack wants to read PCI bus sysfs and it also wants to access

pciback's sysfs entries. So, for Dom0's toolstack to read sysfs in this scenario

we need a bridge between Dom0 and that hwdom to access both PCI

subsystem and pciback's sysfs: this could be implemented as a back-front pair

with a ring and event channel as PV drivers do. This approach of course will

require the toolstack to work in two modes: local sysfs/pciback and remote ones.

In the remote access model the toolstack will need to create a connection to

the hwdom each time it runs and requires sysfs data which should be acceptable.

It can also be possible to have the toolstack always use the remote model even

if it runs locally which will make the toolstack's code support a single model 
for all

the use-cases.

(Never thought if it is possible to run both backend and frontend in the same 
VM though).

> Jan

Thank you,

Oleksandr

 


Rackspace

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