From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-180.mta0.migadu.com (out-180.mta0.migadu.com [91.218.175.180]) (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 914363932C3 for ; Mon, 22 Jun 2026 08:06:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782115593; cv=none; b=u7R2UqtRi5/Yc+kYXWhVuKsLKWqY/jFjyfcRASh0+mMKAEyzImZxBNKGuk+F35g+4V/E7AdVg6mjVDzrkv6WGS4lXH9gLLVrcQwV5thlAuFnfEmR3QFat+ql7zYT+WAkWuv8pkg2vF0mrk0xJ55c3JzF/vnS91X5zJsFFXmVOQ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782115593; c=relaxed/simple; bh=+0MhYWvDoVqixJolM+MtR3Uaco3QucCwRBMSFs+rT58=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QbpjKn80uT3+poJB5WXxedxnCl6zVhUKFuyxqvgUvgQyXoAyhO/VYNFwQfI83P7hZGoC2xo1UScwB4RYwTQwdbwZuGewPnxnAnfoNRI3gUbl7P+dh0ya+Yx082uIviSsOZjmK2Q3OPhWbDf/DKMkG6EVI08CR+xAiTjmd/67Mc8= 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=MVwLbQx7; arc=none smtp.client-ip=91.218.175.180 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="MVwLbQx7" 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=1782115589; 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=MVwLbQx7QRJDcIaOMO8q6B6KLxYJWvn8OK56/ca6uQ4AD86ZCcpQY0/uqTkOq1+clGduSf hhT3C8Z7znxdgMYSNeu+shiqLRP5Ee4CX1JvJwa5cGMRGcxO/tfDTVwqGcR7KJiUNYX+wT hVESMuKdsrG40U5/bmz7cKntbiwzFJA= From: Atish Patra Date: Mon, 22 Jun 2026 01:04:34 -0700 Subject: [PATCH v7 22/22] 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: <20260622-counter_delegation-v7-22-0ba2fd34614e@meta.com> References: <20260622-counter_delegation-v7-0-0ba2fd34614e@meta.com> In-Reply-To: <20260622-counter_delegation-v7-0-0ba2fd34614e@meta.com> To: Jiri Olsa , James Clark , Mark Rutland , Will Deacon , Arnaldo Carvalho de Melo , Rob Herring , Ian Rogers , Krzysztof Kozlowski , Anup Patel , Paul Walmsley , Atish Patra , Namhyung Kim Cc: devicetree@vger.kernel.org, linux-perf-users@vger.kernel.org, Conor Dooley , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@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