From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f48.google.com (mail-qv1-f48.google.com [209.85.219.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A856C3DA7C8 for ; Mon, 10 Aug 2026 13:08:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786367302; cv=none; b=bp+lbKPaGap1WC63JDZQAXBS0wOMXuM0DRgLIkleH8F6Nh1LhNmiUljycmo9sYnP6kpFXT+0iTtvNfSjagv19+ccYg7fk+5LelwrFOBoi8gR9qHc1zS2Z3Lq6FkkK27xtQw8h5MZ6kgUpsuY1+kfIIEcK5+eJAnmvnuxbuNs59k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786367302; c=relaxed/simple; bh=fYoOLYp8STPeqtUEMMg1V9r97/aMbQKiFeOjtdj7QMc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HSVsmFoJXFEgeLCpRZ1mgJwga19sQPj5c3QbPtgeFneSJc+EGVTeZeaQZKsoxF7viRNvILNCUUFQwiF89zTgKOYPTuziwCccBqerpVJFFhqYg6HLgTQfkghI7nkfhQhFrboiqaui9/2Bhp42gVqqhHo5wlhVT1Ll6voUZOXujFA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=XE3a+O7C; arc=none smtp.client-ip=209.85.219.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="XE3a+O7C" Received: by mail-qv1-f48.google.com with SMTP id 6a1803df08f44-9088fa81abbso7203116d6.3 for ; Mon, 10 Aug 2026 06:08:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1786367299; x=1786972099; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to:content-type; bh=pTDI6EKrZhHzu91ABEa/3hYoH7aGPcaJaVd/MJRw0Ok=; b=XE3a+O7ClrINyZYgTEFft03F+wkedh+IrWhaFM2DEURnpZke/5a3tSIvnGOntGDUWg 1zIlaXmjygrEKRaKri60lNtMZKHXXd6JRWQ1iFaSF4YHrfLd2RrcPd8BlKt3D4vlGj6t 8UF/m+mzHWTJE4+yG71vvmLr0yPLH4Wqvme5OjZ2oG/9+LWAsFrtY011J4FLS6dzvXof rsWFivXQsx2OdchNPpMCYXRk9Ui0m7ZG64GoM+dgBY5Ms2NwXkGRB/P4QhtEAEjM2k1H jja+0rfYsoHpOiMpx6uj4Jgn5Qt3ro1psTdWXqijW7uiaBOnfolP7lx04xEOiUie6jOW op+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786367299; x=1786972099; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=pTDI6EKrZhHzu91ABEa/3hYoH7aGPcaJaVd/MJRw0Ok=; b=L+On1oS6vrCFMPLiIy6UxFGUhVl5MzITK9rp99lzLVjeu9WJlkBjwk88RLOKetLCtQ ZLw2RXJM1p+3IbqS2xc1sMr442zyWxiw38SGryFMddh7J0REwWAuNXwOUdc0iYFPLBPY 6bAuC/VmFKGJjw2ymjcMWDRw9wM7SR7xggZF04L9HReIW1YIxwgi0BIikcjnq0MXA40N EGmUE1ztQtkEJzERuzJ7myfECdnwBAY9o6NAg1fpXXX1mlBZSy8076V2ipw5LRrv5z/q 1+hYBEUIB1kCULkKtoyVQl+Nd/wSagKVsFBnIryftjTAQL1KprQ9uonuNX/uhf6fZvu/ xFxg== X-Forwarded-Encrypted: i=1; AHgh+RoiJuywWif7yTRjlnMExeE/GEFoBqyb2rvSW44wHkXfEHg3q2VX9Gx/R+DYqT6SFrzeiyY/FG5pKQmAOGQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yz92W54sgRTXqeXAqmaYuPKzeeRVaLMwl6qjV+nYuYouom1hpss Q9GK44mDKNBz+9rLllD7DRY5pJMT1JIROoWyEHA7IAOBi5nvHauyVdtF55YQs6d3hYg= X-Gm-Gg: AR+sD12/mYemSu4E8SXe+2RRcZQyZbGQPMkjRLXLkA+f3oV644QVff3/Sd/nrCbuBP7 ADyi+B4zzYfuWjQO0PFCimL7T0NEdWBSry8977V4jaTWntu4AZGNrPDZ3hw5UiVF6z43MI3DpRo O7ldv7L8dFmtGKmM4HipTPD7OiquNBv/BoEXi9wkNkxzMwCnmINmIgsAz+Z3HF9Q41wYputsp7M QqGeiVVmGRc+bXYydaxpd3fAJfFhRbosCpY9nLb1LEA+tMcsSabzIYnrd/1uDxOpGz86E8ubrxw Up+98zVjIiCS/NETmyDug7Xf2KIGgiQlfRnOrIsTX6EXImg2HWC/SVBzxdSMiSSh/RChipfk8Po 0rHEqYR5//4T/nXM9eQAktLBNxbr4Wkv4JnKtng6w4J9gUJwYr+7PK41v4FADBkYvlEJcm7hxSj 6LJrvrbluoaDyetYBqTMptzA/gI7C4n6xasVh5vw== X-Received: by 2002:ac8:574f:0:b0:51b:fcb4:7576 with SMTP id d75a77b69052e-52d20961711mr224570371cf.15.1786367299519; Mon, 10 Aug 2026 06:08:19 -0700 (PDT) Received: from ziepe.ca ([142.166.156.215]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-52d163c1aefsm70838551cf.12.2026.08.10.06.08.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2026 06:08:18 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1wtPjm-000000022LS-0EaO; Mon, 10 Aug 2026 10:08:18 -0300 Date: Mon, 10 Aug 2026 10:08:18 -0300 From: Jason Gunthorpe To: Will Deacon Cc: Marek Szyprowski , "Aneesh Kumar K.V" , Mostafa Saleh , 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 Subject: Re: [PATCH] arm64: swiotlb: Keep the default size for protected guests Message-ID: <20260810130818.GN200537@ziepe.ca> References: <20260807164734.GE200537@ziepe.ca> <20260807182017.GH200537@ziepe.ca> <7d22482f-d5fd-4cf4-9d32-6a54e02f2fbb@samsung.com> <28442500-1d53-4776-bae5-459c3ffc1cc6@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon, Aug 10, 2026 at 12:46:51PM +0100, Will Deacon wrote: > On Mon, Aug 10, 2026 at 01:37:11PM +0200, Marek Szyprowski wrote: > > On 10.08.2026 12:20, Will Deacon wrote: > > > On Mon, Aug 10, 2026 at 02:59:42PM +0530, Aneesh Kumar K.V wrote: > > >> Marek Szyprowski writes: > > >> > > >>> 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? > > >>> > > >> I would request that we pick this patch to fix the regression described > > >> in https://lore.kernel.org/all/yq5azeyxyfol.fsf@kernel.org/. > > > I really don't think we need it. CCA hardware isn't exactly widespread > > > and the KVM host side patches don't appear close to being merged. > > > > Does this mean that the branch for-next/coco [1] won't go to v7.3-rc1? Let's not make progress on guest support contingent on KVM CCA host side patches please. I expect the CSPs will have VM instance types available based on CCA within quarters, and Linux as a Guest should work in those environments regardless of what KVM is doing. I don't really expect full KVM support for years, frankly, the patchset is massive. Even Intel and AMD don't have full KVM support yet. People already have CCA capable HW, are already testing this stuff and the closer upstream can get to being workable as a guest without a mountain of OOT patches the better. I agree the thing is not ideal, but it was merged to ARM like this a long time ago, this patch is just fixing a small oopsie (was it a merge conflict?) to put it back. I don't the objection. Jason