[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: Jan Beulich <jbeulich@xxxxxxxx>
- From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
- Date: Wed, 20 Oct 2021 07:20:05 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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=pgLoShxjE0tsm+9XqRmsUpQMj7E0iZFFD1gvy2/y5Ko=; b=gi1Uh/v9sYxLDfu6PtOMgJj7JIDevp5QLdbu1CNF2KV9DLIH7qxG4pwLAtFnsV6QTZgV7DJADCqaVog2QmdXttT+jMFAvcguPAe4pQ3kVG1dytGwZd2maog19PabAf2B/8iQCKXL2+CCTBHm1+XX95+b4re/3HiXetqeFlhXu2SS2D+7ACW4o7J64UVCgYYG/yg5WYWd3KTnhvQYkxbbh49IJT8vFGv84silVIuPmcUQOUpLqxecPPexgh5KBld/1RALo6Ed35dX/dfOkQicg8QCG4d1umigF9K//pKhSWUhZzZpUumCjZKHsx8HuWFXwhPzSGgkhvJjOqcvrwK1Sg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZX1BEcWDHmgE5jtJWj4/g7zT2ok2YB0w+sxuWMdRjd1shnuqg7DIN0eCEj/pkd5mrCuCxX4Dd6VzajAhT5OHEHA/O+3Sxlp3q7knsaloAd9rBWByGyJTeHhPJzSlJxoJQY1ryKGht9m7CWexTxrCeavBTVpJkxegbtP9sP7k9vicmlvm9/HoHVr2VfTkrJjo1Z4b8YaszpFcof9UlOGVScs4rzTfhaHLno79xAF0iIfF18PYpa6wbfbR7f5Ww7C6tIKGT6U3Y8x5LDDXGm2dJ4YesMWkHm9KV6/YMyGBv4XpSv9RXNKA+2LlR+WwH1+yjaZqPl4k7kK2mdriSO/mHw==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: Ian Jackson <iwj@xxxxxxxxxxxxxx>, "Oleksandr_Andrushchenko@xxxxxxxx" <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" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Wed, 20 Oct 2021 07:20:32 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Thread-index: AQHXxQOsddT9Ttg6SUi4XsLpyj6SjavbeuKAgAAA5YA=
- Thread-topic: [PATCH v2 1/1] xen/pci: Install vpci handlers on x86 and fix exit path
Hi,
> On 20 Oct 2021, at 08:16, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>
> 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>
Thank.
>
> 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.
@Ian: Please tell me if this is ok to be fixed during commit.
> But first we need Roger's ack here anyway ...
Yes.
Cheers
Bertrand
>
> Jan
|