[Skiboot] RTAS: Processor module info

Sukadev Bhattiprolu sukadev at linux.vnet.ibm.com
Wed Oct 21 06:46:50 AEDT 2015


Sukadev Bhattiprolu [sukadev at linux.vnet.ibm.com] wrote:
| 
| We are trying to implement the RTAS_SYSPARM_PROCESSOR_MODULE_INFO
| parameter to rtas_get_sysparm() call in QEMU/KVM.
| 
| This parameter requires gathering:
| 	- number of module types
| 	- for each module type:
| 		- number of sockets in the type,
| 		- number of chips per socket
| 		- number of cores per chip. 
| 
| PHYP gets the RTAS information from the HDAT, from procID, moduleID
| and chip index fields.

I have been looking through skiboot code, doc/device-tree.txt, and the
HDAT specs. I am trying to see if we can have QEMU use the following
device tree information from the host to implement PROCESSOR_MODULE_INFO

The distros apparently need this for licensing.

Appreciate any comments.

	# of Module types:

		1 (hard code for now?) Or do we support more than
		one module types like SCM and DCM?

	# of Sockets of this module type
		
		PowerVM seems to treat modules as sockets.

		Can we use 'lsprop xscom*/ibm,hw-module-id' to
		determine the number of modules?

		On my PowerKVM system[1], I see two module ids:

			$ lsprop xscom*/ibm,hw-module-id
			xscom at 3fc0000000000/ibm,hw-module-id
					 00000000
			xscom at 3fc0800000000/ibm,hw-module-id
					 00000000
			xscom at 3fc8000000000/ibm,hw-module-id
					 00000001
			xscom at 3fc8800000000/ibm,hw-module-id
					 00000001
	# of chips per this module type

		Referring to skiboot.git/doc/device-tree.txt
		"xscom is the closest thing to a chip..."

		Would a count of xscom*/ibm,proc-chip-id give us a count
		of the number of chips?

		(The chips belong to different modules but we assume
		they are of the same module type which is what this
		RTAS call is supposed to return)

		Again, on my PowerKVM system, we would get 4 in this field.

		$ lsprop xscom*/ibm,proc-chip-id
		xscom at 3fc0000000000/ibm,proc-chip-id
				 00000000
		xscom at 3fc0800000000/ibm,proc-chip-id
				 00000001
		xscom at 3fc8000000000/ibm,proc-chip-id
				 00000002
		xscom at 3fc8800000000/ibm,proc-chip-id
				 00000003

	# of cores/chip in this module type

		Again, skiboot.git/doc/device-tree.txt, indicates that
		the cpus/PowerPC,Power8* section must exist for each core
		in the system.

		So count the 'cpus/PowerPC,POWER8*' entries and divide
		by the above number of cores?

		On my PowerKVM system, I see 16 cores. So we would return
		4 cores per chip in this field.


[1] My Power KVM system info:

	PowerKVM release 3.1.0.0-28.0,
	uname: 3.18.17-345.el7_1.pkvm3_1_0.2800.1.ppc64le



More information about the Skiboot mailing list