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

Re: [PATCH v8 00/13] PCI devices passthrough on Arm, part 3


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Date: Thu, 20 Jul 2023 00:41:18 +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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Rulf/RP7oBEruDr9bd9TTNzHsH02ElpBeA6ViNtKzRM=; b=BMskddhvCmXERZie/NwBaYAvIRuFHB5EhtD/nlQGqgXXZESD5xtxgNuOmA6Y+sNtEwN3zptMjfoIy28slNNlaMefOU8sOylvrx4xldEZg/5KyPblGsoz9UCMvvmQO7+T+WTvpXC6/jtC6e1PrzRbEyzW7byxsI1x5FfdsFGkwV1sf5x2YocbzTjyzUkWmZwDcjkUPJ7XXz4C6blsBcBOxFfjHfp8akfo5ri49TG5o3eTGqrO5rM0jmnGoQ0zB+nyDSFAwpgtpyPzR7NMivo6LJBeWnd+5FOKpkCVrZH36+efOLpp6hwLQnYyLtBtk6VSuVWUDoo85yWFna4ziRLA4g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Lnn3e5N8sPwD2uhw0JChihMTjNoNbR8fH0hY7yfPTjnc5VnJVUFFUJZp1YsXVeilJ3p9xGOUpAHTEWsIWCleHaMpK9+nvuTvyVV7nyxbqjIdjRyVZm1IV2w0C1npfB3w8eblEqzXBY7bOEtY7LUKUHctxwI/ro7HlTT8yCHi5Y126p+WrZ6rhDz5iL5naZKkqWZZslJaNrjCsQe3p0hOKlm1L9KaIqnRTn6OKWld6osrI3y/UTa0/huNkW5/IOi3HR/mRYD3PGRGrxWoNgWw31xqEE35vsIKn4n0M9AUoxurdvoSHnGeWxySGMGRNPXsrweMhHkxcHid3u6fSWSPrQ==
  • Cc: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Paul Durrant <paul@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 20 Jul 2023 00:41:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHZuqGqn2EU3dWVak6ca3YhrfMkhq/Bz9WA
  • Thread-topic: [PATCH v8 00/13] PCI devices passthrough on Arm, part 3

Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx> writes:

Hello again,

Looks like I messed up with add_maintainers script and sent this series
without proper CCs. So I am CCing all interested persons only in this
cover letter only.

Sorry for the noise.

> Hello,
>
> This is next version of vPCI rework. Aim of this series is to prepare
> ground for introducing PCI support on ARM platform.
>
> The biggest change from previous, mistakenly named, v7 series is how
> locking is implemented. Instead of d->vpci_rwlock we introduce
> d->pci_lock which has broader scope, as it protects not only domain's
> vpci state, but domain's list of PCI devices as well.
>
> As we discussed in IRC with Roger, it is not feasible to rework all
> the existing code to use the new lock right away. It was agreed that
> any write access to d->pdev_list will be protected by **both**
> d->pci_lock in write mode and pcidevs_lock(). Read access on other
> hand should be protected by either d->pci_lock in read mode or
> pcidevs_lock(). It is expected that existing code will use
> pcidevs_lock() and new users will use new rw lock. Of course, this
> does not mean that new users shall not use pcidevs_lock() when it is
> appropriate.
>
> Apart from locking scheme rework, there are less major fixes in some
> patches, based on the review comments.
>
> Oleksandr Andrushchenko (12):
>   vpci: use per-domain PCI lock to protect vpci structure
>   vpci: restrict unhandled read/write operations for guests
>   vpci: add hooks for PCI device assign/de-assign
>   vpci/header: implement guest BAR register handlers
>   rangeset: add RANGESETF_no_print flag
>   vpci/header: handle p2m range sets per BAR
>   vpci/header: program p2m with guest BAR view
>   vpci/header: emulate PCI_COMMAND register for guests
>   vpci/header: reset the command register when adding devices
>   vpci: add initial support for virtual PCI bus topology
>   xen/arm: translate virtual PCI bus topology for guests
>   xen/arm: account IO handlers for emulated PCI MSI-X
>
> Volodymyr Babchuk (1):
>   pci: introduce per-domain PCI rwlock
>
>  xen/arch/arm/vpci.c                         |  61 ++-
>  xen/arch/x86/hvm/vmsi.c                     |   4 +
>  xen/common/domain.c                         |   1 +
>  xen/common/rangeset.c                       |   5 +-
>  xen/drivers/Kconfig                         |   4 +
>  xen/drivers/passthrough/amd/pci_amd_iommu.c |   9 +-
>  xen/drivers/passthrough/pci.c               |  96 ++++-
>  xen/drivers/passthrough/vtd/iommu.c         |   9 +-
>  xen/drivers/vpci/header.c                   | 453 ++++++++++++++++----
>  xen/drivers/vpci/msi.c                      |  18 +-
>  xen/drivers/vpci/msix.c                     |  56 ++-
>  xen/drivers/vpci/vpci.c                     | 176 +++++++-
>  xen/include/xen/pci.h                       |   1 +
>  xen/include/xen/rangeset.h                  |   5 +-
>  xen/include/xen/sched.h                     |   9 +
>  xen/include/xen/vpci.h                      |  42 +-
>  16 files changed, 828 insertions(+), 121 deletions(-)


-- 
WBR, Volodymyr


 


Rackspace

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