Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1936669rwd; Thu, 18 May 2023 21:09:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ563Dutn6ZOLDqhceOgwPt2KBr5BJw1rYgfaM+tYcGgxx6CKS5WiqvVF8bG8hTjdoCT5QUV X-Received: by 2002:a17:903:1208:b0:1ae:b38:b6a with SMTP id l8-20020a170903120800b001ae0b380b6amr1496470plh.58.1684469383143; Thu, 18 May 2023 21:09:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684469383; cv=none; d=google.com; s=arc-20160816; b=zwEElqICCPYiCtMFW4Yh5Ia15mdgKTtDwRxdyfhXjdiUuJ17WF4jnA/mtgCGaLFF4u fANFlS2HVUwSDxw4UTfMSOsQN7Y911iL1rI2QSapgiELK8Dv+1ozrzk2LxMGGrG4HIWW wR5UyF21tayqvQwELI2HiIlGWD8f4GTjH0it1vVQfjQY8nzqcIjMwUh8dE4r389NRSeC qW1EtpdpHyAfhKdDbDaDBItj0G0DVhMSUBObV+1q8gnGbgPkPOc4LoqKOdWbrpqNBKY/ wMb7qnUFvFhQn9oVcvtKMC0aMpfZAvpgUqaKm0HViJl8LKrke4NPIC6Sx0lFhpDre2uu q9ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=IZ5LZmuDzDuCZr76+LpmghnMtUPq9DKZX7d8DHMuzvA=; b=1LRa/AM0d4QLWLf0gMasH+1/QtHQo03u9VwMOoKHSXPGQUUujyz2u0zp6e0bcYQ4yT EZT9xwe44IzBvXCRZUWsxz/1lrq/KDCD+eXO04odcY2+KWjoiOE8/I6PuNUEcbjmtvPx m/YFsKPpK99lhAzcGvCVulFzeMOsX7ym+sDuhkNcmxKP59avoEDFS1ihAbYl/InSYd24 w3dT47y1kgUyi6Psw6vHPT4qR6b8OJYZhbWq+pdaxeVwRZhR/knmURg//ZDgrFKmz/bB N0uxPxsyZdSZYspp+8Vih+HZXycrFXYxrabXjTpLvQikQv2d9Hf4dK/V/Co78aRQReko D49Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b14-20020a170902d50e00b001a643dfb884si3027384plg.451.2023.05.18.21.09.27; Thu, 18 May 2023 21:09:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229780AbjESEEV (ORCPT + 99 others); Fri, 19 May 2023 00:04:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229489AbjESEEL (ORCPT ); Fri, 19 May 2023 00:04:11 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D90210CF for ; Thu, 18 May 2023 21:04:09 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 6AB6268AFE; Fri, 19 May 2023 06:04:05 +0200 (CEST) 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) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.