From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 179272D2382; Tue, 2 Jun 2026 06:10:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780380616; cv=none; b=dsoeW6QWCDWtiLy1bGTKT7ccpbyYXv/7PywkZKbHR90z8gjmOeRFQK3SIhtPHbhLI1BsJsdCB5X7bXBv7qtiql4idbZwHfgYOHS29GWCDn5RW5tEAsac6pwWbsRuRHQH63/fxLA5MwvZ7FA9+mCGsZt/XL9ZgOqu3N3TWaTUtYs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780380616; c=relaxed/simple; bh=tFMH5l5MTUaf6Xe98VNs76Ti6mPZN2RO0Y2Ijj9ZpVQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=uavwt5WzG+FCf33yw6XgvuXsPUWpBsdk+zRg9Jc0UldQYXeQTWN4GWA2HkrxDACQPowL2GA8bSfplXY7lJiHpwtLTRbIA/N0VaFyUQxSvdWgE/Md4L5V20vddPkSBMNLmPSijwRHYBEExcNO89TahfLZ1K7jyatGUz7mnCe1Gag= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fZHJyOBo; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fZHJyOBo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F4341F00893; Tue, 2 Jun 2026 06:10:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1780380614; bh=tFMH5l5MTUaf6Xe98VNs76Ti6mPZN2RO0Y2Ijj9ZpVQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=fZHJyOBoEGHiD16yVMLzAjbsRhIR7CFE9cGa8xrtaW1fYnxZpDeAP0dlt+35R/Mt6 lwiApCD3vWaU5f/ov1UftsC46EHnWWu9gVCnryDWlTRVbG8/Awo2j7YCs1kkoKzFUW CLiouOcaFGFR32sW24z1VM1bmsWZYup1WOlxsoyfafKWKAqaMUDNcPp6rSaZlrOose 2+KdIT0Et7q2lWeCijk6GKIW77oJ2/Hmw08YSLGVBKiEFhtlIH4Duf/oWZrG7NccM7 XJbsbh+yK33nHz1p9/ZqYXK8Iv1em79IHjEcPrS+wx+QrhI/G32wo36vWwfGqLIiXr rc4x3UNOXfQIA== X-Mailer: emacs 30.2 (via feedmail 11-beta-1 I) From: Aneesh Kumar K.V To: Michael Kelley , "iommu@lists.linux.dev" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-coco@lists.linux.dev" Cc: Robin Murphy , Marek Szyprowski , Will Deacon , Marc Zyngier , Steven Price , Suzuki K Poulose , Catalin Marinas , Jiri Pirko , Jason Gunthorpe , Mostafa Saleh , 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" , Jiri Pirko Subject: RE: [PATCH v5 10/20] dma-direct: make dma_direct_map_phys() honor DMA_ATTR_CC_SHARED In-Reply-To: References: <20260522042815.370873-1-aneesh.kumar@kernel.org> <20260522042815.370873-11-aneesh.kumar@kernel.org> Date: Tue, 02 Jun 2026 11:40:00 +0530 Message-ID: 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-Transfer-Encoding: quoted-printable Michael Kelley writes: > From: Aneesh Kumar K.V (Arm) Sent: Thursday, Ma= y 21, 2026 9:28 PM >>=20 >> Teach dma_direct_map_phys() to select the DMA address encoding based on >> DMA_ATTR_CC_SHARED. >>=20 >> Use phys_to_dma_unencrypted() for decrypted mappings and >> phys_to_dma_encrypted() otherwise. If a device requires unencrypted DMA >> but the source physical address is still encrypted, force the mapping >> through swiotlb so the DMA address and backing memory attributes remain >> consistent. >>=20 >> Update the arm64, x86, s390 and powerpc secure-guest setup to not use >> swiotlb force option >>=20 >> Tested-by: Jiri Pirko >> Signed-off-by: Aneesh Kumar K.V (Arm) ... > With this patch removing SWIOTLB_FORCE from four places in > kernel code, there are no remaining places where it is set. > The test of SWIOTLB_FORCE could be removed from > swiotlb_init_remap(), and its definition could be deleted > from include/linux/swiotlb.h. > Sure, I=E2=80=99ll add that as a separate patch in the series. -aneesh