Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp655718rdg; Wed, 11 Oct 2023 01:26:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFnvRaaoKOZwsXiWS1jCnxSQPeBDpddix9/0M+Ztmr9JKYXsKBGR6Ll2pILdMj/oXJAA69R X-Received: by 2002:a17:903:24d:b0:1bb:77a2:edda with SMTP id j13-20020a170903024d00b001bb77a2eddamr25060802plh.36.1697012797436; Wed, 11 Oct 2023 01:26:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697012797; cv=none; d=google.com; s=arc-20160816; b=uJHymZw46xR5+VRmGnLQxmXb4+jP71QoTzXT1edlWIQTgePLjzqQduY7OpgOab1Yue 9iTiIYUCR4QgswfiwZ/rgIj0zvE1ejhqUdCaskmdxEWXyyiDkb/WC79JGMQm0KNHuVCo 73HdqOX8TDR4iDKdu3p35vp4e6LewR7N88AaWCfETfdG18zzH7DXfDsZpm5qLBi6htsT U+LaCKxFBm0DzOIMTl1d6iIyO3CWaDPpv2iA1mS6DQ7rNxThDReNTZsYR8qW1MscriP/ 9BA+wrhRQ4/82cohviLRYQFQT+iaRuNCVsFr1wBD13R/TKLw0SI6LKa67fQmuzRPrZ6N y/Dg== 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:dkim-signature:date; bh=/S0JgFqg4H1IYpuqJTqVbgL24y5HPTPBE2KO5N0Er7Y=; fh=MwwOZLCR1h41YBUBj0p4nIfxFEzIgMmvELx+Cp2ECak=; b=LAYjmoVO13EBe6Hj25WNbbA9SF7xCPGD51ndb0Qzyf+cM/9VJOgslcQ7jjXqn6V6zs SmTW9YaGd+NdW4QwL+fgxVri7oKbe9/7nHaLkrva38GVjvcXC1ABnHS/FdNh3XP46+W+ X6ayp+oNg7pLCTDXVRoFONhnOoVhSjZAX1XhAkFHEeIgtIcwe1FESKl8KOINgHtmLLCR qd0uWZhvuw/rcq0qx3LLrTd/ZrGMSc+wadLvaizc2v4PlWj6irXXS8+aOUoLpBJcYsDM TxRiwig2fVFlc6RW+0xxc6JnayiUqDcU+BVPw3Ji59toG3jvmhv0OIj02afDXuJZt6kc bF1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=rifPWBRt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id b14-20020a170903228e00b001c5e1816251si642207plh.497.2023.10.11.01.26.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 01:26:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=rifPWBRt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 789298090E9F; Wed, 11 Oct 2023 01:25:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230355AbjJKIZT (ORCPT + 99 others); Wed, 11 Oct 2023 04:25:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345551AbjJKIZL (ORCPT ); Wed, 11 Oct 2023 04:25:11 -0400 Received: from out-191.mta0.migadu.com (out-191.mta0.migadu.com [IPv6:2001:41d0:1004:224b::bf]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 946B3DC; Wed, 11 Oct 2023 01:25:04 -0700 (PDT) Date: Wed, 11 Oct 2023 08:24:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1697012702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/S0JgFqg4H1IYpuqJTqVbgL24y5HPTPBE2KO5N0Er7Y=; b=rifPWBRtD8D2d+dvqwjSDF/T7fYlgNVBaxxBWCzIc7b8xZZeknRWnFujZMp7ojIzLlyad1 +PynOxmlCk/KIRAmcn30AFb4ug9YsYDBl2LWoRMeOALhY20J+GwckhXDhAFxu5oQDg86WU 0/oU2Ft0wW4+dNOwW/VSd/RxfMpGo6A= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: James Clark Cc: linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, suzuki.poulose@arm.com, Catalin Marinas , Will Deacon , Jonathan Corbet , Russell King , Marc Zyngier , James Morse , Zenghui Yu , Mark Rutland , Zaid Al-Bassam , Reiji Watanabe , Geert Uytterhoeven , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev Subject: Re: [PATCH v3 1/3] arm: perf: Include threshold control fields valid in PMEVTYPER mask Message-ID: References: <20231010141551.2262059-1-james.clark@arm.com> <20231010141551.2262059-2-james.clark@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231010141551.2262059-2-james.clark@arm.com> X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Wed, 11 Oct 2023 01:25:33 -0700 (PDT) X-Spam-Level: ** Hi James, On Tue, Oct 10, 2023 at 03:15:41PM +0100, James Clark wrote: > FEAT_PMUv3_TH (Armv8.8) adds two new fields to PMEVTYPER, so include > them in the mask. These aren't writable on 32 bit kernels as they are in > the high part of the register, so split the mask definition to the asm > files for each platform. > > Now where the value is used in some parts of KVM, include the asm file. > There is no impact on guest PMUs emulated with KVM because the new > fields are ignored when constructing the attributes for opening the > event. But if threshold support is added to KVM at a later time no > change to the mask will be needed. KVM should treat TH and TC as RES0 if the feature isn't virtualized. I'd rather move KVM away from using ARMV8_PMU_EVTYPE_MASK in the first place. Looks like we already have an issue with the NSH bit, so I've sent the below patch to fix it. https://lore.kernel.org/kvmarm/20231011081649.3226792-3-oliver.upton@linux.dev/ -- Thanks, Oliver