From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) (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 B7BD82367DF for ; Tue, 19 May 2026 13:29:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779197355; cv=none; b=cf8PfFdZqJRZ7ry/rmL5X0mvTBQgOUUbzIMDJcXJcNjsQ14SHlYU/cmz0vgy0qfnlH2TQYL9bzQJMRhG8Gbo4FA6bBwtt1cOnvcOJRIyntJCzP1rgMmbLpd0xHm2o1sB4bqbku0kPFRzVLP0GSxjhtmKGDFivDqlD8tRsGMhwMs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779197355; c=relaxed/simple; bh=dbxAh3jWVdvQ1+R108C1f7Lp/JMDaW8ElH0OVbL5tww=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qx4WVPnjpEg7jcsUPdtQMFD8k2Gu/jRTRcAb1QKZfZMX/aDoz4hUTAPb1Wpyxh7WZpTBrdZp/6LE7iriHEcvIGFQ3CXJnKNJKVq0Z5MIA+o/cRHDI6YrxFt5OddqpqCulUGIXwOPMhxqvGtEgmdfRrhPlHvyEO1d34TU2VFRALo= 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=VEnxzs6L; arc=none smtp.client-ip=209.85.219.49 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="VEnxzs6L" Received: by mail-qv1-f49.google.com with SMTP id 6a1803df08f44-8acb856a674so48209736d6.0 for ; Tue, 19 May 2026 06:29:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1779197352; x=1779802152; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=LrtAP8Eaa/f2vd8w85VzyR8xqf5rOlnG9+YArbfK2NQ=; b=VEnxzs6L3jk7C/dGUCRfMJ8HX/kATlxnsR+GubCxqqjOvOwlVJh1F4cZjr5tyQtmGE k82kMwzo4zKueRdmTHth5p6CPp21uiBavaJnadcDIv91eGypZ8f1KhANZ4M5HStEkkdj /n0+qJPFxXqALJTmhFyHLOYcisM7/lj6HxcQ90TzHvb/mWsq3SdvINTE4dehSJxZjEnD T1hk6zpUsgn+Aaxk+GK7l6pBfJWcpUmOILz8iePu52AyHqKQKxE/qrgJt7l+aH2jHxeH yXOD06O6OJ9MrDo9ZwIPXJ4h1Qurub5YZxGiJRwHwBrrwKnBHdegdK6ULPASZM3T0mcL sG6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779197352; x=1779802152; h=in-reply-to:content-transfer-encoding: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=LrtAP8Eaa/f2vd8w85VzyR8xqf5rOlnG9+YArbfK2NQ=; b=ih32WYY1ECSnf3orVbL644acimxFgIGqW2XHAxiB9XK7ZoH97ghsKGeKk2Tfj8fN6Q faqjORIbaJpuLkp9d45QEsEqpWuYwIOASM2DHbng1tYJUpiYD5w+EoMqt7Ln43yzeouU ZtxtEvWG3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0mr344078466d6.17.1779197352561; Tue, 19 May 2026 06:29:12 -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 6a1803df08f44-8ca360979c2sm90678436d6.18.2026.05.19.06.29.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2026 06:29:12 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1wPKVT-0000000EubB-2Vp2; Tue, 19 May 2026 10:29:11 -0300 Date: Tue, 19 May 2026 10:29:11 -0300 From: Jason Gunthorpe To: Mostafa Saleh Cc: "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 , Marek Szyprowski , Will Deacon , 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 (CS GROUP)" , Alexander Gordeev , Gerald Schaefer , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Sven Schnelle , x86@kernel.org Subject: Re: [PATCH v4 04/13] dma: swiotlb: track pool encryption state and honor DMA_ATTR_CC_SHARED Message-ID: <20260519132911.GA7702@ziepe.ca> References: <20260512090408.794195-1-aneesh.kumar@kernel.org> <20260512090408.794195-5-aneesh.kumar@kernel.org> 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 Tue, May 19, 2026 at 11:04:37AM +0000, Mostafa Saleh wrote: > On Thu, May 14, 2026 at 08:13:25PM +0530, Aneesh Kumar K.V wrote: > > >> > > >> What I meant was that we need a generic way to identify a pKVM guest, so > > >> that we can use it in the conditional above. > > > > > > I have this patch, with that I can boot with your series unmodified, > > > but I will need to do more testing. > > > > > > > Thanks, I can add this to the series once you complete the required testing. > > > > I am still running more tests, but looking more into it. Setting > force_dma_unencrypted() to true for pKVM guests is wrong, as the > guest shouldn’t try to decrypt arbitrary memory as it can include > sensitive information (for example in case of virtio sub-page > allocation) and should strictly rely on the restricted-dma-pool > for that. ?? Where does force_dma_unencrypted() cause arbitary memory passed into the DMA API to be decrypted? That should never happen??? Jason