From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f44.google.com (mail-qv1-f44.google.com [209.85.219.44]) (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 C85E3409639 for ; Tue, 19 May 2026 13:29:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779197355; cv=none; b=VqZrgMbvMiA0sKT1j1XiKKEo3HpGxH2S1krNZQAG2dsM7pqKJUMSIQj1V9G8xgyoMVDUkiJlAL6YvISsrQTe3w/qJr8/7pEcqQzqb38IZIYlkyEMOVXrYyCwG4f2oEoJGO/UlA+pxw05GANfS6rPSVwFq+OyyH70/Q989WM+HeU= 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=SFzzMERM; arc=none smtp.client-ip=209.85.219.44 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="SFzzMERM" Received: by mail-qv1-f44.google.com with SMTP id 6a1803df08f44-8b1f2b7f1bcso55238066d6.1 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=1779197353; x=1779802153; darn=lists.linux.dev; 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=SFzzMERM3mkjP1aLWtGSysWk9HYRb2IH8eS+B+m27pSiqj9tqQ8B2iUuZP7PBZquFy jdve4QlTlEnN8S48yqgyyRkrzNFR2rzKbdTb7/SmaPQyoPcKg+mFiiso6cHn2enrcANz y4LtpH0gLActH6id519ZCCqvM9q6nO3zCAdu4LUDVQ8zev8pY8pjCGv5qaXx3ozicVFL 8oAmKADcYK9Js1GPgtIfAPUpGSci3NLA9IdErKKBjqLqvKGoCJjTLi7QSF3TZTrPBMN1 gjEWBvVv9fZdHGo/LAVNuWbvP8rIegp6jfOBaZL4J0Cz9T8ufhiXdiqhphTMuGm9pCk0 XPtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779197353; x=1779802153; 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=JaJFG5s7WwhPIYFmy/pN2xir+Y7/PcB3ACvakyk4Ow3q76MSaBRabMGT1sfbU/88FB Z8BeGaxP1zIWKbmUJixMBYwtiHkTol9LYvnisnYAbvnmBdEY/iqs1QJhvrnc23ivoDQf 18ZTNd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c8fda1ccb0mr344078466d6.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-coco@lists.linux.dev 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