From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ejo9f-0001vj-5R for qemu-devel@nongnu.org; Thu, 08 Feb 2018 10:30:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ejo9a-000207-NW for qemu-devel@nongnu.org; Thu, 08 Feb 2018 10:30:31 -0500 Date: Thu, 8 Feb 2018 10:30:24 -0500 From: Luiz Capitulino Message-ID: <20180208103024.35d962c9@redhat.com> In-Reply-To: <20180208162126.3426623b.cohuck@redhat.com> References: <1518083288-20410-1-git-send-email-mihajlov@linux.vnet.ibm.com> <20180208090904.5a9c88df@redhat.com> <20180208162126.3426623b.cohuck@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] S390: Expose s390-specific CPU info List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck Cc: Viktor Mihajlovski , qemu-devel@nongnu.org, qemu-s390x@nongnu.org On Thu, 8 Feb 2018 16:21:26 +0100 Cornelia Huck wrote: > On Thu, 8 Feb 2018 09:09:04 -0500 > Luiz Capitulino wrote: > > > On Thu, 8 Feb 2018 10:48:08 +0100 > > Viktor Mihajlovski 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. That's not a problem. I mean, to be honest I think I'd slightly prefer to keep things separate and add a new command for each arch that needs its specific information, but that's just personal preference. The only strong requirement for query-cpus-fast is that it doesn't interrupt vCPU threads. > > > > > 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 >