From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B274C43603 for ; Thu, 12 Dec 2019 17:44:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E6A25214AF for ; Thu, 12 Dec 2019 17:44:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730000AbfLLRoA (ORCPT ); Thu, 12 Dec 2019 12:44:00 -0500 Received: from mga18.intel.com ([134.134.136.126]:32104 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730235AbfLLRn6 (ORCPT ); Thu, 12 Dec 2019 12:43:58 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Dec 2019 09:43:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,306,1571727600"; d="scan'208";a="216367838" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.202]) by orsmga003.jf.intel.com with ESMTP; 12 Dec 2019 09:43:57 -0800 Date: Thu, 12 Dec 2019 09:43:57 -0800 From: Sean Christopherson To: Paolo Bonzini Cc: Liran Alon , 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 , Radim =?utf-8?B?S3LEjW3DocWZ?= , 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 Subject: Re: [PATCH v4 11/19] x86/cpu: Print VMX flags in /proc/cpuinfo using VMX_FEATURES_* Message-ID: <20191212174357.GE3163@linux.intel.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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <17c6569e-d0af-539c-6d63-f4c07367d8d1@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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. > > APICv currently represents in KVM terminology the combination of > > APIC-register virtualization, virtual-interrupt-delivery and > > posted-interrupts (See cpu_has_vmx_apicv()). > > > > In fact, the coupling of “enable_apicv” 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. > > > > Even you got confused as virtualize-apic-access is not part of KVM’s > > APICv terminology but rather it’s 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. > > 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. 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.