Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp188743rdg; Thu, 12 Oct 2023 02:47:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGt5eUPuzI/3TCbLSN8YUYy2LfOkp9qmUkLuaOlhcp9fVYD3+X3mN+u+udGZnPiQ1JhGvjK X-Received: by 2002:a67:f5cb:0:b0:452:6b50:1e7e with SMTP id t11-20020a67f5cb000000b004526b501e7emr19025105vso.35.1697104051229; Thu, 12 Oct 2023 02:47:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697104051; cv=none; d=google.com; s=arc-20160816; b=yKXRGKnotjzgw0MfCFpEaX9JGUyjof52tL0KC105PVpvEV+tE7nBe/H2O14Kl4L4R8 Yx7//iSN5jJyp/QVfTZKP66jxY0R1Lt4fzh6FNtdmWfCyhBowQCv+/ck1ivPMgTAdu2V gHV8d/4f3ahIX0lJw1AgBXM70GklRqU9VSJtf4Am6GYquUinooShmvuzlakHF1bem53h NaTh9KD6Yinys0K+vsyhSZI4v0GaBHS5idsZz2biZ9yEqzkyHrCgBa8Qx9IexDxn810t jTN0knq6A5tCkE8rKzCmN0+A6I8EAXwXI7tXAzrPhG/povdLYt8pXPo6qnGpZd7AFibw CuAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=LtqAf8IJzCamc/i/nyXw+yASoK0A/QRQ8NVHhU1f0xU=; fh=yFmHRmZO3V83ms807VRjgnyjaDulC+e/LHXdDtiCovs=; b=ZP6gsN6x3ZzgHIAKNGEXhpU6gYI2sTmowkeXy+7G7gJpZgYdImPxY74kOl3MzX5BkZ qMEWV2yOzJt9Ef1RG/7famIiq9ujOEEVNKA4AfRY5C9RbVkt3wK0jkPPPF9kscRN5Pxk SPRuBwXo1lJu5jcD9vPsO2DUS6a2AgWiARoASg9vdhTBZ5LYshK7U6UAdNdaRo1g2sAr SC0lxToltc58Kdmem+LFmi685NIjwNDnFhpO9gC4ZNdd0XEOXlIYwCkBvZYlVWD+s3Ux bvoFstNMOS4wxZ+eNNZq/wyaSxeWIj5EztC/I1EpM4ueSoC4OKxb+LDO/HSHBmT4Lx+1 ZSSQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id b4-20020a056a000cc400b0068fc9c6eafasi14668267pfv.357.2023.10.12.02.47.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 02:47:31 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id E698B808D692; Thu, 12 Oct 2023 02:46:15 -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 S235513AbjJLJqG (ORCPT + 99 others); Thu, 12 Oct 2023 05:46:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235480AbjJLJqD (ORCPT ); Thu, 12 Oct 2023 05:46:03 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A1368A9; Thu, 12 Oct 2023 02:46:01 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 23A8813D5; Thu, 12 Oct 2023 02:46:42 -0700 (PDT) Received: from [10.57.69.218] (unknown [10.57.69.218]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1551B3F762; Thu, 12 Oct 2023 02:45:58 -0700 (PDT) Message-ID: <998b90f4-1b04-72b0-7524-afe997db1b33@arm.com> Date: Thu, 12 Oct 2023 10:45:57 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v3 1/3] arm: perf: Include threshold control fields valid in PMEVTYPER mask To: Oliver Upton 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 References: <20231010141551.2262059-1-james.clark@arm.com> <20231010141551.2262059-2-james.clark@arm.com> Content-Language: en-US From: James Clark In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.1 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS 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]); Thu, 12 Oct 2023 02:46:16 -0700 (PDT) On 11/10/2023 09:24, Oliver Upton wrote: > 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 Ok will keep that in mind for if we virtualize it in the future. It looks like it will have to happen conditionally depending on the presence of the feature. But it looks like your current patch has the res0 fix for now. > 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/ >