From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) (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 E5D952DCBE6 for ; Thu, 12 Feb 2026 10:11:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770891097; cv=none; b=VXtEuWS8gBH85uOpMKSWIpLRkYCL334HnNUAY6TUAWHIgMVaiZe4sI5ke4WFXdBUfZEera3d6cKtzIM+cFzOql11sRC/yk7fBYlblE1rKKx/v58Nc2Ya4SkWsOnZAb31I0TiZwI6ou0FCNRDGEIAy/ydei42ye1sbxbagWNRxys= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770891097; c=relaxed/simple; bh=+EZeVjj+5FySDWeflWxAvGr4X5ouYLQjv8bbGTuFCZ4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:From:In-Reply-To: Content-Type:References; b=OAz56yvrBCPoBKU+ZqgCUFOixPX9fK5gLYhUOS4ZQkXjNE0XdYZHALOxrTy7jih+TQE4L37Pf3P7EDzshNkBfzSAxF0dASOglz/q8+uOzS9NoeYNWHNIi/zZIh4fvfAkGJSsVRVgabTUGQ8aWSENVnORuaqn0WCIOSPcolwNFPU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=DDx6q8Nc; arc=none smtp.client-ip=210.118.77.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="DDx6q8Nc" Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20260212101127euoutp018bee811a868f766e5b5d726386676c51~TeA_7IN3g1543615436euoutp01E for ; Thu, 12 Feb 2026 10:11:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20260212101127euoutp018bee811a868f766e5b5d726386676c51~TeA_7IN3g1543615436euoutp01E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1770891087; bh=h7uZC9ZvR6Lazqg1ZCMc8Oe6zFF8xWdxk1Bl4CYAnP4=; h=Date:Subject:To:Cc:From:In-Reply-To:References:From; b=DDx6q8Ncivka8abxeAftyZtOOfFI81BcYgiDDjjyP/etu2oo3fvs9iqGH/bxNmBJ2 RurWn64LaDQNDnnUJ7ipg8jzHLypHMTW9X8aMh0hUdxfM7y+aErINIaJN2HXst+1GO 2WjVHD8VFXLlq5Z6JjeMdaGaS3l6AHykQt7484fs= Received: from eusmtip1.samsung.com (unknown [203.254.199.221]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20260212101127eucas1p11b28c6697c5b7f363fd89c223d89fdf6~TeA_jSvJg0284402844eucas1p14; Thu, 12 Feb 2026 10:11:27 +0000 (GMT) Received: from [106.210.134.192] (unknown [106.210.134.192]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20260212101126eusmtip1af6061b768daebe338bf4633b40d15f6~TeA_IKTar1841918419eusmtip1Q; Thu, 12 Feb 2026 10:11:26 +0000 (GMT) Message-ID: <82b0ec25-34f6-4419-8d35-06bf2de215fa@samsung.com> Date: Thu, 12 Feb 2026 11:11:25 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Betterbird (Windows) Subject: Re: [PATCH v3] x86/pci-dma: add a SWIOTLB_ANY flag to lift the low mem limitation To: Jun Miao , tglx@kernel.org, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, robin.murphy@arm.com Cc: x86@kernel.org, linux-kernel@vger.kernel.org, aakarsh.jain@oss.qualcomm.com Content-Language: en-US From: Marek Szyprowski In-Reply-To: <20260212093701.4165275-1-jun.miao@intel.com> Content-Transfer-Encoding: 7bit X-CMS-MailID: 20260212101127eucas1p11b28c6697c5b7f363fd89c223d89fdf6 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20260212093712eucas1p1e7e21b4a3fdbc01af13e21938aaf2eff X-EPHeader: CA X-CMS-RootMailID: 20260212093712eucas1p1e7e21b4a3fdbc01af13e21938aaf2eff References: <20260212093701.4165275-1-jun.miao@intel.com> On 12.02.2026 10:37, Jun Miao wrote: > 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 used > in swiotlb_memblock_alloc() to allow allocation of SWIOTLB memory beyond low > memory restriction. > > 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 Acked-by: Marek Szyprowski > --- > > V1 -> V2: > 1.Updated commit message and description. > 2.Add Reviewed and Tested. > > V1 Latest Feedback : https://protect2.fireeye.com/v1/url?k=f35668f3-92dd7dc5-f357e3bc-74fe485cbff1-e6ff63e2f942f6a7&q=1&e=66eee4e1-a18d-47f9-ad21-f3dfab1d6f09&u=https%3A%2F%2Flists.openwall.net%2Flinux-kernel%2F2026%2F02%2F11%2F483 > > v2 -> v3: > We can alloc 4GB with the dynamic swiotlb, rather than 1GB. > 1G is not correct. So change the commit log. > > --- > 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 = true; > - x86_swiotlb_flags |= SWIOTLB_FORCE; > + x86_swiotlb_flags |= SWIOTLB_ANY | SWIOTLB_FORCE; > } > } > #else Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland