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

Re: [PATCH v4 3/3] xen/pci: Refactor MSI code that implements MSI functionality within XEN


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Rahul Singh <Rahul.Singh@xxxxxxx>
  • Date: Wed, 5 May 2021 16:09:04 +0000
  • Accept-language: 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-SenderADCheck; bh=OHFEARos+GDi/KDwP4pXzymCjfeDMFFW90uUpGKgo5k=; b=ZFma4G12mfSBu0+cl3BdTi2sCYuacH365n2DiLl1AVX4LNGbMvZDZYWwJ/UdXLuSPnPIGF3XCNnrDO+nJcZyitzU1BsRNRyFdNO1fWShgodOZxe6vwwHm0Q/ubKu8+k1W32KrSsdQLnBM2bDkps7a4jASlolHZqnXXaMHfk45zrR5/C0En9cE2suRGVIPPCpMqtUtTQg1wrKmiBhbrNVeBHfPrGiwq7lChWfJU6P6n27wjM2Y/zQ6rhAWgqTcOfI9OLZFYjshSPvB1PgLrAKAGpouVz2LbCqUPCj8/yJXEucWljBQE23Y2Oz4rR+6j0a+QsAT5qmpVIa410UvAMhwQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QbYrVhW2tBUTx29sv/HakeewpQJ3W/LMY/aWgk/yfCalDS7XiGvKJvwpQtQEv6Ay72PUto6eaQmNFRZmE1hPXjhi6DrFiV1g0zFKGNPZEVA3tUHzZw8qgrLnUf/a99rIPBn9HSOD38BEmECPGClNsAOSFvGSH8az2D6io20arpDA5CQ/KZkZFaVXmvtfmFVGKbRdtj+KOcD0d0bDk3wvnBXESqoSzfWNGwyJ4NsmJitdtETa1yYvvDKYXF+0VmMPu8UcOuigIWRvLaCObk3jB4tukuxTuu1HerOTW6VqGkg21esofs9EzzjOHoY0xffLosijFujO8mvDgbD2VizvKw==
  • Authentication-results-original: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Paul Durrant <paul@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 05 May 2021 16:09:39 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHXPQazY/ZH45uzJE6do+Ec+TuCsqrR3C4AgAM7s4A=
  • Thread-topic: [PATCH v4 3/3] xen/pci: Refactor MSI code that implements MSI functionality within XEN

Hi Jan,

> On 3 May 2021, at 3:46 pm, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> 
> On 29.04.2021 16:46, Rahul Singh wrote:
>> MSI code that implements MSI functionality to support MSI within XEN is
>> not usable on ARM. Move the code under CONFIG_HAS_PCI_MSI_INTERCEPT flag
>> to gate the code for ARM.
>> 
>> Currently, we have no idea how MSI functionality will be supported for
>> other architecture therefore we have decided to move the code under
>> CONFIG_PCI_MSI_INTERCEPT. We know this is not the right flag to gate the
>> code but to avoid an extra flag we decided to use this.
> 
> My objection remains: Actively putting code under the wrong gating
> CONFIG_* is imo quite a bit worse than keeping it under a too wide one
> (e.g. CONFIG_X86), if introducing a separate CONFIG_HAS_PCI_MSI is
> deemed undesirable for whatever reason. Otherwise every abuse of
> CONFIG_PCI_MSI_INTERCEPT ought to get a comment to the effect of this
> being an abuse, which in particular for code you move into
> xen/drivers/passthrough/msi-intercept.c would end up sufficiently odd.
> (As a minor extra remark, putting deliberately misplaced code at the
> top of a file rather than at its bottom is likely to add to possible
> confusion down the road.)
> 

I understand that this is not the correct flag to gate the code. If we choose to
move the code under CONFIG_X86 there will be #ifdef in the common file
"passthrough/pci.c” that I think will make code harder to understand. The only
option left is to introduce the new CONFIG_HAS_PCI_MSI  option and new
non-arch files (msi.c, msi.h). Move all non-intercept-related code to those 
files.

As I mention earlier also this is code and as of now we have no data on how MSI
will be supported for non-x86 architecture that’s why we decided it is better 
to move
the code under CONFIG_PCI_MSI_INTERCEPT and later point in time we can
modify the code once non-x86 architecture implements MSI functionality in XEN 
if required.

I will move the code at the bottom of the file to avoid confusion.

Regards,
Rahul
> Jan


 


Rackspace

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