From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36004) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2anv-0005dW-1b for qemu-devel@nongnu.org; Tue, 17 May 2016 04:56:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2anq-0003Np-4S for qemu-devel@nongnu.org; Tue, 17 May 2016 04:56:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60646) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2anp-0003Nf-V5 for qemu-devel@nongnu.org; Tue, 17 May 2016 04:56:34 -0400 References: <1463412982-6681-1-git-send-email-pbonzini@redhat.com> From: Thomas Huth Message-ID: <573ADCBD.50601@redhat.com> Date: Tue, 17 May 2016 10:56:29 +0200 MIME-Version: 1.0 In-Reply-To: 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: Peter Maydell , Paolo Bonzini Cc: QEMU Developers , Cornelia Huck On 16.05.2016 18:59, Peter Maydell wrote: > On 16 May 2016 at 17:53, Peter Maydell wrote= : >> 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=98re= g=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=98= id=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. >=20 > 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_rea= lize=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] I've checked the build on our POWER server, too, and I get the same problems. You can fix it with this patch: 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" /* Copied from the kernel arch/powerpc/platforms/pseries/msi.c */ (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). Thomas