From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36715) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdNs2-00088W-GT for qemu-devel@nongnu.org; Mon, 04 Nov 2013 12:23:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VdNrw-00068d-GK for qemu-devel@nongnu.org; Mon, 04 Nov 2013 12:23:22 -0500 Received: from cantor2.suse.de ([195.135.220.15]:33482 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdNrw-00067s-6u for qemu-devel@nongnu.org; Mon, 04 Nov 2013 12:23:16 -0500 Message-ID: <5277D7FF.2090100@suse.de> Date: Mon, 04 Nov 2013 18:23:11 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1380259852-20797-1-git-send-email-zxq_yx_007@163.com> <52774193.3030908@163.com> In-Reply-To: <52774193.3030908@163.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/2] kvm/apic: use QOM style List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?6LW15bCP5by6?= Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, Anthony Liguori Hi, Am 04.11.2013 07:41, schrieb =E8=B5=B5=E5=B0=8F=E5=BC=BA: > =E4=BA=8E 09/27/2013 01:30 PM, xiaoqiang zhao =E5=86=99=E9=81=93: >> From: "xiaoqiang.zhao" >> >> Change apic and kvm/apic to use QOM interface. >> >> Includes: >> 1. APICCommonState now use QOM realizefn >> 2. Remove DO_UPCAST() for APICCommonState >> 3. Use type constant >> 4. Change DeviceState pointers from 'd' to 'dev', sounds better? >> >> Signed-off-by: xiaoqiang zhao >> --- >> hw/i386/kvm/apic.c | 40 ++++++++++++++++++---- >> hw/intc/apic.c | 70 >> +++++++++++++++++++++++++-------------- >> hw/intc/apic_common.c | 70 >> +++++++++++++++++++-------------------- >> include/hw/i386/apic_internal.h | 1 - >> 4 files changed, 113 insertions(+), 68 deletions(-) [...] > ping. > patch link: > http://patchwork.ozlabs.org/patch/278481 > http://patchwork.ozlabs.org/patch/278476 Thanks for reminding. A couple of issues with these two patches: When sending more than one patch, please include a small cover letter. That gives a better overview and gives you a central place to ping or us to provide review comments covering both patches. The DO_UPCAST() is a good cleanup, please put it in a separate patch to decouple it from the rest. As for d vs. dev, I've usually only changed it for the init/realize functions I touched or when there was a new name conflict between generic and specific device. But I'm fine with all your d changes. Just please put them in a cleanup patch together with DO_UPCAST(), same for the register_types prefix, then the actual "dangerous" patch becomes smaller and thus easier to review for us. (Instead of 2 you'd have 4.) The main issue though is that Anthony has requested to change the pattern for overriding virtual methods: Can you please update the patch so that void (*init)(APICCommonState *dev); simply gets replaced by DeviceRealize realize;? I.e. drop the two new ...Class'es and parent_realize, leave the call logic as it is now and just update the function signature. Same for the ioapic. For the second patch, I'd appreciate a second reviewer for the static variable being refactored. Note that you can pull the DEVICE(s) -> dev conversion into a preceding cleanup patch by introducing a local DeviceState *dev =3D DEVICE(s). Also there's some minor whitespace issues in ioapic_common_realize() that we'll need to fix. Thanks in advance and sorry for the delay, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg