[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>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 17 Nov 2022 14:33:16 +0100
  • 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=9ogx26bF65DqYPWtbZlo99oztsooSlTMopXO4O6WJnE=; b=eL/2/9+G7Hl//x8eIWIGwk5P47F3NihfEfyEwW8uKSH4dVGtZ5/9y4AflHykHkKUsN5YlQJe8Tkuli9HGgY7Xz3LbPo+pkaGBEUSE5JDSkEZo5YMsxl+2BmcIfivFK9QH0jCMXls2X55qnJyKD1SnwXfOTpO8ABzynKQau9YPeYnSpeH40xcsE79U2M2YphrtSTeEvWeSnDJ4WbT+PZCot3qeNpXAu+9mNLJ/R/rK/qJcavYKHepUucALe6FcJQin7DuIA9ZLUljcSCUAvt2S4vXVckBXyIaiHS400gXeTGD9SogL9JwdJ/P69zUJh5V5kbB5Rjo6JbmZA8oEiuPAw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d+qBLtn03a0+ndnHWxB90txpYFAiWylJqiOBvX/6oEQ2CIAGudvmD2D+L1lTgnCF4+J4DfIBgnKvxruHtCGDnOq8j/ChPLNmFNbRPaCALFaiVxjAtK6SIgAWT2Xwot6lcNeJ80X9C72nvGKOa5r4IAzf96TWNFp5BXL+Pwy4hWOvn+q3yFtSBu1xebkCcAQaJwQO4PV+Rl7XJJaPMieuWtT3Y69l5FY6nt+Rj3ih0n+GvK5NoxnnP2s1344CkzETK77S4uJ8be0f1qQSh9+NnDDFxHb+pndWfQqr/7HBWREs4gwhcczulrS51+aYL8R/T2kdzcYPjbVQgV5nyl0QfA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: linux-kernel@xxxxxxxxxxxxxxx, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, "moderated list:XEN HYPERVISOR INTERFACE" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, David Vrabel <dvrabel@xxxxxxxxxx>
  • Delivery-date: Thu, 17 Nov 2022 13:33:59 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 17.11.2022 14:13, Marek Marczykowski-Górecki wrote:
> On Thu, Nov 17, 2022 at 12:54:51PM +0000, David Vrabel wrote:
>> 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.
>>
>> The use of MSI-X interrupts is conditional on only the MSI-X Enable bit.
>> Setting MSI-X Enable effectively overrides the Interrupt Disable bit in the
>> Command register.
> 
> That means the second chunk of the patch may even drop the '(new_value &
> PCI_MSIX_FLAGS_MASKALL)' part, right? 
> 
>> PCIe 6.0.1 section 7.7.2.2. "MSI-X Enable ... is prohibited from using INTx
>> interrupts (if implemented)." And there is similar wording for MSI Enable.
> 
> And this would mean the 'field_config->int_type == INTERRUPT_TYPE_MSIX'
> part isn't necessary either.
> 
> Jan in another thread pointed out that disabling INTx explicitly is
> still a useful workaround for a flawed hardware. But if that isn't
> mandated by the spec, maybe it doesn't need to be enforced by pciback
> either?

Well, allowing a device to go into a mode exhibiting undefined behavior
is what we ought to prevent when it comes to a DomU doing so vs overall
host safety.

Jan



 


Rackspace

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