From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2beT-0001oX-PG for qemu-devel@nongnu.org; Tue, 17 May 2016 05:50:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2beQ-000582-G4 for qemu-devel@nongnu.org; Tue, 17 May 2016 05:50:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38022) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2beQ-00057r-8W for qemu-devel@nongnu.org; Tue, 17 May 2016 05:50:54 -0400 References: <1463412982-6681-1-git-send-email-pbonzini@redhat.com> <573ADCBD.50601@redhat.com> From: Paolo Bonzini Message-ID: <573AE973.2090706@redhat.com> Date: Tue, 17 May 2016 11:50:43 +0200 MIME-Version: 1.0 In-Reply-To: <573ADCBD.50601@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH CFT v3 00/50] NEED_CPU_H / cpu.h / hw/hw.h cleanups List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth , Peter Maydell Cc: QEMU Developers , Cornelia Huck On 17/05/2016 10:56, Thomas Huth wrote: > On 16.05.2016 18:59, Peter Maydell wrote: >> On 16 May 2016 at 17:53, Peter Maydell wrot= e: >>> ppc64 (this is the ppc64be host in the GCC compile farm if >>> you have an account there): >>> >>> /home/pm215/qemu/hw/intc/xics_kvm.c: In function =E2=80=98icp_get_kvm= _state=E2=80=99: >>> /home/pm215/qemu/hw/intc/xics_kvm.c:54:12: error: variable =E2=80=98r= eg=E2=80=99 has >>> initializer but incomplete type >>> struct kvm_one_reg reg =3D { >>> ^ >>> /home/pm215/qemu/hw/intc/xics_kvm.c:55:9: error: unknown field =E2=80= =98id=E2=80=99 >>> specified in initializer >>> .id =3D KVM_REG_PPC_ICP_STATE, >>> ^ >>> /home/pm215/qemu/hw/intc/xics_kvm.c:55:15: error: >>> =E2=80=98KVM_REG_PPC_ICP_STATE=E2=80=99 undeclared (first use in this= function) >>> .id =3D KVM_REG_PPC_ICP_STATE, >>> ^ >>> >>> etc -- looks like missing a kvm include somewhere. >> >> I logged in by hand to do a -k build; the only other error was: >> /home/pm215/qemu/hw/ppc/spapr_pci.c: In function =E2=80=98spapr_phb_re= alize=E2=80=99: >> /home/pm215/qemu/hw/ppc/spapr_pci.c:1426:5: error: implicit >> declaration of function =E2=80=98kvm_enabled=E2=80=99 >> [-Werror=3Dimplicit-function-declaration] >> if (kvm_enabled()) { >> ^ >> /home/pm215/qemu/hw/ppc/spapr_pci.c:1426:5: error: nested extern >> declaration of =E2=80=98kvm_enabled=E2=80=99 [-Werror=3Dnested-externs= ] >=20 > I've checked the build on our POWER server, too, and I get the same > problems. You can fix it with this patch: >=20 > diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c > index 9029d9e..55fd801 100644 > --- a/hw/intc/xics_kvm.c > +++ b/hw/intc/xics_kvm.c > @@ -31,6 +31,7 @@ > #include "cpu.h" > #include "hw/hw.h" > #include "trace.h" > +#include "sysemu/kvm.h" > #include "hw/ppc/spapr.h" > #include "hw/ppc/xics.h" > #include "kvm_ppc.h" > diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c > index 573e635..d4bcb5a 100644 > --- a/hw/ppc/spapr_pci.c > +++ b/hw/ppc/spapr_pci.c > @@ -44,7 +44,7 @@ > #include "hw/pci/pci_bus.h" > #include "hw/ppc/spapr_drc.h" > #include "sysemu/device_tree.h" > - > +#include "sysemu/kvm.h" > #include "hw/vfio/vfio.h" >=20 > /* Copied from the kernel arch/powerpc/platforms/pseries/msi.c */ >=20 > (Note: In xics_kvm.c, the sysemu/kvm.h header file has to be included > before the kvm_ppc.h header file to avoid some other conflicts). >=20 > Thomas >=20 Great to know, thanks! Paolo