Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5286743ybp; Mon, 7 Oct 2019 23:58:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqwocNR1jQibMIUmjZo7Fmj4cnTmuY4x/JuMGvl3il/YpWoSmYPEZj5veVF8EsVlz6BSyfEX X-Received: by 2002:a05:6402:1699:: with SMTP id a25mr32571622edv.91.1570517888481; Mon, 07 Oct 2019 23:58:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570517888; cv=none; d=google.com; s=arc-20160816; b=lL+GXksIU+A+bp0J0E3L47NZrUn946D2hKMjSmCLJ+sZ9B875kBzpTKvLX318y4QPo VKHcOI2cSBfjajN3LAwYR1C+eGwrsuJ8F9QY3x3an/bHLa4Lar3J+43lCXEMa3/mPzMz 2sn7TpLkxynhVFwZOaeB874oeVbG/d/jW8G3luQUWqpvWg3vQyzKm4kVmD056cAkSL42 4JhrFDt+us0UDkowRwsHw4STBIPsMzBgT+Vh6qoccT+7Sav3ML0v+6Hg9AS6DFjEW5tn zeasFGnqtwmfs1fXfGBDAbwbXzntlWIEcW/viF8/myVB6LwhrgVMpjEdWAD6N0xjYdEa QsjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:openpgp:from:references:cc:to:subject; bh=N/ItjmkVOcQL88GynACehBavUW7puGFoZ3r/yGzUFjs=; b=S3R+pvO+t+4r41EIQ4bXG7VRvO586+0NkRxZg/E85JiuhJwKlwyvpmeSrJFJ34amRV wdlWGUehvKSa3JDSj13NgEJF7hIKhzu4aR/QeHd8GzGDTVXZra+RVoyefzMsZz3fzA6M CTEm5gIgG3ols+iF8arhLixYiyQIoAsz6ICsAHwP8ULmxKhhEx3DHDdRJKG/eYV5IUPV VXGj4Wdxp7AVboqVl/OruIfvFPMdkBM1blyClHfJGjU73ehqMthtEEEn/oR1AcKKaHFV zjfk6Q49FjglDGJaemfYxNKzSmYDWGi54AQ2HkfrCYGVSabiGFj2FGra5PNeQuA2ap+f EsTg== 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 e22si9545879eda.300.2019.10.07.23.57.45; Mon, 07 Oct 2019 23:58:08 -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; 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 S1730192AbfJHGzu (ORCPT + 99 others); Tue, 8 Oct 2019 02:55:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43334 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730054AbfJHGzu (ORCPT ); Tue, 8 Oct 2019 02:55:50 -0400 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 79892C057F31 for ; Tue, 8 Oct 2019 06:55:49 +0000 (UTC) Received: by mail-wr1-f71.google.com with SMTP id y18so6528588wrw.8 for ; Mon, 07 Oct 2019 23:55:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=N/ItjmkVOcQL88GynACehBavUW7puGFoZ3r/yGzUFjs=; b=qdLRrjCACHeFXa6XiXkkf+x6nDCWikFN9z5Oc1LXfl9anhxAgdERNNUkngxAHYvo5f XxC2RKq9KHCfvtZXX79PrtTT+H923lK+D4rVs1VioRtsuH65248nywpc5Vp5fQc2X8lR Ev3dNgjtGH5gYbbl2ygJMuCcYG3ykUYfpttBKoHjK72J+uoBjDEJiHnVBilU0wBovBEC NxmweN7AMxB/w/XJ1b1RW8t3lshwqUQKtOua9bOo/WR4Y9oF4Sd5l7MO5JoRjFyOX9K2 DVJ/5JrBHGQ1XcSESQYQpmZKPQcGYN8TaNyx0uus+dP+YrmZ9x9LGCEMK8GAXBFkpg0/ sqkg== X-Gm-Message-State: APjAAAWT+t1rl+5QjlkAD7prrd6FuKcv0AyNw4WYTAidXxA/e3ER0JBi YSRkk75n2oQesB2Y5M9j86BwF8v0TvrdtsEdCxXrDTxrYTyVoajoZ8S8YWfH0vY4dAJU+lD9myo yinYFvbs7+AM4B+C8ZX3Xw6II X-Received: by 2002:a05:600c:2286:: with SMTP id 6mr2348800wmf.63.1570517748032; Mon, 07 Oct 2019 23:55:48 -0700 (PDT) X-Received: by 2002:a05:600c:2286:: with SMTP id 6mr2348779wmf.63.1570517747694; Mon, 07 Oct 2019 23:55:47 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:e876:e214:dc8e:2846? ([2001:b07:6468:f312:e876:e214:dc8e:2846]) by smtp.gmail.com with ESMTPSA id a14sm1603922wmm.44.2019.10.07.23.55.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Oct 2019 23:55:47 -0700 (PDT) Subject: Re: [PATCH 10/16] x86/cpu: Detect VMX features on Intel, Centaur and Zhaoxin CPUs To: Sean Christopherson Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, Peter Zijlstra , Arnaldo Carvalho de Melo , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Tony Luck , Tony W Wang-oc , "H. Peter Anvin" , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-edac@vger.kernel.org, Borislav Petkov , Jarkko Sakkinen References: <20191004215615.5479-1-sean.j.christopherson@intel.com> <20191004215615.5479-11-sean.j.christopherson@intel.com> <20191007195422.GF18016@linux.intel.com> From: Paolo Bonzini Openpgp: preference=signencrypt Message-ID: <8b44345d-7bc0-b8f2-0ee4-3e7f3c8bd994@redhat.com> Date: Tue, 8 Oct 2019 08:55:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20191007195422.GF18016@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/10/19 21:54, Sean Christopherson wrote: >> For QEMU, we're defining a feature as supported if a feature can be >> turned both on and off. Since msr_low and msr_high can be defined >> respectively as must-be-one and can-be-one, the features become >> "msr_high & ~msr_low". > > That makes sense for Qemu, but I don't think it's appropriate for this > type of reporting. E.g. if EPT and Unrestricted Guest are must-be-one on > a hypothetical (virtual) CPU, it'd be odd to not list them as a supported > feature. > > For actual hardware (well, Intel hardware), as proposed it's a moot point. > The only features that are must-be-one (even without "true" MSRs) and are > documented in the SDM are CR3_LOAD_EXITING, CR3_STORE_EXITING, > SAVE_DEBUG_CONTROLS, and LOAD_DEBUG_CONTROLS, none of which are reported > in /proc/cpuinfo. > >> Also, shouldn't this use the "true" feature availability MSRs if available? > > Only if incorporating the "& ~msr_low" can-be-one logic. If a feature is > considered supported if it must-be-one or can-be-one then the true MSR and > vanilla MSR will yield the same feature set. Ok, that all makes sense. Paolo