Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1114091ybl; Thu, 12 Dec 2019 09:50:19 -0800 (PST) X-Google-Smtp-Source: APXvYqzvKBFPCV2MRpUWQ/JV+8zuPmhrx+OOR8xjc+jX4R+WgTUoqi+bv60CRNFazXoeLeqRJdwP X-Received: by 2002:a05:6830:2006:: with SMTP id e6mr8972018otp.367.1576173019626; Thu, 12 Dec 2019 09:50:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576173019; cv=none; d=google.com; s=arc-20160816; b=LwV18JLPqP2NXmBIYJ/a9O8O6Nhh2FoJoRjTye/nMndft2L+zW4p/dVhRtVSUrha7W 7Cl3AU/YfL8BW0E+n/eaCSlq7iHNyqvGP1RBhGPjHYAw3egyytXTriKqwTbs8m0FKvOz rMBo3EYNhA6o95QCSjg/5eXbpfer2UmwtqT9Fwhxnnk2llx3bKu4gOvCysD5n2SKmNXJ ci43JIoGl8KvnDgGsBZjpnfTB9zbjGRb/o9NOvBooz/pFztZ+p0i6uKb61CvG9pMgytr cdJi/RtNeTZxeF6ASpiQP7OFxtf/yS6wfIQMO+11Jv9CSc44TIs6RJ0HlCKk48zP3zix icKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=209O+3Xe8wnGXL8s/3e5RLbnSLi6zch/ZA2bLBFzw5k=; b=WwFZ/1SzVNadZdlpFXzsP7nWzArQ0vqDHfLem6IzjGxXxe+Wk/lxtY4NP/Ur9rsEba lJlkis0JxDvYz2w2rK9AE3xxeNLVnrshid/1qU2fQdOD2YE77peQuRYqKrBjUrdQqmKe FcbIcvOEAJi95IKtttZa9JD2jsS0EMzLoy6wXy4ruXFzAnuBjMvB242TbcZfICsP+jcT FkAWpGh3IBzs43vamV55/1jF0JVwAFQ6KGudJrl9OFlGpD0Y9svM5OSHhKERaBjG9sIp yGTFViBWmkPfSvojOtSQW1O8vY0bZz8ldjlUdJHaGHraiue0u4sj26jI+OdTTu7Qo7Ev 9VdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=D9Ypnds+; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a20si3729409otf.271.2019.12.12.09.50.04; Thu, 12 Dec 2019 09:50:19 -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; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=D9Ypnds+; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730265AbfLLRtc (ORCPT + 99 others); Thu, 12 Dec 2019 12:49:32 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:53738 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729771AbfLLRtc (ORCPT ); Thu, 12 Dec 2019 12:49:32 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xBCHijtl032917; Thu, 12 Dec 2019 17:48:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=content-type : mime-version : subject : from : in-reply-to : date : cc : content-transfer-encoding : message-id : references : to; s=corp-2019-08-05; bh=209O+3Xe8wnGXL8s/3e5RLbnSLi6zch/ZA2bLBFzw5k=; b=D9Ypnds+tQTjBQGTQIEeJCcGvTNeF9gbB0luV0hEZsxC6+/RwzXtgkkbWvWUPmInuihf 7b2NNY071RtRuhyE7nERl7VUh8eMzxFg6Lpa4oRd5MxuE4BW/tTSP9Z4ku2//O0qmI17 8I3rqYbDY8USDlsxSFsypeDczQV/nf0RlNqmMBnVoqC/iUNozGASW5kTFpe1L079/K0R Mz8PsfX0HvRVrvioXCUM4ibgk6rXBboq69ebCwSYwUYv5lp+ZO7DEoIcbmCe/Ll//4rS 2YSwr0OXT+iRa/umdy6P5bw6arI3aPtFHdrOBt/sOyenQcs//VZk5HYRt/9WDn8nhu2Z 3A== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 2wrw4nhe5r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 12 Dec 2019 17:48:01 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xBCHhg0D177364; Thu, 12 Dec 2019 17:48:01 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3020.oracle.com with ESMTP id 2wumw0nwp2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 12 Dec 2019 17:48:00 +0000 Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id xBCHm0EX022395; Thu, 12 Dec 2019 17:48:00 GMT Received: from [192.168.14.112] (/109.65.223.49) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 12 Dec 2019 09:47:59 -0800 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.1 \(3445.4.7\)) Subject: Re: [PATCH v4 11/19] x86/cpu: Print VMX flags in /proc/cpuinfo using VMX_FEATURES_* From: Liran Alon In-Reply-To: <20191212174357.GE3163@linux.intel.com> Date: Thu, 12 Dec 2019 19:47:51 +0200 Cc: Paolo Bonzini , Borislav Petkov , Thomas Gleixner , Ingo Molnar , x86@kernel.org, "H. Peter Anvin" , Peter Zijlstra , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , =?utf-8?B?UmFkaW0gS3LEjW3DocWZ?= , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Tony Luck , Tony W Wang-oc , Len Brown , Shuah Khan , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-edac@vger.kernel.org, linux-pm@vger.kernel.org, linux-kselftest@vger.kernel.org, Jarkko Sakkinen Content-Transfer-Encoding: quoted-printable Message-Id: <407604A2-354E-4358-91EC-E04A57F506C1@oracle.com> References: <20191128014016.4389-1-sean.j.christopherson@intel.com> <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> To: Sean Christopherson X-Mailer: Apple Mail (2.3445.4.7) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9469 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=601 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912120139 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9469 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=668 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912120139 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On 12 Dec 2019, at 19:43, Sean Christopherson = wrote: >=20 > On Thu, Dec 12, 2019 at 04:57:10PM +0100, Paolo Bonzini wrote: >> On 12/12/19 16:52, Liran Alon wrote: >>>>> virt_apic_accesses -> vapic >>>> apicv >>> Frankly, I dislike APICv terminology. I prefer to enumerate the >>> various VMX features which are collectively called APICv by KVM.=20 >>> APICv currently represents in KVM terminology the combination of >>> APIC-register virtualization, virtual-interrupt-delivery and >>> posted-interrupts (See cpu_has_vmx_apicv()). >>>=20 >>> In fact, the coupling of =E2=80=9Cenable_apicv=E2=80=9D module = parameter have made me >>> multiple times to need to disable entire APICv features when there >>> for example was only a bug in posted-interrupts. >>>=20 >>> Even you got confused as virtualize-apic-access is not part of = KVM=E2=80=99s >>> APICv terminology but rather it=E2=80=99s enablement depend on >>> flexpriority_enabled (See cpu_need_virtualize_apic_accesses()). i.e. >>> It can be used for faster intercept handling of accesses to guest >>> xAPIC MMIO page. >>=20 >> Right, I got confused with APIC-register virtualization. Virtualize >> APIC accesses is another one I wouldn't bother putting in = /proc/cpuinfo, >> since it's usually present together with flexpriority. >=20 > Key word being "usually". My intent in printing out partially = redundant > flags was to help users debug/understand why the combined feature = isn't > supported. E.g. userspace can already easily (relatively speaking) = query > flexpriority support via = /sys/module/kvm_intel/parameters/flexpriority. > But if that comes back "N", the user has no way to determine exactly = why > flexpriority is disabled. +1 on that. /proc/cpuinfo should just dump supported VMX features that kernel is = aware of as exposed from CPU. Without further processing.