Expose thread_id in info cpus

Based on patch by Glauber Costa:

To allow management applications like libvirt to apply CPU affinities to
the VCPU threads, expose their ID via info cpus. This patch provides the
pre-existing and used interface from qemu-kvm.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
Jan Kiszka 2011-03-15 12:26:31 +01:00 committed by Marcelo Tosatti
parent f2574737f6
commit dc7a09cfe4
8 changed files with 29 additions and 0 deletions

View file

@ -1194,6 +1194,7 @@ Return a json-array. Each CPU is represented by a json-object, which contains:
"nip": PPC (json-int)
"pc" and "npc": sparc (json-int)
"PC": mips (json-int)
- "thread_id": ID of the underlying host thread (json-int)
Example:
@ -1205,12 +1206,14 @@ Example:
"current":true,
"halted":false,
"pc":3227107138
"thread_id":3134
},
{
"CPU":1,
"current":false,
"halted":true,
"pc":7108165
"thread_id":3135
}
]
}