mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
qmp: expose s390-specific CPU info
Presently s390x is the only architecture not exposing specific CPU information via QMP query-cpus. Upstream discussion has shown that it could make sense to report the architecture specific CPU state, e.g. to detect that a CPU has been stopped. With this change the output of query-cpus will look like this on s390: [ {"arch": "s390", "current": true, "props": {"core-id": 0}, "cpu-state": "operating", "CPU": 0, "qom_path": "/machine/unattached/device[0]", "halted": false, "thread_id": 63115}, {"arch": "s390", "current": false, "props": {"core-id": 1}, "cpu-state": "stopped", "CPU": 1, "qom_path": "/machine/unattached/device[1]", "halted": true, "thread_id": 63116} ] This change doesn't add the s390-specific data to HMP 'info cpus'. A follow-on patch will remove all architecture specific information from there. Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <1518797321-28356-2-git-send-email-mihajlov@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
This commit is contained in:
parent
21fc97c5ff
commit
9d0306dfdf
8 changed files with 73 additions and 44 deletions
|
@ -141,12 +141,9 @@ struct CPUS390XState {
|
|||
* architectures, there is a difference between a halt and a stop on s390.
|
||||
* If all cpus are either stopped (including check stop) or in the disabled
|
||||
* wait state, the vm can be shut down.
|
||||
* The acceptable cpu_state values are defined in the CpuInfoS390State
|
||||
* enum.
|
||||
*/
|
||||
#define CPU_STATE_UNINITIALIZED 0x00
|
||||
#define CPU_STATE_STOPPED 0x01
|
||||
#define CPU_STATE_CHECK_STOP 0x02
|
||||
#define CPU_STATE_OPERATING 0x03
|
||||
#define CPU_STATE_LOAD 0x04
|
||||
uint8_t cpu_state;
|
||||
|
||||
/* currently processed sigp order */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue