Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp2364310rwe; Sat, 15 Apr 2023 18:20:29 -0700 (PDT) X-Google-Smtp-Source: AKy350aAEgViNuDtwLrGMKVD/T7C6FZa0a7ewOWr1ncXYyNuBCNmIlCaLXcbJlQkyH9wKl9Ombt5 X-Received: by 2002:a05:6a00:2193:b0:63a:cefa:9d43 with SMTP id h19-20020a056a00219300b0063acefa9d43mr14069632pfi.23.1681608029402; Sat, 15 Apr 2023 18:20:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681608029; cv=none; d=google.com; s=arc-20160816; b=XBLoeCRFIiwfEuZU6J6bWvXeBgioXm96xHbkLVVRPK+FL0cD3nsyx2kH9Ts1kMAWb/ TTlb98rxhXOjzWuC25euagE6fSt8FO59SM7zssHUM6t3R0jcqNtY/nP66pK20eJoWNUM lfUm0qOVmQqQg63BtCKTB/wq1mqaM6IzOqp2ZAc+bvxlWckaM4D8t+jISV1bTLI/8gny 9BQWGBxYDAfWp6c8jpqx1X1SVgSHbVwOEv676BpTAWQBPLGJTEpbcNgr2EBY9yXLCQUR oSEn9wVq8OkFhwacAioc70xiLX4WAHoSXRB2rTfDFM4sMo2nPqZNUVZkFGIiCFRlp2Xh 5z7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=AikccuILl/rWwVlUOcy4wtolB2YL8IX34+EVMpD42sg=; b=yMhsT4fyiFUjpI0Dciss8zDwIrxhgusfOhESg8e5K9VM5yXhdEFDIavd2UqbcB+LFr vFjqmWGcFsJIfDsi6Q78gyaBpXRngVFp8mjZVzcTVk6XuCDgCF8yRjaKh78javHxm8tn F9Pg1XYhPbsJw7Nk/XHG4L0X8+RWU5piX1gePkyAUxFLste+FdGp9/pPZyhejafowzXv CJw6kPwGviTfal1gqUQYWzSlDgTbKQieFyXUxVWYDsZPnCRg34bpVVlmtitxXSBLnNbi ijVqWVGWmCRLJzI++CrWP5CWMmB5XW3DhGOCJYn8a4JKWTZPfZzSxY7Hr+E/raH7ndaG k89w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=dPCVE1VQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z7-20020aa79587000000b0063b87539e44si1432306pfj.399.2023.04.15.18.20.05; Sat, 15 Apr 2023 18:20:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=dPCVE1VQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230146AbjDPAZy (ORCPT + 99 others); Sat, 15 Apr 2023 20:25:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230099AbjDPAZx (ORCPT ); Sat, 15 Apr 2023 20:25:53 -0400 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE8EF35A9; Sat, 15 Apr 2023 17:25:52 -0700 (PDT) Received: by mail-ej1-x644.google.com with SMTP id dx24so11056814ejb.11; Sat, 15 Apr 2023 17:25:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681604751; x=1684196751; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=AikccuILl/rWwVlUOcy4wtolB2YL8IX34+EVMpD42sg=; b=dPCVE1VQ9k0Cuu8quWGycURV9SGO5kqGK2tGTmoickhgMNDpDqcBvl5IcL+XDpuhl3 cOWkJWembdBu9WvJy52kUQA2ZSXBiRBiKCBqFVzjviJFVC9Brxy3iw/ErGO6jsBpHYk3 S8G4PAKdZopqWjA7S4NdtvXkORXKKQqN1OI20eQ3ILhOJAwlk2Bal7PjzFxSuXSc1CQ8 Ttlog++cOP2dT+V1t2hhXvarZyGaZvsQqW6cK2Gjry3vMUL53+d15wQ4UOagzze5+Fat x9ohAczNH1lDYPkB1IjdaaQ88fmk6W9MLBV72LT8BTvwgcYPdUH861TPzTUgvKIek4QS cYHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681604751; x=1684196751; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AikccuILl/rWwVlUOcy4wtolB2YL8IX34+EVMpD42sg=; b=TDRuc3NbJGuq0JPeJ1jmJ65fkcyIA3PxSKVXzdQML8MZ9aTf8CpGkPGe1na93cWLHk /ZOMUIwDNDAbbF1h8e6/cS2Je8vQsDEeNqd9NobF0PlmrkxzRMoiNlkakQY571UCUHHR UQgtHRXlGEkAlqD0q2zZihADBbEVlGX6PsrCkTjUXLiAEXSykuA/MlvIPOkHx6Hzn6mD re/fUTr2evy/qRqoV3gHKB0AwOD+ZdcBAKrBsubYsfqUT4gb8HJAE38dFwFkvuLkeBtf iYA4mkb576PbGQBT3j6N1GvUTBEFPyAsEVjeiAEflWf5CRTX4hB5wIqOhlXhEwkWu1xz 8S1g== X-Gm-Message-State: AAQBX9dG8ZnyrBDQ+inO9hYaHLtfFoxKPZrpLeyHdvaeUVHpRQNkbpzN BgHYFnVQV7LzboFZ5fbXpH+pnwX9NSl75ObNV7E= X-Received: by 2002:a17:906:fcd8:b0:94e:2d:e94f with SMTP id qx24-20020a170906fcd800b0094e002de94fmr1597507ejb.8.1681604751315; Sat, 15 Apr 2023 17:25:51 -0700 (PDT) MIME-Version: 1.0 References: <20230414110056.19665-1-cloudliang@tencent.com> <20230414110056.19665-5-cloudliang@tencent.com> In-Reply-To: From: Jinrong Liang Date: Sun, 16 Apr 2023 08:25:40 +0800 Message-ID: Subject: Re: [PATCH 4/7] KVM: x86/pmu: Add documentation for fixed ctr on PMU filter To: Bagas Sanjaya Cc: Sean Christopherson , Like Xu , Paolo Bonzini , Jonathan Corbet , Shuah Khan , Aaron Lewis , David Matlack , Vishal Annapurve , Wanpeng Li , Jinrong Liang , linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 Bagas Sanjaya =E4=BA=8E2023=E5=B9=B44=E6=9C=8815=E6= =97=A5=E5=91=A8=E5=85=AD 11:24=E5=86=99=E9=81=93=EF=BC=9A > > On Fri, Apr 14, 2023 at 07:00:53PM +0800, Jinrong Liang wrote: > > +Specifically, KVM follows the following pseudo-code when determining w= hether to > > +allow the guest FixCtr[i] to count its pre-defined fixed event: > > + > > + FixCtr[i]_is_allowed =3D (action =3D=3D ALLOW) && (bitmap & BIT(i)) = || > > + (action =3D=3D DENY) && !(bitmap & BIT(i)); > > + FixCtr[i]_is_denied =3D !FixCtr[i]_is_allowed; > > + > > As kernel test robot has reported [1], you need to wrap the code above > in a code block: I will make the changes as you suggested, i.e. wrap the code above in a code block. Thanks. > > ---- >8 ---- > diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.= rst > index 036f5b1a39aff8..b5836767e0e76d 100644 > --- a/Documentation/virt/kvm/api.rst > +++ b/Documentation/virt/kvm/api.rst > @@ -5126,7 +5126,7 @@ Via this API, KVM userspace can also control the be= havior of the VM's fixed > counters (if any) by configuring the "action" and "fixed_counter_bitmap"= fields. > > Specifically, KVM follows the following pseudo-code when determining whe= ther to > -allow the guest FixCtr[i] to count its pre-defined fixed event: > +allow the guest FixCtr[i] to count its pre-defined fixed event:: > > FixCtr[i]_is_allowed =3D (action =3D=3D ALLOW) && (bitmap & BIT(i)) || > (action =3D=3D DENY) && !(bitmap & BIT(i)); > > Thanks. > > [1]: https://lore.kernel.org/linux-doc/202304150850.rx4UDDsB-lkp@intel.co= m/ > > -- > An old man doll... just what I always wanted! - Clara