Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp691083ybi; Wed, 17 Jul 2019 03:23:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqxPRO0PnyCcNLZxWTDfIFyEuCoetcJMjZYJX0KTMkuLmKKM1WLvyVOX0hwYzntoYGrwrn6T X-Received: by 2002:a17:902:5a2:: with SMTP id f31mr41635918plf.72.1563358993463; Wed, 17 Jul 2019 03:23:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563358993; cv=none; d=google.com; s=arc-20160816; b=kIzEbqIID9DVj3a1XZHwOQslcbgfPZ2xm8tSxdoSIxt4LFP4WsIIww/lZu14z3Vz5w MW5q7OWlikM5PPYurjDYeLYKbcTCzpoltMataTiATlSxLKYzN//jrEQTbVdu75Hsq2Y1 eRZ6BvpqiFem/rvGHqKRO8WejUXB8hk3rxthU/dGSj6UoFI04vBdxoaFm8iuoZwbJB3N 1uvtejGW6PNb0GMbcLBVlhgY6TDzufAmkZLyE/ylrqAQXzPtanhU7wMdYylfaKtb/C/C vVwIvAK3ch8EGic8ZblfXt8FSalZb948uEFSdrwzQZpofqiqBYJzs5E5x8uOdum6her5 b6vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:openpgp:from:references:cc:to:subject; bh=jLTb8XaQwDXkfXSX6rjJzVtQ/s+CDif4rrylvctVb1E=; b=BQ8BiYIPUZgXkha9h7LKUSPOzyt/5PTPY4f2k2+aljs9PpqV8Loz5x0SQ+HnnuJhhp x09xFadgRfIWZ09627DQifL7nt1ixjQHKDzBA6CaVLtNZYQ+Ag7KAdCNhi1GGWevlNNv 4Ah0rruCftLEsoD+5SguyfT1X9+Sbd7548h80WpMTbkC5rP5xnuQ1rkrju3cZU6s5rmB R7dOSevacYW+V5EH5uhl7F7oAU8oelnxB/XXftzhJ3MAbSXDElCSJH9am2yj+/FA7L2J sWOVGsxYRy7q5Pa/eFciElL2N0z2lrYATXMnJcAKKj6S+oJV66wa3TBiPxQMdkMhYy4m IejQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v1si21795796plb.381.2019.07.17.03.22.56; Wed, 17 Jul 2019 03:23:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726817AbfGQKW2 (ORCPT + 99 others); Wed, 17 Jul 2019 06:22:28 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:37073 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725873AbfGQKW1 (ORCPT ); Wed, 17 Jul 2019 06:22:27 -0400 Received: by mail-wm1-f66.google.com with SMTP id f17so21545506wme.2 for ; Wed, 17 Jul 2019 03:22:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jLTb8XaQwDXkfXSX6rjJzVtQ/s+CDif4rrylvctVb1E=; b=rjIm1sTI7lJvIf7GRKp+8il9hLMb7IiMTP5Z6Zab1TUZ0MDbrwh0LiqSszS6oDF7H9 C0SQlzHhrFkoBvJ2CVzrKI5NfxbWvpfteRlieq6oNEdjI2EHEekJyf0f4vAzDrufBVho kG00djgytYCE99EBaLVQJdzgQsJboPPnrV5CmHXllVfyhdlD8DnYsCVk/X8x//xaLSAY MeyCzl9EIkSDW+lFvBcnPEVN/WLNfxaZqC6xLhDONcoorDvnkkrAvS4gwz9Oy10cdN+6 gDmeNDJoTZbs92EC+dhWA7h02wfJEYsXAhg3Wseg9HmbCmwOYh83zEh9EugMm3D614xp KnaQ== X-Gm-Message-State: APjAAAWmjrJ674cVIR/fcBMAH3eQ8TzN1ZKF/XvWtoc51MVhtUEB+MQp 6rZtvbKg+esYrJFf+OkAJBpW/w== X-Received: by 2002:a05:600c:212:: with SMTP id 18mr4545813wmi.88.1563358945785; Wed, 17 Jul 2019 03:22:25 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:e427:3beb:1110:dda2? ([2001:b07:6468:f312:e427:3beb:1110:dda2]) by smtp.gmail.com with ESMTPSA id h133sm24198066wme.28.2019.07.17.03.22.24 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Wed, 17 Jul 2019 03:22:25 -0700 (PDT) Subject: Re: [PATCH v2] KVM: x86: PMU Event Filter To: Wei Wang , Eric Hankland Cc: rkrcmar@redhat.com, linux-kernel@vger.kernel.org, Stephane Eranian , kvm@vger.kernel.org References: <5D27FE26.1050002@intel.com> <5D2D8FB4.3020505@intel.com> From: Paolo Bonzini Openpgp: preference=signencrypt Message-ID: <5580889b-e357-e7bc-88e6-d68c4a23dd64@redhat.com> Date: Wed, 17 Jul 2019 12:22:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <5D2D8FB4.3020505@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/07/19 10:49, Wei Wang wrote: > { >   KVM_PMU_EVENT_ACTION_GP_NONE = 0, >   KVM_PMU_EVENT_ACTION_GP_ACCEPT = 1, >   KVM_PMU_EVENT_ACTION_GP_REJECT = 2, >   KVM_PMU_EVENT_ACTION_MAX > }; > > and add comments to explain something like below: > > Those GP actions are for the filtering of guest events running on the > virtual general > purpose counters. The actions to filter guest events running on the > virtual fixed > function counters are not added currently as they all seem fine to be > used by the > guest so far, but that could be supported on demand in the future via > adding new > actions. > Let's just implement the bitmap of fixed counters (it's okay to follow the same action as gp counters), and add it to struct kvm_pmu_event_filter. While at it, we can add a bunch of padding u32s and a flags field that can come in handy later (it would fail the ioctl if nonzero). Wei, Eric, who's going to do it? :) Paolo