[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 0/6] vpci: first series in preparation for vpci on ARM
- To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Date: Tue, 14 Mar 2023 20:56:28 +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=gCGo2K1yWc3whjLYAbvm4bc/nJTzqYRDNubeotfQN6s=; b=MI1rx/kclSuQB+UaRc5zLWXcXzjNvBEmoyXgEr0PeEC7g5hKHZbfiodoDHpieb+dSyVzZ6f6HdgNAuWyMyG4CT/sFXyxBKTF7Xr0lk0Fb2/s2EaZk9rOWUpwM1goBzcIbnsUIgK5p8ZmN5o5K4NYZMLENJwNhOI9Xga59polvluZIF+uVDMxG0XVjBEsczigp/BADEUV0l6vRDjd2nLmD9m0Ii2HES+a/alKXcgm4Uc8EoykOe6hIpUOf4Q2JvsG2iDED939DhbVNrJCln+rEWLuVCvR07DywzuZrkiEIfZAfSHnb8PSr6Iy3ETn5WIgYg9/1OytkZAICOT07af+YQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KC+QS4Tfda97B5JX5EyOp/DUgDilagBhIOp5xaWdvjEVRg7xemXl3oNNm4hmu0io7UjGL6hwYKF+WmND86C4g2H8d9TGBkpJx1bjHTgDFCC+zWckTpqKbuvIXoCOhplU3FSy0KXoxg6D1CDFiB3PkWtrKbXXn0t57GKKEddq2Yb1emTY1rDiaPjW6MhWRNnNEYA4+zBo4+uhx4ziqiMEdufRkZtWidjC5Yhdxsw9Dxf4H95mYcefEP1nuRlE1ObWbhyFE0nH/bQLdUl8XbdtEAi86tRIhvgT57hHXjKjSprKGNINIv4Ob16aARFiAfEtNqn5ErIUP9U2cbPtyRB4ww==
- 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>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>
- Delivery-date: Tue, 14 Mar 2023 20:57:40 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHZVrdy6rMOYMwx706MoeCGqRZxrA==
- Thread-topic: [PATCH v3 0/6] vpci: first series in preparation for vpci on ARM
This patch set is spiritual successor of "[PATCH v2 0/4] vpci: first
series in preparation for vpci on ARM". But most of the contents was
reworked. Main aim of those patches is to allow vPCI MMIO handlers to
work with DomUs, not only with Dom0. To do this, we need protect pdev
from being removed while still in use.
Jan suggested to use reference counting for this. So this series
include patches from other series ("[RFC] Rework PCI locking") that
implement reference counting for pdevs.
With reference counting implemented, it would be possible to make
further rework of PCI locking.
Oleksandr Andrushchenko (1):
vpci: restrict unhandled read/write operations for guests
Volodymyr Babchuk (5):
xen: add reference counter support
xen: pci: introduce reference counting for pdev
vpci: crash domain if we wasn't able to (un) map vPCI regions
vpci: use reference counter to protect vpci state
xen: pci: print reference counter when dumping pci_devs
xen/arch/x86/hvm/vmsi.c | 2 +-
xen/arch/x86/irq.c | 4 +
xen/arch/x86/msi.c | 44 ++++++-
xen/arch/x86/pci.c | 3 +
xen/arch/x86/physdev.c | 17 ++-
xen/common/sysctl.c | 7 +-
xen/drivers/passthrough/amd/iommu_init.c | 12 +-
xen/drivers/passthrough/amd/iommu_map.c | 6 +-
xen/drivers/passthrough/pci.c | 141 +++++++++++++++--------
xen/drivers/passthrough/vtd/quirks.c | 2 +
xen/drivers/video/vga.c | 7 +-
xen/drivers/vpci/header.c | 11 +-
xen/drivers/vpci/vpci.c | 31 ++++-
xen/include/xen/pci.h | 18 +++
xen/include/xen/refcnt.h | 59 ++++++++++
15 files changed, 293 insertions(+), 71 deletions(-)
create mode 100644 xen/include/xen/refcnt.h
--
2.39.2
|