Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp261864ybb; Tue, 7 Apr 2020 22:21:26 -0700 (PDT) X-Google-Smtp-Source: APiQypKyV6ZKKZpXywa1jT+urd6NawVp0gXp+vbrD3yWM+u+MdpTaF6OWGoDOBGjAMk9ymFYG5c5 X-Received: by 2002:aca:cf0d:: with SMTP id f13mr1188395oig.162.1586323286122; Tue, 07 Apr 2020 22:21:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586323286; cv=none; d=google.com; s=arc-20160816; b=x5F7t2aj2Zq8GDd3el8FzK8omy61cUnuycLkW4+BL0iU+AntcEEfcN8jl77wpwAJVn kgh3oXSYgCcBKIIKjYoV48ZurpjFn9J6CBu4B1WoK59CqFnLc5CKDqeYKZe3XfDEFZn0 Fj+nDqcqSGmKAhF4XRDEwH9X6s9MsCiiXsqGMlAWvQSuucUT0s3L5ryRdoR56IYIqIx+ aNvv4cA6uu4RQ2OOkpnmFpnjpa5DhtuMGfmDC5wsjxbvfAaYIDLGRNHIpBjwHJNZq7s0 qD2cPnwlkaZHovtZOrVODBvQjXttyDR9zXvdwWyMMx+2Lr/WrXkZCPiUSzyGsdiSY33n LOjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=StKPm373OSdksMMVXI6SQKnBhmEVN9dQRT4B9G7vKnE=; b=jaczRQG2H7WmLYNvwp0aORrzHuMe038nj7Jl75c/et9i/olpvwl1qj/9O7FR0XXWVs Ea9CaHXn0FX3K9w/4fKCMcp+OhODXzJhZyhULpDkXaHj11kaWs+Z9YRjTH56p/XUEGxt Xp+M98TyOK/pKjx0cRx+a06dRxWaTVeEtlzi3gDKX1WMfBVuvzsy+7HeUrodCMkOBv+w Z3B1IvzgGSL5RuSstVWzqVowcIczkeYMyQii0Rmlg/q/+/ZXGRHh21PhxqIOYO3Nk5QO 3M7Q5GhYZ5e2aLPIQYJThfOycWkAsqf7+d3hW4OA0Y37/lx90opKcw43ILfS/a927LYL ZBaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="RRg5/WYK"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 94si1992984otb.114.2020.04.07.22.21.11; Tue, 07 Apr 2020 22:21:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="RRg5/WYK"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726552AbgDHFSs (ORCPT + 99 others); Wed, 8 Apr 2020 01:18:48 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:38444 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725932AbgDHFSs (ORCPT ); Wed, 8 Apr 2020 01:18:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=StKPm373OSdksMMVXI6SQKnBhmEVN9dQRT4B9G7vKnE=; b=RRg5/WYKllwAuh+d8Y2KqazRaP dbwf5MWSki1XVIYQND6PNzwAJUfuoS4rSC7RdvGsm4U77BchhcYhuDxM5qi4w79nS5wDLlYUP6tkR viC+9yQVXkCXj8gC3BPF/s679GCu1s4ybb8w/6oVPt037rJvAiCxRsOApKNYC+Eq4cZvZ7s8QLfmr RbIJkZGbTcxocv7HjOzn8xFRL44EbrkyldxouLPiLVQwQf4k2AlQSbUtkgUnmga+En8gdUm+Hh3Po EXm2sdA6CGEdb18HlXFtsj5ZUhYdcwQqSI8XUQJ1ZANZre9aaZXLvR09mkPMYT0LOhu1LqRjrrl7F HcdH+4EA==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jM36m-0002OQ-WD; Wed, 08 Apr 2020 05:18:41 +0000 Date: Tue, 7 Apr 2020 22:18:40 -0700 From: Christoph Hellwig To: Peter Zijlstra Cc: Nadav Amit , Thomas Gleixner , LKML , hch@infradead.org, Sean Christopherson , mingo , bp , hpa@zytor.com, x86 , "Kenneth R. Crudup" , Jessica Yu , Rasmus Villemoes , Paolo Bonzini , Fenghua Yu , Xiaoyao Li , Thomas Hellstrom , Tony Luck , Steven Rostedt , Greg Kroah-Hartman , jannh@google.com, keescook@chromium.org, David.Laight@aculab.com, Doug Covelli , mhiramat@kernel.org Subject: Re: [PATCH 4/4] x86,module: Detect CRn and DRn manipulation Message-ID: <20200408051840.GA8561@infradead.org> References: <20200407110236.930134290@infradead.org> <20200407111007.429362016@infradead.org> <10ABBCEE-A74D-4100-99D9-05B4C1758FF6@gmail.com> <20200407193853.GP2452@worktop.programming.kicks-ass.net> <90B32DAE-0BB5-4455-8F73-C43037695E7C@gmail.com> <20200407205042.GT2452@worktop.programming.kicks-ass.net> <96C2F23A-D6F4-4A04-82B6-284788C5D2CC@gmail.com> <20200407212754.GU2452@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200407212754.GU2452@worktop.programming.kicks-ass.net> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 07, 2020 at 11:27:54PM +0200, Peter Zijlstra wrote: > On Tue, Apr 07, 2020 at 02:22:11PM -0700, Nadav Amit wrote: > > Anyhow, I do not think it is the only use-case which is not covered by your > > patches (even considering CRs/DRs alone). For example, there is no kernel > > function to turn on CR4.VMXE, which is required to run hypervisors on x86. > > That needs an exported function; there is no way we'll allow random > writes to CR4, there's too much dodgy stuff in there. And this clearly shows while trying to cater to anyone doing hardware virt out of tree is just a disaster and we need to stick to our traditional line that out of tree modules don't matter, if you care about your module bring it upstream. Especially as we have a perfectly fine upstream module for just about every variant of hardware virtualization that can be extended for the needs of other hypervisors.