Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp1361233rwe; Fri, 14 Apr 2023 20:25:17 -0700 (PDT) X-Google-Smtp-Source: AKy350avuTRWr16qjpR63LKTn1GUjMZacsMo1cyKiCvZ0dXbWQV1eg83zaUvGutJrN9bTrX/Nxeq X-Received: by 2002:a17:902:ce8c:b0:1a1:80ea:4364 with SMTP id f12-20020a170902ce8c00b001a180ea4364mr4896588plg.31.1681529117022; Fri, 14 Apr 2023 20:25:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681529117; cv=none; d=google.com; s=arc-20160816; b=lp543MpCexctq0y/P1lEcvFhJ/M+TwntJWWB+0kaY2l3MX5Ri04t4olPVc54op8IgC oU5VOyrJrS1fySgevgh+PGJLpofUnV2tqmEUBQCxuYxDQWCBxUoZdkXCK82PpqHxUTKy HhME+3nqSd7PlUoWAA5toHdrmJXNfkBz7FPydU3L5WGZKAMMlkeG3vcOvXN5pJtAD3ZU 3YpHFsZEIGqGgQ/4BYzHx11xDvV1ljGPo6leQCnN5Ss2PaU6Qt9vph+GgreoaPF3bGm0 OfuNytQYTlWkwJ5a+9tT5rK37nyCtCXGs58yHxYHb6PZcvzMebZhbptGe14s1F9e1wyg Tjrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=DNu94NMQ9GzAL+Jkh37nSsTNhTljtl3TXqyNQLLmIlA=; b=JEZtIwZfTMwCTK3a4jpFkYIWTG1ltfSU4mO96B/73Nv1UFaqN2GKtLF8pBfCArySyc dxwDUlUYvl18plu1sCUZTbEFRIMeAKYdqzQKydg7TLwZwKUqmxHW+1rzl/zYwZT+GRl5 Lxn6+UNdJ2VR6iBJ+fp+zey0GdF7ziFY/2DavamaGs91OngiJio/L5fhmkFMhir8y9tV nqlVgRctapvQBAxhNseHImLiWgrRb4rFKDadWZihqPiuXzjqFbqN3pO6lw9yOB6Mevxk M0JBI2f527zc829NGnMQeCcCv3Zcuzyk54bz6ITA8bSgYQNUAI8YXL6qpjLvL1gScSU6 9ZcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=gBOEzXcp; 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 iz17-20020a170902ef9100b001a656fe6c48si5666640plb.296.2023.04.14.20.24.57; Fri, 14 Apr 2023 20:25:16 -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=gBOEzXcp; 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 S229786AbjDODYQ (ORCPT + 99 others); Fri, 14 Apr 2023 23:24:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbjDODYM (ORCPT ); Fri, 14 Apr 2023 23:24:12 -0400 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE1B84C3C; Fri, 14 Apr 2023 20:24:11 -0700 (PDT) Received: by mail-pj1-x1034.google.com with SMTP id fw22-20020a17090b129600b00247255b2f40so6608698pjb.1; Fri, 14 Apr 2023 20:24:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681529051; x=1684121051; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=DNu94NMQ9GzAL+Jkh37nSsTNhTljtl3TXqyNQLLmIlA=; b=gBOEzXcpc3N8u612RDt2T+UAxswu/9qsTeAFMEE92vl3q7GGWsz7C9Weah0pfMmtJv U4bsnRLxmZl1x0KyTuZcXGtIZ+WvjcM3Gbjn/NwpScQgKmpmurUX2mASZ6nD9jP3TdU7 fDZ+AdeTMa97PU3R79YevKvaj7ml33u5CoK33GfgBtXVSoG7mnWJS2jiHbJYP22OrBXg ehyT1xgCyJbh2x76n7PB4iz8+UtnO7v6/bXEUE+mVAn9g+KkQWlfwzF+AkCqk7hNiq1I qErHOBfqbAD0e+VQWU04dEl58eLSkxCEHbt8W/InjBfh8zcEN9vMs7BUPaXahXVOYWNM WrkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681529051; x=1684121051; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=DNu94NMQ9GzAL+Jkh37nSsTNhTljtl3TXqyNQLLmIlA=; b=avdfb7/5xZp2yCKJLg1UUIrj+8CGoLCZ+/b9MokmMtJzmWRx/1/TTttKcufEO/BpHO 4LuTuNJtns4f6DyirF0bzNtnTrUC5M6pjvvPBn+77peqi4JnLN+lJVBg6A5AeS1VkblI ZrAKHZMzqgYCdPNWYv2dIOKB7ranS5Sf0akk1ODp9yhCuDnFcb4fvhIdAPN/9FjI8zxa BgoumJoKXGkdjWDBz/8QgDjGt5AIVBQQRHy5RP70B8YTX6P9DD7EIVX6K9l6bZvSMDkG zntzzH3lWbJJ2jPbzd5OeZSf5Yl+tpsxvlWYjieZOEphVHGMTp8GLLJ0y7V3dLyjqxsr fAyQ== X-Gm-Message-State: AAQBX9f3taFv+dlJOCTWnH9TDAO0qMjMHV2c4WeybH31QyFUAWsW7dY0 B7gjSss1Er0okYcooKU6VIE= X-Received: by 2002:a17:90a:ba13:b0:247:160d:3a8e with SMTP id s19-20020a17090aba1300b00247160d3a8emr7894574pjr.22.1681529051023; Fri, 14 Apr 2023 20:24:11 -0700 (PDT) Received: from debian.me (subs03-180-214-233-65.three.co.id. [180.214.233.65]) by smtp.gmail.com with ESMTPSA id oa4-20020a17090b1bc400b002469a865810sm5331106pjb.28.2023.04.14.20.24.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Apr 2023 20:24:10 -0700 (PDT) Received: by debian.me (Postfix, from userid 1000) id 1EB9D106677; Sat, 15 Apr 2023 10:24:06 +0700 (WIB) Date: Sat, 15 Apr 2023 10:24:06 +0700 From: Bagas Sanjaya To: Jinrong Liang , Sean Christopherson Cc: 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 Subject: Re: [PATCH 4/7] KVM: x86/pmu: Add documentation for fixed ctr on PMU filter Message-ID: References: <20230414110056.19665-1-cloudliang@tencent.com> <20230414110056.19665-5-cloudliang@tencent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230414110056.19665-5-cloudliang@tencent.com> X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_WEB,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 On Fri, Apr 14, 2023 at 07:00:53PM +0800, Jinrong Liang wrote: > +Specifically, KVM follows the following pseudo-code when determining whether to > +allow the guest FixCtr[i] to count its pre-defined fixed event: > + > + FixCtr[i]_is_allowed = (action == ALLOW) && (bitmap & BIT(i)) || > + (action == DENY) && !(bitmap & BIT(i)); > + FixCtr[i]_is_denied = !FixCtr[i]_is_allowed; > + As kernel test robot has reported [1], you need to wrap the code above in a code block: ---- >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 behavior 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 whether 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 = (action == ALLOW) && (bitmap & BIT(i)) || (action == DENY) && !(bitmap & BIT(i)); Thanks. [1]: https://lore.kernel.org/linux-doc/202304150850.rx4UDDsB-lkp@intel.com/ -- An old man doll... just what I always wanted! - Clara