From nobody Thu Apr 2 18:59:39 2026 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (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 E2E842DC35A for ; Thu, 12 Feb 2026 09:11:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770887471; cv=none; b=hQHd96xKBfiFa3Ws435OGL2dTbWMqzulgCTDgjlkt/KSEDQBskUqPHGGw7gTFsmqAdnUOuP6+S64o2U/9WuCBWLF/UKLH643fBwOUlP/jjEezcgYKvpBZ7DjX3P+832j8ttxmPvKBZJcJ98KuP5YOI/Kknb4LuZqY+Nrzfl0zUo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770887471; c=relaxed/simple; bh=HGJB4NKtUMUqKfLkuNjFdnJrz5oZKfhWQkD4JQpBCRA=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=dv+ZuAYXBmWqNmsKKytd/jS6sWkD3bXP6ZanXZPS1UaW7a9V7RNF+OXHkWs/3kodysrOF7cdkaU9Vd9m96no53dDct53AZnH0iy83PayY8fnXAkMXcgz9IjV6pHwztgVILrtPRvfQQ/h/Hknag6ffcjDG/DoxJNJkFBwvobvYZM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=YFddsdCP; arc=none smtp.client-ip=192.198.163.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="YFddsdCP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1770887470; x=1802423470; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=HGJB4NKtUMUqKfLkuNjFdnJrz5oZKfhWQkD4JQpBCRA=; b=YFddsdCPSWikgqnGbeyouFbUb0VGcZW5nBCC1cntamNHol1hHhNGCjp6 9UCt7AhfyRzL802M4beeg6hmYxVif2SzPeveCsyI5h6u/k0Br0G6qMV3l LL4Ngq+jnuJWeiWFxkcRm+FLg8rXRI1+qzVifQ9k9QbsWeEUz3hBlRUrD NUWjs0MQgWF1R9wRlDSy7kvUfuGlf7O1cYwPzv5mQE5YIeUjWoZ9ibpCK 9jRmMqebfi5nc8IBO3IjAEHH0CPPuoYZ+QoP0D1onAnT+5PBNEaBprgK8 rI/9tKn4Em4dztvmvpEPYihRYIgq86+MbAsI39r5q75MsWjIlUWr5MFdC w==; X-CSE-ConnectionGUID: GWnOef2wTaG1mcR8pLnwsg== X-CSE-MsgGUID: h76nRGWXTwGSmsmAabnKtQ== X-IronPort-AV: E=McAfee;i="6800,10657,11698"; a="83424948" X-IronPort-AV: E=Sophos;i="6.21,286,1763452800"; d="scan'208";a="83424948" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Feb 2026 01:11:09 -0800 X-CSE-ConnectionGUID: D6p7kAQrSE2WV6ZlZrXC1A== X-CSE-MsgGUID: 9IXflLiSRI+vn2e5QXc5hg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,286,1763452800"; d="scan'208";a="216698604" Received: from ubuntu.bj.intel.com ([10.238.152.35]) by orviesa003.jf.intel.com with ESMTP; 12 Feb 2026 01:11:06 -0800 From: Jun Miao To: tglx@kernel.org, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, m.szyprowski@samsung.com, robin.murphy@arm.com Cc: x86@kernel.org, linux-kernel@vger.kernel.org, jun.miao@intel.com, aakarsh.jain@oss.qualcomm.com Subject: [PATCH v2] x86/pci-dma: add a SWIOTLB_ANY flag to lift the 1GB limitation Date: Thu, 12 Feb 2026 17:11:01 +0800 Message-Id: <20260212091101.4163738-1-jun.miao@intel.com> X-Mailer: git-send-email 2.32.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Intel TDX guest wants to allocate a swiotlb buffer that is not restricted to low memory for the trusted hypervisor scheme. Adding a new flag will be us= ed in swiotlb_memblock_alloc() to allow allocation of SWIOTLB memory beyond 1G= B. Power SVM already supports this, but X86 still faces the same limitation. Commit: 8ba2ed1be9 (swiotlb: add a SWIOTLB_ANY flag to lift the low memory = restriction) Reviewed-by: Aakarsh Jain Tested-by: Aakarsh Jain Signed-off-by: Jun Miao --- V1 -> V2: 1.Updated commit message and description. 2.Add Reviewed and Tested. V1 Latest Feedback : https://lists.openwall.net/linux-kernel/2026/02/11/483 --- arch/x86/kernel/pci-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index 6267363e0189..73b9320c4a7d 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c @@ -61,7 +61,7 @@ static void __init pci_swiotlb_detect(void) */ if (cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT)) { x86_swiotlb_enable =3D true; - x86_swiotlb_flags |=3D SWIOTLB_FORCE; + x86_swiotlb_flags |=3D SWIOTLB_ANY | SWIOTLB_FORCE; } } #else --=20 2.47.1