From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE7061E515; Mon, 11 Aug 2025 22:47:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754952421; cv=none; b=HV5LvdD80J4PBJgIPoupEyI1N62JuA6JZn9KR8te7ppHwWFK1kJ9PrZQEJYGk8655xhbKUXMqjONMbi3izcTF0LmKHWCsayzXkYmvjNeQuJXs8QMlzsfqfY5+udwJTPEXQbYanbRkwo5vJBmfgTAdKsrsF2+GF6FQt6dp+e30lA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754952421; c=relaxed/simple; bh=f+O5W/S8/rdvyjkv3EVe3Crl1oeO2GsIjPKFm2BH7LA=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=KgLW3iANBb22ZZL50Js4H7KH3DUB9zBHsmY0HqI3s+W6bjw7Qm3rX+Bys7f59+MS4izopNLBQWa7GOL+U8GuqcmKX4vGdTa3ZdBcKycdC0kfFpRvv0vqZowQoowHeS9T4L3HtIYaWKsPa19bn+7i5mmn0f4E7lWwKseL0i0FxVY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KST1rq0/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KST1rq0/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C52BC4CEED; Mon, 11 Aug 2025 22:47:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754952421; bh=f+O5W/S8/rdvyjkv3EVe3Crl1oeO2GsIjPKFm2BH7LA=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=KST1rq0/HEGi6IK4W8bLHuVN8/vwyFzvkVBaHCRntvyjXmLLrXaVl2g4Bi8jp8opq LmZOqD8bJJm2Sc+l+oBoK9Ei0cgl+uNaa/FAne8+VFttbnolMQ7Ibk5H+KLtvyQkEn xF3wG3+l+hPU641s6dBvRANhyfJTLzN8BTKugL21SZ2knEtVaVU95soNgjHKxh5/s/ 4etacMu4FJNaAfcyUbOFm76IbfiC+E06GHGErR7AM1zBlav4DFOsuXPI+co+3KAgFt iYhd8EGaPBrxt8nqvs0ySiWxXK5gxKIOxyTr3OP/G40j2wgkWfDVXNmhcGROfPEsia Q1JNfU9FSZSgw== Date: Mon, 11 Aug 2025 17:46:59 -0500 From: Bjorn Helgaas To: Nam Cao Cc: Nirmal Patel , Jonathan Derrick , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Bjorn Helgaas , Thomas Gleixner , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Ammar Faizi Subject: Re: [PATCH] PCI: vmd: Remove MSI-X check on child devices Message-ID: <20250811224659.GA168102@bhelgaas> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250811053935.4049211-1-namcao@linutronix.de> On Mon, Aug 11, 2025 at 07:39:35AM +0200, Nam Cao wrote: > Commit d7d8ab87e3e7 ("PCI: vmd: Switch to msi_create_parent_irq_domain()") > added a WARN_ON sanity check that child devices support MSI-X, because VMD > document says [1]: > > "Intel VMD only supports MSIx Interrupts from child devices and > therefore the BIOS must enable PCIe Hot Plug and MSIx interrups [sic]." Can VMD tell the difference between an incoming MSI MWr transaction and an MSI-X MWr? I wonder if "MSIx" was meant to mean "VMD only supports MSI or MSI-X interrupts, not INTx interrupts, from child devices"? I put this on pci/for-linus for v6.17, but it seems like we might want to clarify the commit log. > However, on Ammar's machine, a PCIe port below VMD does not support MSI-X, > triggering this WARN_ON. > > This inconsistency between the document and reality should be investigated > further. For now, remove the MSI-X check. > > Allowing child devices without MSI-X despite what the document says does > sound suspicious, but that's what the driver had been doing before the > WARN_ON is added. > > Fixes: d7d8ab87e3e7 ("PCI: vmd: Switch to msi_create_parent_irq_domain()") > Link: https://cdrdv2-public.intel.com/776857/VMD_White_Paper.pdf [1] > Reported-by: Ammar Faizi > Closes: https://lore.kernel.org/linux-pci/aJXYhfc%2F6DfcqfqF@linux.gnuweeb.org/ > Tested-by: Ammar Faizi > Signed-off-by: Nam Cao > --- > drivers/pci/controller/vmd.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c > index b679c7f28f51..1bd5bf4a6097 100644 > --- a/drivers/pci/controller/vmd.c > +++ b/drivers/pci/controller/vmd.c > @@ -306,9 +306,6 @@ static bool vmd_init_dev_msi_info(struct device *dev, struct irq_domain *domain, > struct irq_domain *real_parent, > struct msi_domain_info *info) > { > - if (WARN_ON_ONCE(info->bus_token != DOMAIN_BUS_PCI_DEVICE_MSIX)) > - return false; > - > if (!msi_lib_init_dev_msi_info(dev, domain, real_parent, info)) > return false; > > -- > 2.39.5 >