From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (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 3E00E38422E for ; Fri, 19 Jun 2026 12:21:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781871714; cv=none; b=QptdRp27MEOxqp+HIIdycMWDa1Z4z3R7ERDJP0Lhk6PXE1TKTt0EACEtADsQyaLQtbh+cAhzH6bg4eAyaSrKO4g4H9Ca21SCvbzhW7gA/aUeQKU5N0xuAKiG46P9I1H3hQsr/bsKRhtD231D570q+kKMNtmdoSm85kLb1QUYGdY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781871714; c=relaxed/simple; bh=bExiT/WO2dhEcZ1qca0P3/dM95QJoJRN/ZwhIblcPaY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dq57jkaTC93u4QsqjueEHAvfYUbIiVBvx+EkO9UGV42LVTc8jDG4LJs1LxZ4ERllld6kGEVxQEXKvZHCvGluBRD8ct9upYcZ6WfZFrKbgrCd9/qq3JQ6RFvG0LfthxkvDDqS19FWWjUR2TYCPXYjfeQBHPzp3x//Wo2s4gYLNXM= 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=CEGQdskj; arc=none smtp.client-ip=209.85.222.169 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="CEGQdskj" Received: by mail-qk1-f169.google.com with SMTP id af79cd13be357-920d6e3963fso53493585a.3 for ; Fri, 19 Jun 2026 05:21:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1781871710; x=1782476510; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=c9LPBfHeyyLdgfb3oWsJJs9sVnnCU9Plv3UTJaVJh/Q=; b=CEGQdskjw6tUBEj0VUuzJUf1cqTRwHzSpiIEsMMSQ+A0dnX8DWNoXumPX6teKddEpx 0588xH+81jtOhmC+v+1LKLKyQZfx7W3C6+YkLR7a6tzF1CFDofOTEt/bOl50nlHw+3MA tejY/stezvyWcHZyIQtxJwMcsvBqZ5gthNpsO60FqZy9ylH7jtAWkKImxtXJqy3xYvKV j5ACUqvghZIZZR9pCfRln00UeeMafN1XYoabgCzKHYVIlh7dyGM1WSzy4rtlzXpiyG3M iorfbRAY158nJC+zbaCznFNeVOsVX+wsQlpNeQ0qZ1fpyaOiixghU7q09SNXrRN+ozjm 4+eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781871710; x=1782476510; h=in-reply-to:content-disposition: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; bh=c9LPBfHeyyLdgfb3oWsJJs9sVnnCU9Plv3UTJaVJh/Q=; b=ZviZ3AGB3Xn1nsbXd1SDc/HBaSWjZny9cdOBLMSvtcVu2kdm3Q0hQXgOsA6Zc0ahEa H4wFW+NKc5Mwgf+zGGD4DZnCGi4tQ9h9M0AB9jnpFHTrxkVcJZwu8E3Us6N0snuYw3C0 9ldBp6KRniI7761RqNrx6ngl+XvqC6X0qVz6bJjimC0X31d7MkpAspwjLH3+zB2bSY1S l9/ZaG0lrma1bq7QpVFwOWe48FTqLA/i5r3Nrz6Bn4aoHXGlWU0lDNttdeHXI9SIHg33 LB9M+SAp7eAJMTuInzCqIKhKMB+9Q2+oULeklKhhq8aWr3K+R2H3YXeOZ8qaYa6kvlCg 6h9Q== X-Forwarded-Encrypted: i=1; AFNElJ8Qn7GaxA7p/FNedek0T9gIhcwgWjacKKHhMXp++H2M4tnCUbqIEXMJx8J4sp8xvloC2QOUEkhT6mq7nTQ=@vger.kernel.org X-Gm-Message-State: AOJu0YwFOtRgBoVDIqSrhZ+5IW+gSp3c8ttqmxngywT+JJBCCUztM2OI 7I9kYCXzse9qr5Kf9pUfANdrLo4m9ZgLSHC2kjILQwhLZLPwXQNrPEVmZ2qfnlGT+ig= X-Gm-Gg: AfdE7ckpc2ZQiMtbUGeGJGKX5fxG/jJC2d7Jfyxd88Iv/4zqRcSGpjVdSUs77uv647/ jcNLsKMSH2drsz2Dc86DcwMnnTiG1rLPy7U8XoL7nP9n/ck/XX3ZteKcu0m5CtBmWt1BdmOf8Bs GoOs9I9gQyTiOrm+ccOKR3n832wx1Ayycma+djtEgCpV7hZLTE6BzamZ88WaqxDtJBsO8jvHKGF UAJnqFqjXcUtWQGxOMMx9p4lfY5mDzKcEM2c3JdW/465cRfn3jQhZ/icOklvRNTix00BUJMMLkS Grh2niPwYTNX39OriOqtJnXC13Ymn9Jqtgu3do1Y/PMpwqtrEuCXRf3aJYJmTNUMrhdWcbtqqYA xIB8qtqlFw1DuxTcR9IhBZpiUkawMlAL74wGstbm3T+Q/I7sTurLwPqHt+2KO4YAUMGBT2zAnmu guXdwCEm+UbIlOfkEZ6MUb0UIb6KBPLEi2TZlR1ZQLT2aiO6BSqeF+ABgJb8dJyoIJ8WRSMrfNa Z08IQ== X-Received: by 2002:a05:620a:4413:b0:915:1359:fc5f with SMTP id af79cd13be357-9208f835f14mr474588385a.14.1781871709844; Fri, 19 Jun 2026 05:21:49 -0700 (PDT) Received: from ziepe.ca (crbknf0213w-47-54-130-67.pppoe-dynamic.high-speed.nl.bellaliant.net. [47.54.130.67]) by smtp.gmail.com with ESMTPSA id af79cd13be357-920a4966577sm218949585a.34.2026.06.19.05.21.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jun 2026 05:21:49 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1waYEG-00000004U03-2Vgj; Fri, 19 Jun 2026 09:21:48 -0300 Date: Fri, 19 Jun 2026 09:21:48 -0300 From: Jason Gunthorpe To: "Aneesh Kumar K.V" Cc: Alexey Kardashevskiy , Catalin Marinas , iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-coco@lists.linux.dev, Robin Murphy , Marek Szyprowski , Will Deacon , Marc Zyngier , Steven Price , Suzuki K Poulose , Jiri Pirko , Mostafa Saleh , Petr Tesarik , Dan Williams , Xu Yilun , linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" , Alexander Gordeev , Gerald Schaefer , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Sven Schnelle , x86@kernel.org Subject: Re: [PATCH v6 00/20] dma-mapping: Use DMA_ATTR_CC_SHARED through direct, pool and swiotlb paths Message-ID: <20260619122148.GL231643@ziepe.ca> References: <20260604083959.1265923-1-aneesh.kumar@kernel.org> <20260609144746.GL2764304@ziepe.ca> <2ecfa1a8-6202-4319-9692-a6ffeb5a3dbf@amd.com> <20260618153705.GH231643@ziepe.ca> 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=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Jun 19, 2026 at 01:14:13PM +0100, Aneesh Kumar K.V wrote: > > And this is more insane logic. The right fix is to allocate the > > swiotlb bounce from the *encrypted* pools when running on the > > hypervisor which requires undoing this abuse of force_dma_decrypted(). > > > > Agreed. If the device can do encrypted DMA and requires bouncing, it > should bounce through encrypted pools. We don't support encrypted pools > now and that means, we mark the option ("mem_encrypt=on iommu=pt > swiotlb=force") not supported for now? ?? if you don't have a CC system then the swiotlb is "encrypted" meaning ordinary struct page system memory. The hypervisor should not be triggering any CC special stuff here, it is not a CC guest. Agree we don't need to worry about swiotlb=force with a trusted device in the GUEST for now, but it should be something to fix eventually. Jason