From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (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 E9073EACD for ; Sun, 12 Jul 2026 00:56:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=65.109.113.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783817778; cv=none; b=M9Nn87c5FBKUVTddL6KSrDpTGUipvjYtUgzlM8EF5zF8ZRgv0BSx6hD5y3OXvvrZ8sE2xqo780W+esxZSkVKgnJRUM9bPtujoI6BjvYjAqZyuEA3iXJdfbWDoBUXJAmmHlYmGRiZnuxcOIXwTh8Omrh+d9s5XwsUOStHGMiLrtg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783817778; c=relaxed/simple; bh=J6MjugtCATLPVH5S0rtXevNcBBoR2ngai97TezRZnTc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VQf6sZM8ru4lRLWRBvWXNApqydvBkGGCU9Z7PMO1c2u8E3bDtO/wBM5M1ahC7J0tY/Jo4KEk6dPUFMnVoTeSlnXo/CEiIC/w3B+4WtE9/BbHxGFuTugP6kbpcEzEQ7/Zseg/TYQ064An6u4vH+qlUqRyZ+41w9hS9KyEgje/VHw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de; spf=pass smtp.mailfrom=alien8.de; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b=T4IWFs+c; arc=none smtp.client-ip=65.109.113.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alien8.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="T4IWFs+c" Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id 98D7540E02B4; Sun, 12 Jul 2026 00:56:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id lF2cb-Zjn5Ao; Sun, 12 Jul 2026 00:56:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1783817762; bh=V2qS7GgPs7XADxC6mn/68glSRNCXHTeQKnxEEgLtq6k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=T4IWFs+cb3N4JPRq5grsBz9xPm24sfLPxWlzT2n0ZFYHxTA1EqCObEqStb+NMbkvw NhvbqCYqE5QWSQ6waiA30HqVaF+t9yJrN+gG/Es29b8ATvMWrkOakPb5MzIPUsj+Q3 et1fU49GVfvXkacslJ50guK6rn4W0jeySw46YdSeDwng97djw22D8DJjUrJzKnKdaH Ku6bRe0cuOpUVdlr82yf8eaWwgLrkzceVQUeSZKMVwD1m7im5u5kAssgJRkN7GJpTc qzwvXMQ3WQN0LaClYTQqHW2MYm2NORkaJE1BdMof4D7Q+IaGAq23QSZ4+zRcP4nvQd OTnjVTTEurFVWP5tvXmjTFuXZdNR7cWJ7UUzRNU2wNdUSesyxQRPtOUgK1dP+WJkmp p4ZH2mv0JSWKAlS6NGMSVtDGeEQjVob/XEXr8ElVg1yWlpIskrhKBiK0hTZzmwMxlT ZvgSzLol/DK2LXaRMTHNQghcNyB4gcm84khLNB9l972WSaRUBjej79P8PbidLUHrzJ PczLnN4G/zgplUWEW7033aJIu24TbzT8qgmJezvM6L0AF8au8VL2WCh8Ci7WxS3XFx lbmW5sFfICLXqa5ibW5wIwmqCTYRptYauk3ZYUZTahASCkKFO2iHxsO2mhiUkd1wrA mIgdF3et6w5mNyM5fS2f8lR8= Received: from stx.tnic (unknown [IPv6:2600:1700:38ca:c00::3a]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 4527240E00C0; Sun, 12 Jul 2026 00:55:50 +0000 (UTC) Date: Sat, 11 Jul 2026 17:55:47 -0700 From: Borislav Petkov To: Jun Miao Cc: tglx@kernel.org, mingo@redhat.com, dave.hansen@linux.intel.com, m.szyprowski@samsung.com, robin.murphy@arm.com, rick.p.edgecombe@intel.com, x86@kernel.org, linux-kernel@vger.kernel.org, aakarsh.jain@oss.qualcomm.com, michael.roth@amd.com, fan.du@intel.com Subject: Re: [PATCH v4] x86/pci-dma: add a SWIOTLB_ANY flag to lift the low mem limitation Message-ID: <20260712005547.GBalLmE0FTJYx7Cnwg@fat_crate.local> References: <20260625012616.2992535-1-jun.miao@intel.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 In-Reply-To: <20260625012616.2992535-1-jun.miao@intel.com> On Thu, Jun 25, 2026 at 09:26:16AM +0800, Jun Miao wrote: > When high-speed NICs or multi-GPU setups are passed through into confidential > VMs, the SWIOTLB bounce buffer becomes the critical path between private and > shared memory. Restricting it to low memory limits throughput and fails to > scale for larger workloads. > > AMD SEV-SNP and Intel TDX guests run in a TEE where the hypervisor is untrusted. > DMA-capable devices require bounce buffers to mediate between encrypted private > memory and unencrypted shared memory. Confining these buffers to low memory (<4GB) > unnecessarily caps their size and degrades performance. > > Power SVM already supports this; x86 does not. See commit 8ba2ed1be9 > ("swiotlb: add a SWIOTLB_ANY flag to lift the low memory restriction"). > > [ aakarsh: completely trim down/rewrite changelog ] > > Tested-by: Aakarsh Jain > Suggested-by: Borislav Petkov > Acked-by: Marek Szyprowski > Reviewed-by: Aakarsh Jain > Signed-off-by: Jun Miao > --- Sashiko has a question: https://lore.kernel.org/r/20260625012616.2992535-1-jun.miao@intel.com -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette