xref: /linux/Documentation/ABI/testing/sysfs-bus-event_source-devices-hv_gpci (revision 9caf9e2b8bae58e39501f6fb1fc9189009538ccc)
1435387ddSKajol JainWhat:           /sys/bus/event_source/devices/hv_gpci/format
2435387ddSKajol JainDate:           September 2020
3435387ddSKajol JainContact:        Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
4435387ddSKajol JainDescription:    Read-only. Attribute group to describe the magic bits
5435387ddSKajol Jain                that go into perf_event_attr.config for a particular pmu.
6435387ddSKajol Jain                (See ABI/testing/sysfs-bus-event_source-devices-format).
7435387ddSKajol Jain
8435387ddSKajol Jain                Each attribute under this group defines a bit range of the
9435387ddSKajol Jain                perf_event_attr.config. All supported attributes are listed
1054a19b4dSMauro Carvalho Chehab                below::
11435387ddSKajol Jain
12435387ddSKajol Jain				counter_info_version  = "config:16-23"
13435387ddSKajol Jain				length  = "config:24-31"
14435387ddSKajol Jain				partition_id  = "config:32-63"
15435387ddSKajol Jain				request = "config:0-31"
16435387ddSKajol Jain				sibling_part_id = "config:32-63"
17435387ddSKajol Jain				hw_chip_id = "config:32-63"
18435387ddSKajol Jain				offset = "config:32-63"
19435387ddSKajol Jain				phys_processor_idx = "config:32-63"
20435387ddSKajol Jain				secondary_index = "config:0-15"
21435387ddSKajol Jain				starting_index = "config:32-63"
22435387ddSKajol Jain
2354a19b4dSMauro Carvalho Chehab                For example::
24435387ddSKajol Jain
25435387ddSKajol Jain		  processor_core_utilization_instructions_completed = "request=0x94,
26435387ddSKajol Jain					phys_processor_idx=?,counter_info_version=0x8,
27435387ddSKajol Jain					length=8,offset=0x18"
28435387ddSKajol Jain
29435387ddSKajol Jain		In this event, '?' after phys_processor_idx specifies this value
30435387ddSKajol Jain		this value will be provided by user while running this event.
31435387ddSKajol Jain
32ad0a02b8SCody P SchaferWhat:		/sys/bus/event_source/devices/hv_gpci/interface/collect_privileged
33ad0a02b8SCody P SchaferDate:		February 2014
34dfdac393Ssukadev@linux.vnet.ibm.comContact:	Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
35ad0a02b8SCody P SchaferDescription:
36ad0a02b8SCody P Schafer		'0' if the hypervisor is configured to forbid access to event
37ad0a02b8SCody P Schafer		counters being accumulated by other guests and to physical
38ad0a02b8SCody P Schafer		domain event counters.
3954a19b4dSMauro Carvalho Chehab
40ad0a02b8SCody P Schafer		'1' if that access is allowed.
41ad0a02b8SCody P Schafer
42ad0a02b8SCody P SchaferWhat:		/sys/bus/event_source/devices/hv_gpci/interface/ga
43ad0a02b8SCody P SchaferDate:		February 2014
44dfdac393Ssukadev@linux.vnet.ibm.comContact:	Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
45ad0a02b8SCody P SchaferDescription:
46ad0a02b8SCody P Schafer		0 or 1. Indicates whether we have access to "GA" events (listed
47ad0a02b8SCody P Schafer		in arch/powerpc/perf/hv-gpci.h).
48ad0a02b8SCody P Schafer
49ad0a02b8SCody P SchaferWhat:		/sys/bus/event_source/devices/hv_gpci/interface/expanded
50ad0a02b8SCody P SchaferDate:		February 2014
51dfdac393Ssukadev@linux.vnet.ibm.comContact:	Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
52ad0a02b8SCody P SchaferDescription:
53ad0a02b8SCody P Schafer		0 or 1. Indicates whether we have access to "EXPANDED" events (listed
54ad0a02b8SCody P Schafer		in arch/powerpc/perf/hv-gpci.h).
55ad0a02b8SCody P Schafer
56ad0a02b8SCody P SchaferWhat:		/sys/bus/event_source/devices/hv_gpci/interface/lab
57ad0a02b8SCody P SchaferDate:		February 2014
58dfdac393Ssukadev@linux.vnet.ibm.comContact:	Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
59ad0a02b8SCody P SchaferDescription:
60ad0a02b8SCody P Schafer		0 or 1. Indicates whether we have access to "LAB" events (listed
61ad0a02b8SCody P Schafer		in arch/powerpc/perf/hv-gpci.h).
62ad0a02b8SCody P Schafer
63ad0a02b8SCody P SchaferWhat:		/sys/bus/event_source/devices/hv_gpci/interface/version
64ad0a02b8SCody P SchaferDate:		February 2014
65dfdac393Ssukadev@linux.vnet.ibm.comContact:	Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
66ad0a02b8SCody P SchaferDescription:
67ad0a02b8SCody P Schafer		A number indicating the version of the gpci interface that the
68ad0a02b8SCody P Schafer		hypervisor reports supporting.
69ad0a02b8SCody P Schafer
70ad0a02b8SCody P SchaferWhat:		/sys/bus/event_source/devices/hv_gpci/interface/kernel_version
71ad0a02b8SCody P SchaferDate:		February 2014
72dfdac393Ssukadev@linux.vnet.ibm.comContact:	Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
73ad0a02b8SCody P SchaferDescription:
74ad0a02b8SCody P Schafer		A number indicating the latest version of the gpci interface
75ad0a02b8SCody P Schafer		that the kernel is aware of.
7609b791d9SKajol Jain
7709b791d9SKajol JainWhat:		/sys/devices/hv_gpci/cpumask
7809b791d9SKajol JainDate:		October 2020
7909b791d9SKajol JainContact:	Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
8009b791d9SKajol JainDescription:	read only
8109b791d9SKajol Jain		This sysfs file exposes the cpumask which is designated to make
8209b791d9SKajol Jain		HCALLs to retrieve hv-gpci pmu event counter data.
83*9caf9e2bSKajol Jain
84*9caf9e2bSKajol JainWhat:		/sys/devices/hv_gpci/interface/processor_bus_topology
85*9caf9e2bSKajol JainDate:		July 2023
86*9caf9e2bSKajol JainContact:	Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
87*9caf9e2bSKajol JainDescription:	admin read only
88*9caf9e2bSKajol Jain		This sysfs file exposes the system topology information by making HCALL
89*9caf9e2bSKajol Jain		H_GET_PERF_COUNTER_INFO. The HCALL is made with counter request value
90*9caf9e2bSKajol Jain		PROCESSOR_BUS_TOPOLOGY(0xD0).
91*9caf9e2bSKajol Jain
92*9caf9e2bSKajol Jain		* This sysfs file will be created only for power10 and above platforms.
93*9caf9e2bSKajol Jain
94*9caf9e2bSKajol Jain		* User needs root privileges to read data from this sysfs file.
95*9caf9e2bSKajol Jain
96*9caf9e2bSKajol Jain		* This sysfs file will be created, only when the HCALL returns "H_SUCCESS",
97*9caf9e2bSKajol Jain		  "H_AUTHORITY" or "H_PARAMETER" as the return type.
98*9caf9e2bSKajol Jain
99*9caf9e2bSKajol Jain		  HCALL with return error type "H_AUTHORITY" can be resolved during
100*9caf9e2bSKajol Jain		  runtime by setting "Enable Performance Information Collection" option.
101*9caf9e2bSKajol Jain
102*9caf9e2bSKajol Jain		* The end user reading this sysfs file must decode the content as per
103*9caf9e2bSKajol Jain		  underlying platform/firmware.
104*9caf9e2bSKajol Jain
105*9caf9e2bSKajol Jain		Possible error codes while reading this sysfs file:
106*9caf9e2bSKajol Jain
107*9caf9e2bSKajol Jain		* "-EPERM" : Partition is not permitted to retrieve performance information,
108*9caf9e2bSKajol Jain			    required to set "Enable Performance Information Collection" option.
109*9caf9e2bSKajol Jain
110*9caf9e2bSKajol Jain		* "-EIO" : Can't retrieve system information because of invalid buffer length/invalid address
111*9caf9e2bSKajol Jain			   or because of some hardware error. Refer to getPerfCountInfo documentation for
112*9caf9e2bSKajol Jain			   more information.
113*9caf9e2bSKajol Jain
114*9caf9e2bSKajol Jain		* "-EFBIG" : System information exceeds PAGE_SIZE.
115