Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1684196ybz; Thu, 16 Apr 2020 13:38:33 -0700 (PDT) X-Google-Smtp-Source: APiQypKNEveDSioM+5FNaek+tJIhgr1YRL/sq4Q7EW2VXU2/Xn3MzJ4TsL6RPI4Cl5Yw/13gpyug X-Received: by 2002:a05:6402:b47:: with SMTP id bx7mr37744edb.374.1587069513014; Thu, 16 Apr 2020 13:38:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587069513; cv=none; d=google.com; s=arc-20160816; b=l072ECR+mckU8pJffmPQZdan0HqnkoRsZd/AQHnM/ElxuFxfUuw/waMnVI/DjruOsd GmVsppvFaoy+oyDdj3dMhwqarrGy+z/gfxKuNpG7fpaN3I7qPQMcZmKMciKfhie89Hw6 y8HUu8PlhVuvtJYNKIvpPYdcVvS9WDMbJrvYNklmwKvGEbC0qpyayPrxdbmw0O57NOcB BdPO2TyOnmynhPpI0umuO31b4+1Ob/p4zTrflhNecanXg35o+jk2XmhuN3t3diwrThOu faq+v2CS8Mf01vqNeJxDZ2Pgxaoif4ZV/HRo3vsG53vWl/LoaT4ciY/3L20HCt2DwXMT +P8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=4vwz5hor3wKzwtn6P7yo4ELaK2/KGob3MUAPAJS7lUI=; b=dmGTk1r+aHz0Urt01HwffJrVayUBfo5H9yGUfSQuj7vbAWikA8WdBaGYSRfGVd/E91 IftNnUaBAYkMNvdQjZ7w6pNVs6mLLiAHmtQIlDEOPJAmYFrCiDc1/hdK11AivIk7LXyy eQqIvuX29yF0MZKizCbbAcVQRP7v0iKLHD5+kFLDtd0YDfXv8H6JELjdptoq69OPYkjs dA3285J/SgRKcJKtz08nI/GUmK0HtIuVy0eicMxKWz5J20j2QDb3Ob5oqAjso4OsW7qD ENazScDM2o2qh/dKOJfGrvD+8+JLIpaMLw0DfIokFjsSSpLS0Jentkbfte9YJvz4Fi7U yhxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn10si11989179ejc.357.2020.04.16.13.38.10; Thu, 16 Apr 2020 13:38:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2442858AbgDPP5K (ORCPT + 99 others); Thu, 16 Apr 2020 11:57:10 -0400 Received: from foss.arm.com ([217.140.110.172]:36780 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2442848AbgDPP5F (ORCPT ); Thu, 16 Apr 2020 11:57:05 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2620A30E; Thu, 16 Apr 2020 08:57:05 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 94EA73F237; Thu, 16 Apr 2020 08:57:03 -0700 (PDT) Date: Thu, 16 Apr 2020 16:56:56 +0100 From: Mark Rutland To: Geert Uytterhoeven Cc: Catalin Marinas , Will Deacon , Linux Kernel Mailing List , Arnd Bergmann , linux-arm-msm , Andy Gross , Wei Xu , Bjorn Andersson , Masahiro Yamada , Robert Richter , Linux ARM Subject: Re: [PATCH 2/2] [RFC] arm64: Add dependencies to vendor-specific errata Message-ID: <20200416155655.GA7155@lakrids.cambridge.arm.com> References: <20200416115658.20406-1-geert+renesas@glider.be> <20200416115658.20406-3-geert+renesas@glider.be> <20200416125630.GF4987@lakrids.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.1+11 (2f07cb52) (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 16, 2020 at 05:38:07PM +0200, Geert Uytterhoeven wrote: > On Thu, Apr 16, 2020 at 2:56 PM Mark Rutland wrote: > > On Thu, Apr 16, 2020 at 01:56:58PM +0200, Geert Uytterhoeven wrote: > > > Currently the user is asked about enabling support for each and every > > > vendor-specific erratum, even when support for the specific platform is > > > not enabled. > > > > > > Fix this by adding platform dependencies to the config options > > > controlling support for vendor-specific errata. > > I'm not su1re that it makes sense to do this in general, becaose the > > ARCH_* platform symbols are about plactform/SoC support (e.g. pinctrl > > drivers), and these are (mostly) CPU-local and/or VM-visible. > > > > I think that it makes sense for those to be independent because: > > * It prevents building a minimal VM image with all (non-virtualized) > > platform support disabled, but all possible (VM-visible) errata > > options enabled. I do that occassionally for testing/analysis, and I > > can imagine this is useful for those building images that are only > > intended to be used in VMs. > > Oh, you also want to build a "generic" guest kernel, with all ARCH_* > symbols disabled. Yup! As above I do this today for building test kernels I run on a number of different hosts, and I'm aware of other use-cases (e.g. WSL2 or docker for mac) where you may want to do this to minimize the core kernel either for size or security reasons. > Let's hope a maleficent user cannot disable errata mitigations in the > guest kernel and break the host ;-) Indeed ;) For cases where a malicious guest could cause harm we've added workarounds in KVM, so unless we've missed something that shouldn't be the case. Otherwise, a guest missing these is just shooting itself in the foot. > And perhaps you do want to enable some platform-specific drivers for > VFIO pass-through? Hence having ARCH_* dependencies on those drivers > means they cannot be enabled :-( Hmm... IIRC platform device passthrough requires an corresponding VFIO platform driver in the host to handle reset and so on, but it does seem a shame to not allow the user to select a driver if they really want it. I guess there might be platform-specific PCIe drivers too, which might work with VFIO regardless. Thanks, Mark.