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

Re: [PATCH] xen-pciback: Consider MSI-X enabled only when MASKALL bit is cleared


  • To: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>
  • From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • Date: Thu, 17 Nov 2022 12:28:46 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=o1Of7SasIvL4zjj/d+LU0bHmOfJWM7Blc34WEI87rO8=; b=gX8iHtN9vx/feTu8TPUcU5sgMiqK9F/3WXE02gaKJAgAbFKzsw6GlEu7B7/jM7kK7UJlsSDZsGwLdnuNWN25Gu3PB2R4BcF8N/MXtpzPA+JZWNzLdy5lvV+0PN1R6iy/Q5ERfCcVOWNWLuF09LtOJkL9hZ0P7w6qaFTEpgTyV5qCt1JhQOLjgAf346Rx/GERn03DQeE93LLCdUuJGNVwMq38V/HfUM4DH4Ne/gcgTL5vsU8JEIsrcbiAbqdGKwLVYIIBaMulTvGA6OnC1+Y7+y+fEojy0IZ6Lq0HpKFRoItBo2zS+nEy/yoxpC7fjBMHnyvfxpUZ2gDNbhbfZcvJkQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hky2llobSglHuLR2C+eV8cHUIuC8wfLG1FD9LeIQrYtrNLUXvHj5U4bMNS8Gl1lWltNEVsUSKaXQrPh6RzqB1iqSBL/yh4JsIRkR0h7//3qy2MgZY4VNC/RLwECUTZamoRX4rmzfZ1SP7qKDxEdffEyWlVd1Q1axvY+40Svx0gPOLzsNYPKNzZV/p8Npkh0bLjrC3DocW9MzEnFVW1QRpZ2MbuGU3KfIUHr1bfH0Ka6XwnJtPChjxlCyUvc51TIHd9AvseXx3CvGhyM7qPJQzZQRGaagPKue4qghj4aQYh5H42bNIO5wiu/xQ/nGBnSIe4CQxsiMK0Ftk1IbvrADyg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, "moderated list:XEN HYPERVISOR INTERFACE" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>
  • Delivery-date: Thu, 17 Nov 2022 12:29:04 +0000
  • Ironport-data: A9a23:sZzEqq2Agk5okDwm8PbD5WBwkn2cJEfYwER7XKvMYLTBsI5bpzZRy WQXX2iDbKmIY2Wkeoonaojg9RsOu5HdyN82GlFvpC1hF35El5HIVI+TRqvS04F+DeWYFR46s J9OAjXkBJppJpMJjk71atANlVEliefTAOK5ULSfUsxIbVcMYD87jh5+kPIOjIdtgNyoayuAo tq3qMDEULOf82cc3lk8tuTS9nuDgNyo4GlC5wVnOqgR1LPjvyJ94Kw3dPnZw0TQGuG4LsbiL 87fwbew+H/u/htFIrtJRZ6iLyXm6paLVeS/oiI+t5qK23CulQRrukoPD9IOaF8/ttm8t4sZJ OOhF3CHYVxB0qXkwIzxWvTDes10FfUuFLTveRBTvSEPpqFvnrSFL/hGVSkL0YMkFulfLSZU+ tc9EW40UR2hwOe5/LGcFsNBr5F2RCXrFNt3VnBI6xj8VK5jbbWdBqLA6JlfwSs6gd1IEbDGf c0FZDFzbRPGJRpSJlMQD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7StEJgAjtbEidz87he4Aot9/lq T52+1T5c9zpoV9V9MDOM4RBcSwEWDDWhTKLSabJknmDrgOPzbXp4fw+6hd3pDiRHUk9upEpH 36aiIviUciP0b1TcGe1pxC9R7ABG27QDT208lbo5x0oKf1SrbnOTCKDAlGqbrqn9wPRsnAH/ qjMpNfBPHuaWPoBIZSxgX7H51fM2MXXsEZsssyH1iOvsXIIIv3sfGzSoeaGJP9VTI/Hm/vCH oKWzb+YM1G80CwQ3f9xAPcXnv8E3aPia6Y0JKqitT75LJ9RbGk6DJl+GhRzvv7WQFqo+gxYF Z0Jq/hn+eyuXS2lFy4nVlUBg==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHY+nmitCFszY02+EavJ4U+R9Py8K5DC1MA
  • Thread-topic: [PATCH] xen-pciback: Consider MSI-X enabled only when MASKALL bit is cleared

On 17/11/2022 11:41, Marek Marczykowski-Górecki wrote:
> Linux enables MSI-X before disabling INTx, but keeps MSI-X masked until
> the table is filled. Then it disables INTx just before clearing MASKALL
> bit. Currently this approach is rejected by xen-pciback.
> Allow setting PCI_MSIX_FLAGS_ENABLE while INTx is still enabled as long
> as PCI_MSIX_FLAGS_MASKALL is set too.
>
> Fixes: 5e29500eba2a ("xen-pciback: Allow setting PCI_MSIX_FLAGS_MASKALL too")
> Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>

The PCI spec states that devices are not permitted to use INTx when MSI
or MSI-X is enabled.  The mask status has no legitimate bearing on irq type.

INTx_DISABLE exists as a bodge to mean "INTx not permitted even when
neither MSI nor MSI-X are enabled", and exists because in some case,
transiently disabling MSI is the only safe way to update the descriptor.


I can believe that this change fixes a an issue, but the logic surely
cannot be correct overall.

~Andrew

 


Rackspace

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