Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2098500pxb; Wed, 9 Feb 2022 10:47:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJwysBfwUKds9ezxR2WArazLAofuIMm4y82cCVPInutl8sHU8kdz7F6NaDmkdOKDTrCzuwgO X-Received: by 2002:a17:90a:780e:: with SMTP id w14mr4099882pjk.42.1644432470790; Wed, 09 Feb 2022 10:47:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644432470; cv=none; d=google.com; s=arc-20160816; b=bH0Ups2HOT6kKWhUjaVoP4/c7f6r5L3oX09f2fE33ofvXHKWxD2Z3nKYU+NmQm3LbS avHFHBLCdUcyftkJ3vyI4sQHX/AfnBgT/wVUsUznSfd6kx3jYY7xrSx/M49lvj6+DL/T +9ntVLzxTB09KT/6vnjYlbKhcybSxAwGOrVSNStPBJBptaocxMZ49BIsniwYMhEpSrte 68JLlSBxkfLlGiOZ9BSiG2Dfd3ZnDV3Qj8kj+vJnc+u0t2rtY+y3V0qkiNXtfcPAyX/n ID6brjS4pfUoi71KQhjs89xPzImVNWH6c/gp2+1PhmQMaWxnwah+YUgzwesWiLSe0Wzx RRDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ehqoee1bftUz/gLrW1kXxKGubBl5XYT7H+4O2R4yTN8=; b=R1RP69BF66hERfAelDFm3Muvow2KMCe0VtQGUmdB1xln1k8/k2voIIu7v4MZj49q4O MasLrsd0N3GbQhHTHqvaOdV4J6ICfUORi3cecdm9llLNf99cyBYFYn5GKH/zn/GPovNk iPOoQiDsa7sft98rF2P0g3hZ9DfOTf6bHH9QgTVv8d3cQuCxikE+YxOCAW12ne4kG2le Ih3vNUjFY0uux4eL0RnFsYMH1o25RRTZzpg1C12lcj/F3qte3aW/X7T92b0XYMJZj6pz a0GPvXREpz6x3fltqYK8dRz/O1cSLYY6T7tEfsfTgpQkz2g/vzt3QqZUNgjUXaVWtu+U QY1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=VMjXDE+U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e17si6495969pla.320.2022.02.09.10.47.37; Wed, 09 Feb 2022 10:47:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=VMjXDE+U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237945AbiBIRaW (ORCPT + 99 others); Wed, 9 Feb 2022 12:30:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232303AbiBIRaU (ORCPT ); Wed, 9 Feb 2022 12:30:20 -0500 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 876C3C0613C9 for ; Wed, 9 Feb 2022 09:30:23 -0800 (PST) Received: by mail-wr1-x42c.google.com with SMTP id q7so5227521wrc.13 for ; Wed, 09 Feb 2022 09:30:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ehqoee1bftUz/gLrW1kXxKGubBl5XYT7H+4O2R4yTN8=; b=VMjXDE+UO+gQWCOdpRAssrTMjmcChF0PkTsdA/pDVovwZVbHIhStx3JqiJ/a20KM4Z MwMrRkmTmt+j33cqEWQkKmi1eO7h0GgfsU9MNpgfa/L7MOEWCorP7gKfV/D9CEzZU079 i48eTrcaUHLrmuRrdvGwn17XJEPvsMNG2zyh12JOAqSC2tbgGd4kcPBWQrrp1HcW8gBa QqvZfTgsYwqSwT39ryMehGflmq3B5cyMPJzNCcSpPsfCWt8/7E7Hnylj5HdbVEcq68ZX QLSr5kMCYnMhUgUhaGbal0MHlpi+Qz/5ioAiactY0Jr+3fT/omajQq45q214YCTd9/jF FDUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ehqoee1bftUz/gLrW1kXxKGubBl5XYT7H+4O2R4yTN8=; b=ensLXiRLMLJP5rROo4pteLwX6myqHZbvTnJayL1ldZmNVffO5IvmWG43rDmYH50B3J 4qs8zNoPWIAFsblUYG3FVswC2mBtCX02Mzo4ys24J8vleN+X76OnFmo6+aQcyH8PFBne frHI160yDLkHfqiKaNmQenxqscjDrRXQ6bQ14wXBHBD+7WiBO9MJ5PVwmmiRT1Ouu776 9Yiwyx0S5EOFyGXwYHhC/baqDNbEvv/w/O/kqPxRe2LOplheXFYQZ+NqPkgynO8vTUcO +9Q3uq+zb5UTLsT9cTtpdmInaikfq08FFRNG74NX0WuGLGxD3e1J9YGTkIbe30uvzW6v ukDQ== X-Gm-Message-State: AOAM5327E13C8dk6odJAIUwI5gQ3uC0Jc0u2M/FfQNgN7jmopRxUhI7q LZZzlQyQpHj+4mhdRSfeIw9KopqRoLAvbxV9mutsJA== X-Received: by 2002:adf:ee81:: with SMTP id b1mr2877638wro.149.1644427821958; Wed, 09 Feb 2022 09:30:21 -0800 (PST) MIME-Version: 1.0 References: <20220123184541.993212-1-daviddunn@google.com> <20220123184541.993212-2-daviddunn@google.com> <09d8b472-000b-7150-f60d-ffb5706b164e@gmail.com> In-Reply-To: <09d8b472-000b-7150-f60d-ffb5706b164e@gmail.com> From: David Dunn Date: Wed, 9 Feb 2022 09:30:10 -0800 Message-ID: Subject: Re: [PATCH v5 1/3] KVM: x86: Provide per VM capability for disabling PMU virtualization To: Like Xu Cc: "Paolo Bonzini - Distinguished Engineer (kernel-recipes.org) (KVM HoF)" , kvm@vger.kernel.org, seanjc@google.com, Jim Mattson , Vitaly Kuznetsov , Wanpeng Li , Joerg Roedel , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks Like. I just sent a new v6 series with these minor merge conflicts resolved. Dave On Wed, Feb 9, 2022 at 2:33 AM Like Xu wrote: > > cc LKML and full list of KVM reviewers. > > On 25/1/2022 2:39 am, Jim Mattson wrote: > > On Sun, Jan 23, 2022 at 10:45 AM David Dunn wrote: > >> > >> KVM_CAP_PMU_DISABLE is used to disable PMU virtualization on individual > >> x86 VMs. PMU configuration must be done prior to creating VCPUs. > >> > >> To enable future extension, KVM_CAP_PMU_CAPABILITY reports available > >> settings via bitmask when queried via check_extension. > >> > >> For VMs that have PMU virtualization disabled, usermode will need to > >> clear CPUID leaf 0xA to notify guests. > >> > >> Signed-off-by: David Dunn > > > > Nit: The two references to CPUID leaf 0xA should be qualified as > > applying only to Intel VMs. > > > > Reviewed-by: Jim Mattson > > > > Nit: It looks like we already have "#define KVM_CAP_SYS_ATTRIBUTES 209". > > Hope it helps a little: > > Reviewed-by: Like Xu