From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EFFDCC77B7A for ; Fri, 19 May 2023 04:04:41 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.536655.835197 (Exim 4.92) (envelope-from ) id 1pzrLf-0004qT-73; Fri, 19 May 2023 04:04:11 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 536655.835197; Fri, 19 May 2023 04:04:11 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pzrLf-0004qM-32; Fri, 19 May 2023 04:04:11 +0000 Received: by outflank-mailman (input) for mailman id 536655; Fri, 19 May 2023 04:04:10 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pzrLe-0004qG-DW for xen-devel@lists.xenproject.org; Fri, 19 May 2023 04:04:10 +0000 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 34096fef-f5fa-11ed-b22d-6b7b168915f2; Fri, 19 May 2023 06:04:08 +0200 (CEST) Received: by verein.lst.de (Postfix, from userid 2407) id 6AB6268AFE; Fri, 19 May 2023 06:04:05 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 34096fef-f5fa-11ed-b22d-6b7b168915f2 Date: Fri, 19 May 2023 06:04:05 +0200 From: Christoph Hellwig To: Marek =?iso-8859-1?Q?Marczykowski-G=F3recki?= Cc: Christoph Hellwig , Juergen Gross , Stefano Stabellini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Ben Skeggs , Karol Herbst , Lyude Paul , xen-devel@lists.xenproject.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, nouveau@lists.freedesktop.org Subject: Re: [PATCH 2/4] x86: always initialize xen-swiotlb when xen-pcifront is enabling Message-ID: <20230519040405.GA10818@lst.de> References: <20230518134253.909623-1-hch@lst.de> <20230518134253.909623-3-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) On Thu, May 18, 2023 at 08:18:39PM +0200, Marek Marczykowski-Górecki wrote: > On Thu, May 18, 2023 at 03:42:51PM +0200, Christoph Hellwig wrote: > > Remove the dangerous late initialization of xen-swiotlb in > > pci_xen_swiotlb_init_late and instead just always initialize > > xen-swiotlb in the boot code if CONFIG_XEN_PCIDEV_FRONTEND is enabled. > > > > Signed-off-by: Christoph Hellwig > > Doesn't it mean all the PV guests will basically waste 64MB of RAM > by default each if they don't really have PCI devices? If CONFIG_XEN_PCIDEV_FRONTEND is enabled, and the kernel's isn't booted with swiotlb=noforce, yes.