Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1164440ybl; Thu, 12 Dec 2019 10:35:47 -0800 (PST) X-Google-Smtp-Source: APXvYqygNxVDsy3ncCPWwX/mHg2oPrfWNHwzsd/T8Xuqymgwl1da67FS0vjwL6r9gv9b210o+5x2 X-Received: by 2002:aca:fdc2:: with SMTP id b185mr6161881oii.74.1576175747786; Thu, 12 Dec 2019 10:35:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576175747; cv=none; d=google.com; s=arc-20160816; b=hwXg/kcAVi+xWiIGzN/uwU8vQWU4bA+ch/Brd3s/p8wPKUlX9WiW6jcas8NVhbkNU7 ed97nWsa7I3UUQAyivFrKEvqsFU57gAyqop27upA/4wAxkSRImgJxtlbCJI5bV1CC5xc ErUqOz+LAY1ZGyswBErux0ECnNp1CwlF96OKMAikVoyMEbAVRD9ERSBe+arVhIuQGlJQ t/X+0qDAPlspd2sbfZDb8UoHYsyzCYX9Rtoixk1nG/n7t5lEvUFbajE72h+E9e06PDnI g56bjcT2B8sof6UIFlt6y1vsyRDIc63BEH2tcSncfECzOXSkre8MQ/cW59+gBMKGFFBS GwRg== 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=iqJcpLYWIsg7hL1I4hrx3iHPD2zvmV8m8a9EFd+mTAk=; b=Q36hVcVetKHgFobj11+uezL2FUVmzPUzCUYaBhl4EDgNdlTipy60yKqioCc9axiMJB t0br4yZFJ7JDmln+57DIZxde+jY8CmkI3gwVPNzN8kcRDWvJuG3tW2ybJKDMBhEyoMuB 9+ckdpiec7gpE9CRMta89dHDaQWLb6C8WGODNfnJet23nrN4ZMBTTzN8wk8zjp8ZMbVk BdET9fxfrLjlajdt1x/AUQ4k9YBaTdVkbX8bwwDoMGYtzjgIMML84qNyGKApS6icQlY3 /DPgq/dbVjFaTsYc0ambgt4mpmgqm0Xc8PNONKcjVTjt3bwa2rft7VZ4351ZSBPRWB6b WI5g== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w24si3406534oic.260.2019.12.12.10.35.33; Thu, 12 Dec 2019 10:35:47 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730441AbfLLSem (ORCPT + 99 others); Thu, 12 Dec 2019 13:34:42 -0500 Received: from mga14.intel.com ([192.55.52.115]:13397 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730291AbfLLSel (ORCPT ); Thu, 12 Dec 2019 13:34:41 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Dec 2019 10:27:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,306,1571727600"; d="scan'208";a="239043222" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.202]) by fmsmga004.fm.intel.com with ESMTP; 12 Dec 2019 10:27:21 -0800 Date: Thu, 12 Dec 2019 10:27:21 -0800 From: Sean Christopherson To: Liran Alon Cc: Jim Mattson , Paolo Bonzini , Borislav Petkov , Thomas Gleixner , Ingo Molnar , the arch/x86 maintainers , "H. Peter Anvin" , Peter Zijlstra , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Radim =?utf-8?B?S3LEjW3DocWZ?= , Vitaly Kuznetsov , Wanpeng Li , Joerg Roedel , Tony Luck , Tony W Wang-oc , Len Brown , Shuah Khan , LKML , kvm list , linux-edac@vger.kernel.org, Linux PM list , "open list:KERNEL SELFTEST FRAMEWORK" , Jarkko Sakkinen Subject: Re: [PATCH v4 11/19] x86/cpu: Print VMX flags in /proc/cpuinfo using VMX_FEATURES_* Message-ID: <20191212182721.GI3163@linux.intel.com> References: <20191128014016.4389-12-sean.j.christopherson@intel.com> <20191212122646.GE4991@zn.tnic> <4A24DE75-4E68-4EC6-B3F3-4ACB0EE82BF0@oracle.com> <17c6569e-d0af-539c-6d63-f4c07367d8d1@redhat.com> <20191212174357.GE3163@linux.intel.com> <52dd758d-a590-52a6-4248-22d6852b75cd@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 12, 2019 at 08:04:19PM +0200, Liran Alon wrote: > > > > On 12 Dec 2019, at 19:57, Jim Mattson wrote: > > > > On Thu, Dec 12, 2019 at 9:53 AM Liran Alon wrote: > > > >> Why should CPU VMX features be treated differently than standard CPUID deduced features? > > > > Do we have the right Intel people on the recipient list to answer this > > question? Presumably, Intel felt that this information should be > > available in supervisor mode only. > > > > Sean? > > Good question. Probably because it just makes sense that Ring3 will never need to use > this info as all VMX instructions are privileged. i.e. Can only be executed in Ring0. I highly doubt ring0 vs. ring3 was a motivating factor. I suspect the MSR interface is primarily driven by VMX's allowed-0 vs. allowed-1 behavior, which would be awkward to encode in CPUID. Reporting via MSR also likely provided more flexibility for updating/fixing CPU behavior, e.g. patching the RDMSR hook is likely far easier than patching CPUID. Even if the architects intended the information to be supervisor-only, that's just their opinion, no? > De-facto in KVM we have discovered this assumption to be problematic BTW, > as KVM created an interface to query VMX MSRs values to properly define the requested > vCPU model. :P (See kvm_get_msr_feature())