[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 1/1] xen/pci: Install vpci handlers on x86 and fix exit path
- To: Bertrand Marquis <bertrand.marquis@xxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Wed, 20 Oct 2021 09:16:53 +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=lzKpWBmNCVdXzMMpesGqb9CpcVPnwTl3L1TXTsA2oHw=; b=kdF0UGQI0Iki4Dizn5G23oBPzi0jodhgln8oG9iLtXqWrrIc7TiXrRUBKA71YjBqyFKtx+jKQnIk7tF7XbLyBSSin9PgfUSudo2uX2w7RrDTHO7zm6wsj9bwxpJJLoq90ukXl5GRrbtX1Ks1GWfZtBpmwKpKKV2lAOapFr9grAImRicx8lnEmmnQOOViX8FZIIwiLVc00vhumsqTIdeA0YsPfitOzZKYShBRFAh+d8G0TACUHHyp6ChY5jUkYKpnmNYQlTqfYll8p5RnHl2Km3gMKTaciZ4dIcWzAh8cMYIVdttL8wxiZao9UqkxfzoRvE6D1Z+RG8armdhpuAJkgw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jPtOOwFZWoJF43jY7y3pXZFxbtWfETgraQ6Xd2V/otyiXITb8JclZgMXDv+VLYd+zOXuJLPOEcQVdH+vF/DR29ZnDZNUKU6JTVBoBpkiSNC9/6btrsiuWm+D/Bu92t8xsn3+x+Cai5gc6MqpcOavnrMghuv6u+hVjrpTGOjLrC/Z2NgOlpv9Mwotv4HqI+Wivufya/wlzD8PiFXxsYVuhrnFdpP2vI6T8ArxcjeX0RDoizUQCTFyIJlOf3GJfwUa0Urbtl06/8uFmPRMtcPWr0PiLF6tSNyfnvUzhqfpwnplnTo9L8G4FONB0wj14fN/810wgxQWaXusTh4pS2kboQ==
- Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
- Cc: iwj@xxxxxxxxxxxxxx, Oleksandr_Andrushchenko@xxxxxxxx, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Paul Durrant <paul@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Wed, 20 Oct 2021 07:17:10 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 19.10.2021 18:08, Bertrand Marquis wrote:
> Xen might not be able to discover at boot time all devices or some devices
> might appear after specific actions from dom0.
> In this case dom0 can use the PHYSDEVOP_pci_device_add to signal some
> PCI devices to Xen.
> As those devices where not known from Xen before, the vpci handlers must
> be properly installed during pci_device_add for x86 PVH Dom0, in the
> same way as what is done currently on arm (where Xen does not detect PCI
> devices but relies on Dom0 to declare them all the time).
>
> So this patch is removing the ifdef protecting the call to
> vpci_add_handlers and the comment which was arm specific.
>
> vpci_add_handlers is called on during pci_device_add which can be called
> at runtime through hypercall physdev_op.
> Remove __hwdom_init as the call is not limited anymore to hardware
> domain init and fix linker script to only keep vpci_array in rodata
> section.
>
> Add missing vpci handlers cleanup during pci_device_remove and in case
> of error with iommu during pci_device_add.
>
> Add empty static inline for vpci_remove_device when CONFIG_VPCI is not
> defined.
>
> Fixes: d59168dc05 ("xen/arm: Enable the existing x86 virtual PCI support
> for ARM")
> Suggested-by: Jan Beulich <jbeulich@xxxxxxxx>
> Signed-off-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
I'm inclined to suggest s/exit/error/ in the title though (and maybe
also s/path/paths/), which would be easy enough to do while committing.
But first we need Roger's ack here anyway ...
Jan
|