From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [Qemu-devel] Re: [PATCH 07/11] kvm, x86: unify sigbus handling, prep Date: Thu, 14 Oct 2010 22:46:50 -0300 Message-ID: <20101015014650.GB1043@amt.cnet> References: <4CB6C427.10202@np.css.fujitsu.com> <20101015003656.GA32272@amt.cnet> <4CB7AE75.3090404@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jin Dongming , KVM list , Dean Nelson , "qemu-devel@nongnu.org" , Avi Kivity , Huang Ying To: Hidetoshi Seto Return-path: Received: from mx1.redhat.com ([209.132.183.28]:62828 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754288Ab0JOLiW (ORCPT ); Fri, 15 Oct 2010 07:38:22 -0400 Content-Disposition: inline In-Reply-To: <4CB7AE75.3090404@jp.fujitsu.com> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, Oct 15, 2010 at 10:29:25AM +0900, Hidetoshi Seto wrote: > (2010/10/15 9:36), Marcelo Tosatti wrote: > > 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. > > I think this is good for maintainability. > If you want to fix a bug in this area, you might have to change > 2 separate functions in completely same way. > See 6c85786 and a05684e for examples. > > Thanks, > H.Seto OK, makes sense. Do you mind to rebase your patchset after MCE support is merged in qemu upstream?