From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=43955 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P6Ylf-0000Hb-Vi for qemu-devel@nongnu.org; Thu, 14 Oct 2010 21:07:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P6Yle-0002jZ-JE for qemu-devel@nongnu.org; Thu, 14 Oct 2010 21:07:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33079) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P6Yle-0002jL-BY for qemu-devel@nongnu.org; Thu, 14 Oct 2010 21:07:30 -0400 Date: Thu, 14 Oct 2010 21:36:56 -0300 From: Marcelo Tosatti Message-ID: <20101015003656.GA32272@amt.cnet> References: <4CB6C427.10202@np.css.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4CB6C427.10202@np.css.fujitsu.com> Subject: [Qemu-devel] Re: [PATCH 07/11] kvm, x86: unify sigbus handling, prep List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jin Dongming Cc: Hidetoshi Seto , KVM list , Dean Nelson , "qemu-devel@nongnu.org" , Avi Kivity , Huang Ying On Thu, Oct 14, 2010 at 05:49:43PM +0900, Jin Dongming wrote: > There are 2 similar functions to handle SIGBUS: > sigbus_handler(int n, struct qemu_signalfd_siginfo *siginfo, > void *ctx) > kvm_on_sigbus(CPUState *env, siginfo_t *siginfo) > > The former is used when main thread receives SIGBUS via signalfd, > while latter is used when vcpu thread receives SIGBUS. > These 2 take different siginfo, but in both case required parameters > are common, the code and the addr in the info. > > Restruct functions to take the code and the addr explicitly. > > Signed-off-by: Hidetoshi Seto > Tested-by: Jin Dongming > --- > qemu-kvm.c | 41 ++++++++++++++++++++--------------------- > 1 files changed, 20 insertions(+), 21 deletions(-) Don't see the benefit, separate functions are cleaner.