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

Re: [PATCH v2] xen-pciback: Consider INTx disabled when MSI/MSI-X is enabled


  • To: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 18 Nov 2022 08:36:14 +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=9Z7ea5Z9iV01gyTI2NFbO5Cm6k11JK+P6Gpe9r0UKkI=; b=hRsslaxYLfTz/AiEJ6fNPdqdS4lb6XGwlOKJs4BhNX6mKb00ZCWDIuj4sYfh30r9EuOEva5j/Q/1eJGZmbi5VW1BuP/HT9fcffeflPuA4SAefPp5FCJM+iAzdKKcHLEltPiOw1w4eTEAkrm/ko6zUmcCbbafGHqJWX8Gnp5QQG4Y+BJ0mSLsmIz/Kf0+P41Y5su5XvNXeeyaFuQMoQtDjOKJki5nc0yvwk9a4xwye4r8dvKdiiA6oS2dvOQwWgQe9Ga1/bS5Gmuhd9QZKuJgZfHSQic3YkXbDn4UEeVBP09bm6Htsiw0eipspIU624OpRNAcK3WjISZNa6kxpN4wLg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PoaP9uPeYmhPMDFdL6l5oGbwhJJYjnLOsODq0wDV4SmYq7wvZrk9nNHyjPsAFTAS5XpnKSVT4OR46aZntMsYLOrdwyBjzLYSajHZhokA8nVm5jZF5nb/sFT6/sxalJfv5dwS6+sN4T1iXZjeJNFAwFUQTiYwTZwcdaGHvNkYhQ36DkwdKcHDgyR4Aiir5KJ849m5z+zao4gEFvlVr5jIlzgwffTCbsRU94l/79uwbZmniSmbhLMGcqwaLzaA5olVIPqO2IarlCxfEdaUF/Ytxxd2Og8/yMcyguNyg9mzHmAXwPrK5IrYIzbG2LOVx/GWysN7gPrHpZ6vQlsNeptS1w==
  • 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>, linux-kernel@xxxxxxxxxxxxxxx
  • Delivery-date: Fri, 18 Nov 2022 07:36:28 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 18.11.2022 03:35, 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.
> According to the PCIe spec, device cannot use INTx when MSI/MSI-X is
> enabled.

Similarly the spec doesn't allow using MSI and MSI-X at the same time.
Before your change xen_pcibk_get_interrupt_type() is consistent for all
three forms of interrupt delivery; imo it also wants to be consistent
after your change. This effectively would mean setting only one bit at
a time (or using an enum right away), but then the question is what
order you do the checks in. IOW I think the change to the function is
wrong.

Furthermore it looks to me as if you're making msi_msix_flags_write()
inconsistent with command_write() - you'd now want to also permit
clearing "INTx disable" when MSI or MSI-X are enabled. Which, I think,
would simply mean allowing the domain unconditional control of the bit
(as long as allow_interrupt_control is set of course).

Especially with these further changes I'm afraid at least for now I
view this as moving in the wrong direction. My view might change in
particular if the description made more clear what was wrong with the
original change (476878e4b2be ["xen-pciback: optionally allow interrupt
enable flag writes"]), or perhaps the discussion having led to the form
which was committed in the end.

Jan



 


Rackspace

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