From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52773) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBJbW-0002Nk-Ik for qemu-devel@nongnu.org; Wed, 25 Apr 2018 08:32:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fBJbR-0000Ia-JZ for qemu-devel@nongnu.org; Wed, 25 Apr 2018 08:32:58 -0400 References: <20180424214550.32549-1-lersek@redhat.com> <20180424214550.32549-3-lersek@redhat.com> From: Laszlo Ersek Message-ID: Date: Wed, 25 Apr 2018 14:32:42 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/6] qapi: handle the riscv CpuInfoArch in query-cpus-fast List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: Bastian Koppelmann , Laurent Vivier , Markus Armbruster , Michael Clark , Palmer Dabbelt , Paolo Bonzini , Peter Crosthwaite , Richard Henderson , Riku Voipio , Sagar Karandikar , qemu-stable@nongnu.org On 04/25/18 00:32, Eric Blake wrote: > On 04/24/2018 04:45 PM, Laszlo Ersek wrote: >> Commit 25fa194b7b11 added the @riscv enum constant to @CpuInfoArch (used >> in both @CpuInfo and @CpuInfoFast -- the return types of the @query-cpus >> and @query-cpus-fast commands, respectively), and assigned, in both return >> structures, the @CpuInfoRISCV sub-structure to the new enum value. >> >> However, qmp_query_cpus_fast() would not populate either the @arch field >> or the @CpuInfoRISCV sub-structure, when TARGET_RISCV was defined; only >> qmp_query_cpus() would. >> >> In theory, there are two ways to fix this: >> >> (a) Fill in both the @arch field and the @CpuInfoRISCV sub-structure in >> qmp_query_cpus_fast(), by copying the logic from qmp_query_cpus(). >> >> (b) Assign @CpuInfoOther to the @riscv enum constant in @CpuInfoFast, and >> populate only the @arch field in qmp_query_cpus_fast(). >> >> Approach (b) seems more robust, because: >> >> - clearly there has never been an attempt to get actual RISV CPU state >> from qmp_query_cpus_fast(), so its lack of RISCV support is not actually >> a problem, >> >> - getting CPU state without interrupting KVM looks like an exceptional >> thing to do (only S390X does it currently). >> > ... >> Cc: qemu-stable@nongnu.org >> Fixes: 25fa194b7b11901561532e435beb83d046899f7a >> Signed-off-by: Laszlo Ersek >> --- >> > > Reviewed-by: Eric Blake > Thanks Eric, I'll fuse your R-b's from #1 and #2 into one R-b for the squashed variant. Hope that's OK. (Please do check the upcoming commit message for more garblage.) Thanks! Laszlo