From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 65DAF1FF168 for ; Tue, 26 Nov 2024 17:37:00 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 725C57A91; Tue, 26 Nov 2024 17:36:54 +0100 (CET) From: Stoiko Ivanov To: pve-devel@lists.proxmox.com Date: Tue, 26 Nov 2024 17:36:35 +0100 Message-Id: <20241126163636.825951-2-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241126163636.825951-1-s.ivanov@proxmox.com> References: <20241126163636.825951-1-s.ivanov@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.069 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [suse.com] Subject: [pve-devel] [PATCH pve-kernel/master 1/2] fix #5926: cherry-pick ACS-quirk fix from linux-stable/6.11.7 X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" the latest linux-stable pull I found in ubuntu-oracular was for 6.11.5 - this fix here seems targeted enough. see also the discussion upstream: https://lore.kernel.org/all/20241029163317.GA216411@nvidia.com/ Signed-off-by: Stoiko Ivanov --- ...nable_acs-support-for-the-ACS-quirks.patch | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 patches/kernel/0016-PCI-Fix-pci_enable_acs-support-for-the-ACS-quirks.patch diff --git a/patches/kernel/0016-PCI-Fix-pci_enable_acs-support-for-the-ACS-quirks.patch b/patches/kernel/0016-PCI-Fix-pci_enable_acs-support-for-the-ACS-quirks.patch new file mode 100644 index 000000000000..81123616f983 --- /dev/null +++ b/patches/kernel/0016-PCI-Fix-pci_enable_acs-support-for-the-ACS-quirks.patch @@ -0,0 +1,68 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jason Gunthorpe +Date: Wed, 16 Oct 2024 20:52:33 -0300 +Subject: [PATCH] PCI: Fix pci_enable_acs() support for the ACS quirks + +[ Upstream commit f3c3ccc4fe49dbc560b01d16bebd1b116c46c2b4 ] + +There are ACS quirks that hijack the normal ACS processing and deliver to +to special quirk code. The enable path needs to call +pci_dev_specific_enable_acs() and then pci_dev_specific_acs_enabled() will +report the hidden ACS state controlled by the quirk. + +The recent rework got this out of order and we should try to call +pci_dev_specific_enable_acs() regardless of any actual ACS support in the +device. + +As before command line parameters that effect standard PCI ACS don't +interact with the quirk versions, including the new config_acs= option. + +Link: https://lore.kernel.org/r/0-v1-f96b686c625b+124-pci_acs_quirk_fix_jgg@nvidia.com +Fixes: 47c8846a49ba ("PCI: Extend ACS configurability") +Reported-by: Jiri Slaby +Closes: https://lore.kernel.org/all/e89107da-ac99-4d3a-9527-a4df9986e120@kernel.org +Closes: https://bugzilla.suse.com/show_bug.cgi?id=1229019 +Tested-by: Steffen Dirkwinkel +Signed-off-by: Jason Gunthorpe +Signed-off-by: Bjorn Helgaas +Signed-off-by: Sasha Levin +(cherry picked from commit 8803132f857d1959f99c6ef98cf74776a52987e4) +Signed-off-by: Stoiko Ivanov +--- + drivers/pci/pci.c | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) + +diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c +index ffaaca0978cbc..a89436d481f07 100644 +--- a/drivers/pci/pci.c ++++ b/drivers/pci/pci.c +@@ -1067,8 +1067,15 @@ static void pci_std_enable_acs(struct pci_dev *dev, struct pci_acs *caps) + static void pci_enable_acs(struct pci_dev *dev) + { + struct pci_acs caps; ++ bool enable_acs = false; + int pos; + ++ /* If an iommu is present we start with kernel default caps */ ++ if (pci_acs_enable) { ++ if (pci_dev_specific_enable_acs(dev)) ++ enable_acs = true; ++ } ++ + pos = dev->acs_cap; + if (!pos) + return; +@@ -1077,11 +1084,8 @@ static void pci_enable_acs(struct pci_dev *dev) + pci_read_config_word(dev, pos + PCI_ACS_CTRL, &caps.ctrl); + caps.fw_ctrl = caps.ctrl; + +- /* If an iommu is present we start with kernel default caps */ +- if (pci_acs_enable) { +- if (pci_dev_specific_enable_acs(dev)) +- pci_std_enable_acs(dev, &caps); +- } ++ if (enable_acs) ++ pci_std_enable_acs(dev, &caps); + + /* + * Always apply caps from the command line, even if there is no iommu. -- 2.39.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel