Received: by 10.223.185.116 with SMTP id b49csp7925114wrg; Thu, 1 Mar 2018 13:41:23 -0800 (PST) X-Google-Smtp-Source: AG47ELuFBrxmP3l/nFwZ2ZMJGnIXZi/FWHUh3mSKFVtufQIZF2kga2YhjLgLDfIBAJc5gAotFWFq X-Received: by 2002:a17:902:bd93:: with SMTP id q19-v6mr3261164pls.322.1519940483619; Thu, 01 Mar 2018 13:41:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519940483; cv=none; d=google.com; s=arc-20160816; b=cHI9LN3ruB30UYotwVEXnSRdn52iw3ERIDdwqmsLecUJv9zgxpW3EmQN0NVkK5T7K/ rvBR7ekrOPC6pxLWfTxY9DnIqjiC2l3Ihew8sgcqZ96UIk577WQ0sMHfJa6MWMRtYLeH WfLmgOiiw8sQGoDuQvKeVH5eWpnTvbbw8JhYjjtHi9lkDP1dWl2he950QfMX+HSIEae4 /y4vdU9MC5K/h8TbKQ5Ah9iImxdRJmUP5ZAii2OxROEyr6+nrvZ9C6iUTPB9LXf+qqcL N6sl71jX+nLrfK9VVsidxRlxV23Oqppel3gJQh/DaArDlyvbqPIU+/NbqjzlMRtIaSrO 74RA== 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 :arc-authentication-results; bh=0YjNy+T1OyWZ1ZwZerCOmALSGXjMiQpnnc6FCCyIOIU=; b=ddFRRLu75GKQ0JmSni1eQKDSlUB4zIWuA6hqSJ15zrLkYshHK9xNyush6i7qXXbCWK iRlNUrnRHe0TiSQ4bxaAQlsQBFkv/5k11liA3mHFLOGtMc/twk6tb+jruclXM+N9aqUJ F3TYhqGhiK/j9Gx9uIrqCH+fFcMDcJkWDkP/pOWM2Bi0F0prFug8QwK1GkhH1IrFyYmp NCyOh9wbd9gni4m5G2aQAsQB3QuZhMCHEOcbTVhUFGM9h0CQWWTKpZpPMnHDt67+tza1 wEikBC7nw9bvOKtqe2OWWCNifvX1ES4oz7wmwoNtW92NmHT4FqWUSN1IVjiGCNjgGHjq bocg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x4-v6si3571365plw.297.2018.03.01.13.41.08; Thu, 01 Mar 2018 13:41:23 -0800 (PST) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162319AbeCAVjw (ORCPT + 99 others); Thu, 1 Mar 2018 16:39:52 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:45312 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1162200AbeCAVjk (ORCPT ); Thu, 1 Mar 2018 16:39:40 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DAFA48182D01; Thu, 1 Mar 2018 21:39:39 +0000 (UTC) Received: from flask (unknown [10.43.2.80]) by smtp.corp.redhat.com (Postfix) with SMTP id 9CBBB10AF9F0; Thu, 1 Mar 2018 21:39:37 +0000 (UTC) Received: by flask (sSMTP sendmail emulation); Thu, 01 Mar 2018 22:39:04 +0100 Date: Thu, 1 Mar 2018 22:39:04 +0100 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Paolo Bonzini Cc: Konrad Rzeszutek Wilk , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, David Woodhouse , KarimAllah Ahmed Subject: Re: [PATCH] KVM: VMX: expose the host's ARCH_CAPABILITIES MSR to userspace Message-ID: <20180301213205.GB29001@flask> References: <1519433546-33879-1-git-send-email-pbonzini@redhat.com> <20180226221300.GK22024@char.us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180226221300.GK22024@char.us.oracle.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Thu, 01 Mar 2018 21:39:39 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Thu, 01 Mar 2018 21:39:39 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'rkrcmar@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [Resent after removing g@char.us.oracle.com.] 2018-02-26 17:13-0500, Konrad Rzeszutek Wilk: > On Sat, Feb 24, 2018 at 01:52:26AM +0100, Paolo Bonzini wrote: > > Use the new MSR feature framework to expose the ARCH_CAPABILITIES MSR to > > userspace. This way, userspace can access the capabilities even if it > > does not have the permissions to read MSRs. > > ... That is good but could you expand a bit of why it would want this? > > I am 99% sure it is due to the lovely spectre_v2 mitigation but > could you include that in the commit message so that in say a year > folks would know what this is? Userspace can currently get the MSR by creating a VCPU and reading its MSR_IA32_ARCH_CAPABILITIES, because it is set from the hardware MSR. I thought that "permissions to read MSRs" talked about hardware MSRs, so the purpose of this patch would be a better interface, but I don't see how if we keep the auto-setting on VCPU creation. Is this aimed towards userspaces that want nothing else from KVM than the MSR value? Thanks.