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

Re: [PATCH v1 11/14] xen/arm: Enable the existing x86 virtual PCI support for ARM.

  • To: Oleksandr Andrushchenko <andr2000@xxxxxxxxx>, Rahul Singh <rahul.singh@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 25 Aug 2021 08:35:01 +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-SenderADCheck; bh=kicHXpv8I9S6Ejo5Pf2BRw/rIBC0mUy00Ns6/mfZ2/4=; b=GxGWaF7II3fNmP/htxSPAolI2y9YxS8JeRGQ49COIE5/CSnact2HVQ4cAJf6qlDyAHHqxLudHDlmiplOoezMuJ9in9OoQNRfwsjLjuYIZk940iU8o7XsFV73XEk3zf3YxHRE3iFeiC5rG2BWrhzVGLj/otFMGCGz3dtgVv5nwa2+jYKW2GZ4J0ZnoDddykAmPhzV/uZN+lnvMkeeizkfwxdXNl+H0k5ReDMQJZZqohsRm3UEQoP9zVPKJm4Qr89kmIQQwcRNaEZNTVDZt+D6vB11dSkYexQCAx5I1arPiIDnQZWcDwTya9sWDfv+W4hOEIcWv62nsyz/VJmHFERkEw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PAYIUY/HWtOH2tC8+Ru1S9qQnmrlc0RehQQG6vdQ+K6/OVxHCQW3CK9NVgNiF5haCotc1h36bBtba/JYGlyhzATIecOfwYYOhygjnS9d1UXuirCD8RlnMSrlq1nhzAVHaGrF4V4EoAPz0+LZ18Gw1MQoeVow0YgOI5ULBXheEb5gVh6aqZsuc1Nh9FrIgQR/3dqSvejp7HsYyEyd7vUi1b6g5HXfMd969Cs8dLS1pfn5zAEQZ5qZVPLAjLwKrKm5XDES514zw8gGkZ19rJglUQK8v79BNfYCdB9A/vL0CHT/C917GCg8SSSyQp1co8Vsn7VlPD3pCILRo273VuJCSg==
  • 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: bertrand.marquis@xxxxxxx, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 25 Aug 2021 06:35:15 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 25.08.2021 07:44, Oleksandr Andrushchenko wrote:
> Hi, Jan!
> On 24.08.21 19:09, Jan Beulich wrote:
>> On 19.08.2021 14:02, Rahul Singh wrote:
>>> --- a/xen/drivers/passthrough/pci.c
>>> +++ b/xen/drivers/passthrough/pci.c
>>> @@ -767,6 +767,13 @@ int pci_add_device(u16 seg, u8 bus, u8 devfn,
>>>       else
>>>           iommu_enable_device(pdev);
>>> +#ifdef CONFIG_ARM
>>> +    ret = vpci_add_handlers(pdev);
>>> +    if ( ret ) {
>>> +        printk(XENLOG_ERR "setup of vPCI for failed: %d\n",ret);
>>> +        goto out;
>>> +    }
>>> +#endif
>>>       pci_enable_acs(pdev);
>> I'm afraid I can't see why this is to be Arm-specific. The present
>> placement of the existing call to vpci_add_handlers() looks to be
>> sub-optimal anyway - did you look into whether it could be moved
>> to a place (potentially right here) fitting everyone? If you did,
>> would mind justifying the Arm-specific code in a non-Arm-specific
>> file in at least a post-commit-message remark?
>> If it were to remain like this, please add a blank line after the #endif.
>>> --- a/xen/drivers/vpci/Makefile
>>> +++ b/xen/drivers/vpci/Makefile
>>> @@ -1 +1,2 @@
>>> -obj-y += vpci.o header.o msi.o msix.o
>>> +obj-y += vpci.o header.o
>>> +obj-$(CONFIG_HAS_PCI_MSI) += msi.o msix.o
>> I continue to consider this a wrong connection - HAS_PCI_MSI expresses
>> (quoting text from patch 1 of this series) "code that implements MSI
>> functionality to support MSI within XEN", while here we're talking of
>> vPCI (i.e. guest support). I can accept that this is transiently the
>> best you can do, but then please add a comment to this effect (if
>> need be in multiple places), such that future readers or people
>> wanting to further adjust this understand why it is the way it is.
>> But perhaps you instead want to introduce a HAS_VPCI_MSI (or, less
>> desirable because of possible ambiguity, HAS_VMSI) Kconfig option?
> Eventually we'll have the code like that:
> obj-y += vpci.o header.o msi.o msix.o
> obj-$(CONFIG_X86) += x86/
> obj-$(CONFIG_ARM) += arm/
> So, this is indeed a transitional change. Will you be ok with a comment
> about that then?

Well, yes, as said - if this is a transitional state, then a comment
will do. I was suggesting the further Kconfig option merely because
all I've been hearing so far was that MSI works entirely differently
on Arm, and hence the MSI code we have is not going to be used there
at all. If that was a correct understanding of mine (including its
extending to vPCI's MSI code), then adding just a comment would
continue to be misleading imo.




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