[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: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 17 Nov 2022 14:43:01 +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=8BdQr5hmwXN65YhynlS5KUnisl+BNxZqEDvcJQUzAEk=; b=kO5ixbaokZtU89YWyUa7Nwu8EDz4RuM+OoM4GZA2ii3Mcs1HHlaSTdf4I0LN0gRIZwhIkv9o591o2Sx7gQ8CJ1aFjMZBq6e/3f9dENng8tFZoqaYR3fqNemfza0oIGUT2AjpkwYw37ei0bxCosAGEok4VWgxudU1al6d3vT3JDcOHZbMw0cNvwCvX3fjx+LHVAl851oOu8KdvUHBwtkVMUdtFan5Qi5hqA2Sx7Sa/xnlF1oUnEseJrI7etbv3aoz4X+6Wf9Gg2pYwDrTLuOPNejIHz48t7ZCydwS0b+9WgkMP2nDUR8j9oWe4LdFWkg5A5h5bPTDC3cd57H6AciMyw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NKo2wddXWEr3NtdBocU7IAnWj/AjFb+f1NOomQ8d/pxiewZVKmHBomgx72KA4xH9t7CqGGwX4gw+Em/t7Q4AUUh+xIaHGpvJlOKKo+/imBKUKXYLMnWDjKmp4QNkUmbwQ0tC2UgY46WiPWEhy59oPqYougEsv/MrQzaLTLp9u7cAQFwMgYwYYJOkEEUp0pt2PyxQ0p6yPOVW9q8eYDBWNBhGYR60JJOEc9mkahLsAaxXrteHPaSI1fcnv5zj13r/F2xyzpde8cwi6UBV/AjTnbYRJpavIkVE4hleCvw2H4r3TT/iDuiiiSZC3SD1Bis1d3heCYqtgDLkdqqJ3R+5rg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, "moderated list:XEN HYPERVISOR INTERFACE" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 17 Nov 2022 13:43:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 17.11.2022 13:28, Andrew Cooper 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.
>>
>> 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.

Question then is - what can we do without altering the sequence of steps
Linux (and likely other OSes) take? Imo Marek's proposal is the least
bad option, because everything else would be more intrusive or wouldn't
take effect for existing released kernel versions running in guests.

Jan



 


Rackspace

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