From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcX8Z-0006P2-T6 for qemu-devel@nongnu.org; Fri, 10 Oct 2014 06:09:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XcX8T-00076E-Np for qemu-devel@nongnu.org; Fri, 10 Oct 2014 06:09:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8863) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcX8T-000768-GG for qemu-devel@nongnu.org; Fri, 10 Oct 2014 06:09:21 -0400 Message-ID: <5437B04A.6040001@redhat.com> Date: Fri, 10 Oct 2014 12:09:14 +0200 From: Paolo Bonzini MIME-Version: 1.0 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> In-Reply-To: <20141010111150.13d14f0d.cornelia.huck@de.ibm.com> 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: Cornelia Huck , qemu-devel@nongnu.org Cc: Eduardo Habkost 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 ca= n >>> 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. Can you check that this fixes it? 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") =20 Paolo