From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-172.mta0.migadu.com (out-172.mta0.migadu.com [91.218.175.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 87D5E3DC4A9 for ; Tue, 9 Jun 2026 06:03:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780984996; cv=none; b=ELVEuLrCPyhlHzK2FC8r1c+GqkaLtonxpdS+gijyO8d9n7CHm0Cw5+i1n8dD7kb+5jVuMuU8F2H9IW1p8kxpQOYPnIgXJY//qguhpoa74oD0/OChqnjyBsOIhAHw8qo++BeIWl4FSwDbGmCI+HXx++30ET+mzYZDDUtDBU6txZ4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780984996; c=relaxed/simple; bh=+0MhYWvDoVqixJolM+MtR3Uaco3QucCwRBMSFs+rT58=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=AumNv7EcGC1G4cKQZbu7SiK6ObeaU31AhK5jiNi8ePfGVkcDBOuce/GRpQIXshNP5q9nh6DTkWpzPihDU5rAIXoZ6d/xBQxaNcA6rlX8JlOPQ1Y8JEmjlOzqIkEpomsFnAp3QkXcfuhHG9Ho/b/JE9bzC6JySTOSuWYI9QfD9II= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=vpM6FHFJ; arc=none smtp.client-ip=91.218.175.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="vpM6FHFJ" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1780984993; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+74FvUBZxlbST9+7oM0jYayJwnBAvv8czrcrU+bwgIY=; b=vpM6FHFJf+/bhrb1nhFUxA9NhY0bKIHiu9hZC4M74ql0x/+s2OW8XYklNsJN2Wqjb+aDgm TuW+Rb6lccksKUK79R+bswVAVlucisHM3wAIY53BkTvXnckQhJh6EMm1O8xxg/xFzGUadQ pYOfEDg6bHiwaiIUlD7swclvmTkv7FQ= From: Atish Patra Date: Mon, 08 Jun 2026 23:01:35 -0700 Subject: [PATCH v6 21/21] TEST(do-not-upstream): fake qemu vendor JSON + mapfile entry for CounterIDMask path Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260608-counter_delegation-v6-21-285b72ed65a9@meta.com> References: <20260608-counter_delegation-v6-0-285b72ed65a9@meta.com> In-Reply-To: <20260608-counter_delegation-v6-0-285b72ed65a9@meta.com> To: James Clark , Rob Herring , Atish Patra , Arnaldo Carvalho de Melo , Jiri Olsa , Will Deacon , Mark Rutland , Anup Patel , Namhyung Kim , Paul Walmsley , Krzysztof Kozlowski , Ian Rogers Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Conor Dooley , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-Migadu-Flow: FLOW_OUT From: Atish Patra arch/riscv/qemu/virt/events.json: fake-json-{any,ctr3,ctr34,ctr6} with EventCode + CounterIDMask; mapfile.csv: 0x0-0x0-0x0 -> qemu/virt. Exercises jevents CounterIDMask -> counterid_mask= -> config2 -> cdeleg counter allocation. Signed-off-by: Atish Patra --- tools/perf/pmu-events/arch/riscv/mapfile.csv | 1 + .../pmu-events/arch/riscv/qemu/virt/events.json | 26 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/tools/perf/pmu-events/arch/riscv/mapfile.csv b/tools/perf/pmu-events/arch/riscv/mapfile.csv index 87cfb0e0849f..3533a8c0253f 100644 --- a/tools/perf/pmu-events/arch/riscv/mapfile.csv +++ b/tools/perf/pmu-events/arch/riscv/mapfile.csv @@ -24,3 +24,4 @@ 0x602-0x3-0x0,v1,openhwgroup/cva6,core 0x67e-0x80000000db0000[89]0-0x[[:xdigit:]]+,v1,starfive/dubhe-80,core 0x31e-0x8000000000008a45-0x[[:xdigit:]]+,v1,andes/ax45,core +0x0-0x0-0x0,v1,qemu/virt,core diff --git a/tools/perf/pmu-events/arch/riscv/qemu/virt/events.json b/tools/perf/pmu-events/arch/riscv/qemu/virt/events.json new file mode 100644 index 000000000000..294c4ed645f6 --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/qemu/virt/events.json @@ -0,0 +1,26 @@ +[ + { + "EventName": "fake-json-any", + "EventCode": "0xF10", + "CounterIDMask": "0xFFFFFFF8", + "BriefDescription": "FAKE json event (any hpmcounter 3-31) - QEMU does not model 0xF10" + }, + { + "EventName": "fake-json-ctr3", + "EventCode": "0xF11", + "CounterIDMask": "0x8", + "BriefDescription": "FAKE json event constrained to hpmcounter3" + }, + { + "EventName": "fake-json-ctr34", + "EventCode": "0xF12", + "CounterIDMask": "0x18", + "BriefDescription": "FAKE json event constrained to hpmcounter3,4" + }, + { + "EventName": "fake-json-ctr6", + "EventCode": "0xF13", + "CounterIDMask": "0x40", + "BriefDescription": "FAKE json event constrained to hpmcounter6 (out of a small pmu-mask)" + } +] -- 2.53.0-Meta