On Thu, 8 Feb 2018 09:09:04 -0500 Luiz Capitulino <lcapitul...@redhat.com> wrote:
> On Thu, 8 Feb 2018 10:48:08 +0100 > Viktor Mihajlovski <mihaj...@linux.vnet.ibm.com> wrote: > > > 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. > > I'd very strongly advise against extending query-cpus. Note that the > latency problems with query-cpus exists in all archs, it's just a > matter of time for it to pop up for s390 use-cases too. > > I think there's three options for this change: > > 1. If this doesn't require interrupting vCPU threads, then you > could rebase this on top of query-cpus-fast From my perspective, rebasing on top of query-cpus-fast looks like a good idea. This would imply that we need architecture-specific fields for the new interface as well, though. > > 2. If you plan to keep adding s390 state/registers to QMP commands, > then you could consider adding a query-s390-cpu-state or add > a query-cpu-state command that accepts the arch name as a parameter Personally, I don't see a need for more fields. But maybe I'm just unimaginative. > > 3. If you end up needing to expose state that actually needs an > ioctl, then we should consider porting info registers to QMP > > > > > 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}] > > > > Signed-off-by: Viktor Mihajlovski <mihaj...@linux.vnet.ibm.com>