From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9D62FC5AC82 for ; Mon, 10 Aug 2026 09:13:53 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hJTZl5Hl7z3048; Mon, 10 Aug 2026 19:13:51 +1000 (AEST) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=210.118.77.12 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1786353231; cv=none; b=Q2x/FNO2rR9KNgxDWkrt9iw+84N//R0STaul0Hmv3JuOrmZ6OA8RGT7R2rtuJ2y8OUABiRl6zqFLhMYHT1PhlGv+8XtP38ywbi5olSO2fDbMoV4/30X+rK67snIIZoBSSl5A90f2dqiqCOMZZ/vkpM5y+e2xbcoeAMwJsCqlssljexzB8ZNucPH/v8PReXnL1g9md+8FoIlvA3kMU21zJKb93HvIEiA1xXh3jHOUYjvSs0HvgpjabStYyXO5BeEbaFZXo469hgVCfBSEZ7Yhdmrknw4SJWBR/LdTRfNoS7juaLefUEF5oRVqr80euz5aEEiopRfcsh383Q8Q0wEaDg== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1786353231; c=relaxed/relaxed; bh=9F2+hqEi/pOkUD0Sk5/5UFMk/Jt0LKrILlP4x/Pr3As=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:From:In-Reply-To: Content-Type:References; b=KSmegPXIkCG0Y9soJDwMaYzZs3DDTzc10r0uO1JLcdPsHqRLBjDb4JKCHLp1qKxXowHsXd0SDyPn5iiTIQIdUzBlfaoxxfwO4KC06HhVOYMVokCVi8F0CvM+rxXmmUZoJAyMpTBHXNFiHVCFRK9YmQm4hzLjtCj+f5ml9WhYu2WOD3/eUxmkNZz736078XkGnA/p0QzSr3f2fyTy9Y0qQizjQYfFiwHYam1fG2StZRsE7boKkoCoSHH0mRoDRzqF3pRg3d/9BGinj1iDcdikgaA4F4NDD79ao0tVd1Rtc7IGvpGymoHqt/+h8eB+fUm9F7vUMg1KIMWo8uWlV4DcAw== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=samsung.com; dkim=pass (1024-bit key; unprotected) header.d=samsung.com header.i=@samsung.com header.a=rsa-sha256 header.s=mail20170921 header.b=lxfWDNt4; dkim-atps=neutral; spf=pass (client-ip=210.118.77.12; helo=mailout2.w1.samsung.com; envelope-from=m.szyprowski@samsung.com; receiver=lists.ozlabs.org) smtp.mailfrom=samsung.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=samsung.com header.i=@samsung.com header.a=rsa-sha256 header.s=mail20170921 header.b=lxfWDNt4; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=samsung.com (client-ip=210.118.77.12; helo=mailout2.w1.samsung.com; envelope-from=m.szyprowski@samsung.com; receiver=lists.ozlabs.org) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hJTZg59Wvz300V for ; Mon, 10 Aug 2026 19:13:46 +1000 (AEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20260810091334euoutp02b90f2f488c302ac4039b7efbd8aebb04~KZsi7HVtz1748917489euoutp02C; Mon, 10 Aug 2026 09:13:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20260810091334euoutp02b90f2f488c302ac4039b7efbd8aebb04~KZsi7HVtz1748917489euoutp02C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1786353214; bh=9F2+hqEi/pOkUD0Sk5/5UFMk/Jt0LKrILlP4x/Pr3As=; h=Date:Subject:To:Cc:From:In-Reply-To:References:From; b=lxfWDNt4pgEBF2hGBprplDfS9ZiG8PU4QIWr1XTy3IRJQST0jDMlcjb6C2xQflNho aen+A3Jx31spZzgUNGO+k3HbMv/jTGuHy0D1yuJ14RYPvP7BOanhJPtyIa25CHs0U6 5w3PfE1mfJVMAAg5BOlPbbbLVO96I2Sq0ySYnDFw= Received: from eusmtip2.samsung.com (unknown [203.254.199.222]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20260810091334eucas1p1e0ed221ce5794cf7bd02a4bed868a380~KZsiumB1n1295212952eucas1p1G; Mon, 10 Aug 2026 09:13:34 +0000 (GMT) Received: from [106.120.50.46] (unknown [106.120.50.46]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20260810091332eusmtip28966b93d0c29582d58567c792b4bd9ba~KZshKoKkG2582625826eusmtip2O; Mon, 10 Aug 2026 09:13:32 +0000 (GMT) Message-ID: <7d22482f-d5fd-4cf4-9d32-6a54e02f2fbb@samsung.com> Date: Mon, 10 Aug 2026 11:13:32 +0200 X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 User-Agent: Betterbird (Windows) Subject: Re: [PATCH] arm64: swiotlb: Keep the default size for protected guests To: Jason Gunthorpe , Mostafa Saleh Cc: Will Deacon , "Aneesh Kumar K.V" , iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-coco@lists.linux.dev, Robin Murphy , Marc Zyngier , Steven Price , Suzuki K Poulose , Catalin Marinas , Jiri Pirko , Petr Tesarik , Alexey Kardashevskiy , Dan Williams , Xu Yilun , linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Alexander Gordeev , Gerald Schaefer , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Sven Schnelle , x86@kernel.org Content-Language: en-US From: Marek Szyprowski In-Reply-To: <20260807182017.GH200537@ziepe.ca> Content-Transfer-Encoding: 7bit X-CMS-MailID: 20260810091334eucas1p1e0ed221ce5794cf7bd02a4bed868a380 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20260807182023eucas1p1f653436207b2b00338e99ea1d8f847df X-EPHeader: CA X-CMS-RootMailID: 20260807182023eucas1p1f653436207b2b00338e99ea1d8f847df References: <20260717180442.110954-18-aneesh.kumar@kernel.org> <20260807092612.2202005-1-aneesh.kumar@kernel.org> <20260807135810.GA200537@ziepe.ca> <20260807164734.GE200537@ziepe.ca> <20260807182017.GH200537@ziepe.ca> On 07.08.2026 20:20, Jason Gunthorpe wrote: > On Fri, Aug 07, 2026 at 06:13:49PM +0000, Mostafa Saleh wrote: >> But the whole thing is best effort anyway, the kernel picks >> IO_TLB_DEFAULT_SIZE which does not depend on the system topology or >> how many devices or how much DMA they do. >> SWIOTLB memory is wasted if unused so we should be careful around >> that as it would be the other way around and users would have to >> decrease it manually. > Yeah, it is why the arch code shouldn't really be sizing it directly, > it should be done in common code and, yes, we are probably going to > have to do something alot smarter to have the common code better > auto-tune this for the CC case.. What about the $subject patch? I assume that it is still needed to restore the behavior that was altered by the "[PATCH v8 00/23] dma-mapping: Track shared DMA state through direct, pool and swiotlb paths?" patchset? Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland