Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 491E74C77AF for ; Thu, 3 Sep 2026 15:05:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788447922; cv=none; b=f9ZkGhoK7rULhxESsV+igTgv7h3g/DtBOiOFV/XddqxxPIR94PcCNizRmgOVnsZGv2nabaZgJ50MQizldKOiu+d5ZrIOdOJ24A2WTbeSGSmssqRuX7qwjeBz9YzDT+NJ/UQe4Ge5DAxpO0h0djZdIVfUpIre/D1KcU4a7i9g1fs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788447922; c=relaxed/simple; bh=o4iAHNHMzh+eBlSL06Grj4ssk6Vr0VUgSy7OAMvMgZo=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=TLctlNaTGfQv/I7E2HUfKtAJ4sV2FIU017TY8gSUsfp+9rsRyPFCJL9Ja5moJdZzQxG1v21XH3JKetO08/sCY9t7faUJTA5Bn5nNozoZJ/keuNc2kcg2hMa2lC4CPpPmahwK9TeoektZFaFX2cbHiW6QBVfsNOd8xKzc+M4sXU0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sz9UqNVE; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="sz9UqNVE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7ADB61F000E9; Thu, 3 Sep 2026 15:05:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1788447921; bh=BZF88jdglIKGG+fEsMBkSzXzF7WN6ku5jdLJhGMPnfU=; h=Subject:To:Cc:From:Date; b=sz9UqNVEkRxtZIrD4pYbI4MAgejjsbZjlXO8l7DB1dR4x3itWJjC2mDLstvWhDUrA bH5TRvSSFNj0JtwKjiZB2zQucdGsrPb5NloeY24doV34uLqlvgLEq4Xag669DhRcnZ 2o8c6DFFhWfdTJCbuay7nAoF/K+LlbfXHEqjI4ps= Subject: FAILED: patch "[PATCH] iommu/vt-d: Force requesting ACS when tboot is enabled" failed to apply to 6.1-stable tree To: kevin.tian@intel.com,baolu.lu@linux.intel.com,joerg.roedel@amd.com Cc: From: Date: Thu, 03 Sep 2026 16:45:50 +0200 Message-ID: <2026090350-unpleased-sandbag-2584@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.1-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y git checkout FETCH_HEAD git cherry-pick -x 607432b2618b61df81134be0ef2562b8300c1216 # git commit -s git send-email --to '' --in-reply-to '2026090350-unpleased-sandbag-2584@gregkh' --subject-prefix 'PATCH 6.1.y' 'HEAD^..' Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ From 607432b2618b61df81134be0ef2562b8300c1216 Mon Sep 17 00:00:00 2001 From: Kevin Tian Date: Wed, 5 Aug 2026 07:43:00 +0800 Subject: [PATCH] iommu/vt-d: Force requesting ACS when tboot is enabled Currently the conditions of requesting ACS in detect_intel_iommu() don't include tboot, leading to a possible misconfiguration with ACS disabled (e.g. due to user opts) while iommu is later forced on by tboot_force_iommu(). Fix it by checking tboot in detect_intel_iommu(). Fixes: 5d990b627537 ("PCI: add pci_request_acs") Cc: stable@vger.kernel.org Signed-off-by: Kevin Tian Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel diff --git a/drivers/iommu/intel/dmar.c b/drivers/iommu/intel/dmar.c index 767ec092accd..e32685402f74 100644 --- a/drivers/iommu/intel/dmar.c +++ b/drivers/iommu/intel/dmar.c @@ -915,6 +915,18 @@ dmar_validate_one_drhd(struct acpi_dmar_header *entry, void *arg) return 0; } +static bool dmar_required(void) +{ + /* tboot supersedes any user/platform opt */ + if (!intel_iommu_tboot_noforce && tboot_enabled()) + return true; + + if (!no_iommu && (!dmar_disabled || dmar_platform_optin())) + return true; + + return false; +} + void __init detect_intel_iommu(void) { int ret; @@ -928,8 +940,7 @@ void __init detect_intel_iommu(void) if (!ret) ret = dmar_walk_dmar_table((struct acpi_table_dmar *)dmar_tbl, &validate_drhd_cb); - if (!ret && !no_iommu && !iommu_detected && - (!dmar_disabled || dmar_platform_optin())) { + if (!ret && !iommu_detected && dmar_required()) { iommu_detected = 1; /* Make sure ACS will be enabled */ pci_request_acs(); diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index 1a1f27a51063..4d03d9a517de 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -57,7 +57,7 @@ static int rwbf_quirk; * (used when kernel is launched w/ TXT) */ static int force_on = 0; -static int intel_iommu_tboot_noforce; +int intel_iommu_tboot_noforce; static int no_platform_optin; #define ROOT_ENTRY_NR (VTD_PAGE_SIZE/sizeof(struct root_entry)) diff --git a/drivers/iommu/intel/iommu.h b/drivers/iommu/intel/iommu.h index 775f1c4ae346..2cee36138d6e 100644 --- a/drivers/iommu/intel/iommu.h +++ b/drivers/iommu/intel/iommu.h @@ -1354,6 +1354,7 @@ static inline bool ecmd_has_pmu_essential(struct intel_iommu *iommu) extern int dmar_disabled; extern int intel_iommu_enabled; +extern int intel_iommu_tboot_noforce; #else static inline int iommu_calculate_agaw(struct intel_iommu *iommu) { @@ -1366,6 +1367,7 @@ static inline int iommu_calculate_max_sagaw(struct intel_iommu *iommu) #define dmar_disabled (1) #define intel_iommu_enabled (0) #define intel_iommu_sm (0) +#define intel_iommu_tboot_noforce (0) #endif static inline const char *decode_prq_descriptor(char *str, size_t size,