Received: from eggs.gnu.org ([2001:4830:134:3::10]:53696) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuKXe-0005aY-KW for qemu-devel@nongnu.org; Tue, 10 Jun 2014 07:48:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WuKXW-0005Hu-L2 for qemu-devel@nongnu.org; Tue, 10 Jun 2014 07:48:38 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:59846) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuKXW-0005Hk-BH for qemu-devel@nongnu.org; Tue, 10 Jun 2014 07:48:30 -0400 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 10 Jun 2014 12:48:29 +0100 Date: Tue, 10 Jun 2014 13:48:23 +0200 From: Cornelia Huck Message-ID: <20140610134823.7c0fd6d8.cornelia.huck@de.ibm.com> In-Reply-To: <1402381083-17241-3-git-send-email-aik@ozlabs.ru> References: <1402381083-17241-1-git-send-email-aik@ozlabs.ru> <1402381083-17241-3-git-send-email-aik@ozlabs.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 2/4] target-s390x: Migrate to new nmi_monitor_handler() CPU callback List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: Peter Maydell , Paolo Bonzini , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Alexander Graf On Tue, 10 Jun 2014 16:18:01 +1000 Alexey Kardashevskiy wrote: > This defines a nmi_monitor_handler() callback for s390 CPU class. > > This removes #ifdef s390 branch in qmp_inject_nmi so new s390's > nmi_monitor_handler() callback is going to be used for NMI. > > Since nmi_monitor_handler()-calling code is platform independent, > CPUState::cpu_index is used instead of S390CPU::env.cpu_num. > There should not be any change in behaviour as both @cpu_index and > @cpu_num are global CPU numbers. > > Also, s390_cpu_restart() takes care of preforming operations in > the specific CPU thread so no extra measure is required here either. > > Since the only error s390_cpu_restart() can return is ENOSYS, convert > it to QERR_UNSUPPORTED. That's an improvement over the current check for == -1. > > Signed-off-by: Alexey Kardashevskiy > --- > Changes: > v5: > * added ENOSYS -> QERR_UNSUPPORTED, qapi/qmp/qerror.h was added for this > > v4: > * s/\/nmi_monitor_handler/ > > v3: > * now contains both old code removal and new code insertion, easier to > track changes > > --- > Is there any good reason to have @cpu_num in addition to @cpu_index? > Just asking :) > --- > cpus.c | 14 -------------- > target-s390x/cpu.c | 9 +++++++++ > 2 files changed, 9 insertions(+), 14 deletions(-) > Acked-by: Cornelia Huck