Received: from eggs.gnu.org ([2001:4830:134:3::10]:41924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcXBu-0007YW-5M for qemu-devel@nongnu.org; Fri, 10 Oct 2014 06:13:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XcXBj-00089p-64 for qemu-devel@nongnu.org; Fri, 10 Oct 2014 06:12:54 -0400 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:51021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcXBi-00089F-U8 for qemu-devel@nongnu.org; Fri, 10 Oct 2014 06:12:43 -0400 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 10 Oct 2014 11:12:41 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id EEBBA17D8056 for ; Fri, 10 Oct 2014 11:14:52 +0100 (BST) Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s9AACcNP61079804 for ; Fri, 10 Oct 2014 10:12:38 GMT Received: from d06av04.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s9AACcjm011800 for ; Fri, 10 Oct 2014 04:12:38 -0600 Date: Fri, 10 Oct 2014 12:12:36 +0200 From: Cornelia Huck Message-ID: <20141010121236.7800e28b.cornelia.huck@de.ibm.com> In-Reply-To: <5437B04A.6040001@redhat.com> References: <1412849438-12274-1-git-send-email-pbonzini@redhat.com> <1412849855-12661-16-git-send-email-pbonzini@redhat.com> <20141010104709.4a84cb4d.cornelia.huck@de.ibm.com> <20141010111150.13d14f0d.cornelia.huck@de.ibm.com> <5437B04A.6040001@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PULL 23/28] kvm: Make KVMState be the TYPE_KVM_ACCEL instance struct List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, Eduardo Habkost On Fri, 10 Oct 2014 12:09:14 +0200 Paolo Bonzini wrote: > Il 10/10/2014 11:11, Cornelia Huck ha scritto: > > On Fri, 10 Oct 2014 10:47:09 +0200 > > Cornelia Huck wrote: > >=20 > >> On Thu, 9 Oct 2014 12:17:30 +0200 > >> Paolo Bonzini wrote: > >> > >>> From: Eduardo Habkost > >>> > >>> Now that we create an accel object before calling machine_init, we can > >>> simply use the accel object to save all KVMState data, instead of > >>> allocationg KVMState manually. > >>> > >>> Reviewed-by: Paolo Bonzini > >>> Signed-off-by: Eduardo Habkost > >>> Signed-off-by: Paolo Bonzini > >>> --- > >>> kvm-all.c | 13 +++++++++---- > >>> 1 file changed, 9 insertions(+), 4 deletions(-) > >> > >> This patch breaks compilation on s390 for me: > >> > >> CC s390x-softmmu/kvm-all.o > >> /home/cohuck/git/qemu/kvm-all.c:110: error: redefinition of typedef = =E2=80=98KVMState=E2=80=99 > >> /home/cohuck/git/qemu/include/sysemu/kvm.h:161: error: previous declar= ation of =E2=80=98KVMState=E2=80=99 was here > >=20 > > Seems to be compiler version dependant. With the SLES11SP3 compiler > > (calls itself 4.3.4), I get the failure above. With newer compilers > > (4.6+), it builds fine. >=20 > Can you check that this fixes it? >=20 > diff --git a/kvm-all.c b/kvm-all.c > index e98a7c7..44a5e72 100644 > --- a/kvm-all.c > +++ b/kvm-all.c > @@ -71,7 +71,7 @@ typedef struct KVMSlot >=20 > typedef struct kvm_dirty_log KVMDirtyLog; >=20 > -typedef struct KVMState > +struct KVMState > { > AccelState parent_obj; >=20 > @@ -107,7 +107,7 @@ typedef struct KVMState > QTAILQ_HEAD(msi_hashtab, KVMMSIRoute) msi_hashtab[KVM_MSI_HASHTAB_SI= ZE]; > bool direct_msi; > #endif > -} KVMState; > +}; >=20 > #define TYPE_KVM_ACCEL ACCEL_CLASS_NAME("kvm") Builds for me with both 4.3.4 and 4.7.2.