Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp435543rdb; Tue, 31 Oct 2023 11:23:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEzNw2f2IdnpqFpasVA98FV+OTjZVCokIcNk7DlaGZPjROokQL8qzP2HL3a/xY2TB/Da0fx X-Received: by 2002:a17:90b:1bd2:b0:280:4a23:3c84 with SMTP id oa18-20020a17090b1bd200b002804a233c84mr390764pjb.22.1698776580351; Tue, 31 Oct 2023 11:23:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698776580; cv=none; d=google.com; s=arc-20160816; b=mLQXar04OE1WtO7RiDZ2IhzHEnqk44hWUwhpxWAv7uJceYLSfSAUatbard3UiMoGw0 JeKPk87/GTHA3i8wnKVlDjggppY4NmMoredhiB50Pj5vPE8GA0XTVEPDKhh9nFubn2Z9 4hKFbxdVry4QhNnMNh5gUxuuPIYmQMhFcfGEsitF4eITJpG4ZIqo1AnPDIq6FbYWHXbj +K8nb005Y7ZYsdtAzU75ChEyfrD/0WkI5ND6Lo0O+HAomj4AASK0Dpkd4NkwLwKHIHc6 nLz3i00iy1X7OwcxlyPmIRwSUUV4Lmn7/Xgv4bLRpDl6aWiPk92rcBAeLWj0UEJljL3z JB3Q== 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=yNbn0nmi0IqVQ4IpWpVaJD6qi4TEeoW4GIXp7b9ei9M=; fh=zxHPVwHkZCH0esuutnrM+bu9tVhTdru59CnoiBuOyqw=; b=K+SELrVJT9TfCkhlQiUi+HPQp0Evt4gTdEULKNFWb8wO9suFFoF7nIZnFJ7F3pQ9gr tVh8mn6DwoeCrU8re/A/1xYhVHJ7LQ5mHdxaWK3tNOYvo7HUGCfyw+sE9TTmh1yvQW7P qPwSbB0tW4meeEQTuhtgT5flomzaH8m1lAhSEw1hoWt7Fv8hJRSUi0VSaVB0+X4Inf7P 4LWXiHgQbbsjdQR1r6lKOlx38iF+hGtDTCkV7F1fXYg+yfwes/elqkA/ciR+7MWwahyp 3TtI2ZFLPKcbuWPpcUPyHYAWGHXkVbnQtpMZ2C40U2Wm43yPQ7X7q/JMLfxok5OT1Hby S8HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=3fk3zo8k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id go18-20020a17090b03d200b00280334eee27si1230368pjb.127.2023.10.31.11.22.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 11:23:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=3fk3zo8k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 3DD208028A45; Tue, 31 Oct 2023 11:22:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230340AbjJaSWy (ORCPT + 99 others); Tue, 31 Oct 2023 14:22:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230295AbjJaSWx (ORCPT ); Tue, 31 Oct 2023 14:22:53 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89484F4 for ; Tue, 31 Oct 2023 11:22:49 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-507c9305727so481e87.1 for ; Tue, 31 Oct 2023 11:22:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1698776568; x=1699381368; darn=vger.kernel.org; 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=yNbn0nmi0IqVQ4IpWpVaJD6qi4TEeoW4GIXp7b9ei9M=; b=3fk3zo8kUYXtJ8ChHhll6/VfrR6CSBgVBR4UsYsKZEql+oCl22c+aWmgr9hYS0kKUz 7vrEhYnih9w2a062cQJOxHaqXYthboDuhVOQrCnhjT7X7XnQPJTQMkhadSTHbL7Q3Pf3 m9tI5CLOPOoDB/ApPq6jAb+YDdqaT+cpGrYTIg3FWS48n0RGTmm2bNuvhOpRu9BikIWH zwnuetrRrJ2MT3UVXNMMntROIO+AlUkErLldhM+yu4RE7hfUZZUDMZzGaBTDgO61xnjO 49rxbjzfxb5P4EmesiArNeGC8+1BhboKJPISuTM29YBSIzggjKHPYFw9qd3YM68aRrPq SDRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698776568; x=1699381368; 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=yNbn0nmi0IqVQ4IpWpVaJD6qi4TEeoW4GIXp7b9ei9M=; b=V1fGdIQuy3ssYS6ZHs/4uHf5BDRCLYjr8qmvEPjIzHE+YRwA1ptS6M4JJOqbEhJrv1 f/YOEc3ePTILtfx2f1wfIyLUaGPwBHQm9yyXfvHDNlss77eJNnyGyhsL3PJ3MbCQDkjL +RVPKb1Qz0VGyhVAfbkoFJDSZIrDkx4DXtxLUI+nftTYnn6ptsTk58k4izRDC0T1+Wel 6PMIA45CRPCR4nZSCqZm3ZoTGimSSzjDTL1iWtSBj6gSpE3xslvsyPAzktSeUpX5BKgp +D75gCCD1QoyxdcialhtydAgHqvjnp9ig1u5G5HG7SDgP4/QqpF3k1IGQv0QDzx8TZAh 4q8Q== X-Gm-Message-State: AOJu0YzWxCQclfYmtIDmBjf2zlOBXxMAxjKXxCYtuEysdMrPTMi+pFjf aQvCoevlOKvEIoTsl6fbEyWO3DSMMkGomSFvhKvfRqBCOKn1a8tI4Eo= X-Received: by 2002:ac2:5e79:0:b0:505:6c73:ed08 with SMTP id a25-20020ac25e79000000b005056c73ed08mr74975lfr.3.1698776567507; Tue, 31 Oct 2023 11:22:47 -0700 (PDT) MIME-Version: 1.0 References: <20231031090613.2872700-1-dapeng1.mi@linux.intel.com> <20231031090613.2872700-2-dapeng1.mi@linux.intel.com> In-Reply-To: <20231031090613.2872700-2-dapeng1.mi@linux.intel.com> From: Jim Mattson Date: Tue, 31 Oct 2023 11:22:31 -0700 Message-ID: Subject: Re: [Patch 1/2] KVM: x86/pmu: Add Intel CPUID-hinted TopDown slots event To: Dapeng Mi Cc: Sean Christopherson , Paolo Bonzini , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Zhenyu Wang , Zhang Xiong , Mingwei Zhang , Like Xu , Dapeng Mi , Like Xu Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 31 Oct 2023 11:22:58 -0700 (PDT) On Tue, Oct 31, 2023 at 1:58=E2=80=AFAM Dapeng Mi wrote: > > This patch adds support for the architectural topdown slots event which > is hinted by CPUID.0AH.EBX. Can't a guest already program an event selector to count event select 0xa4, unit mask 1, unless the event is prohibited by KVM_SET_PMU_EVENT_FILTER? AFAICT, this change just enables event filtering based on CPUID.0AH:EBX[bit 7] (though it's not clear to me why two independent mechanisms are necessary for event filtering).