From patchwork Tue May 17 08:56:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 9110671 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9D954BF29F for ; Tue, 17 May 2016 08:56:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 03306202EB for ; Tue, 17 May 2016 08:56:49 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2B3972026D for ; Tue, 17 May 2016 08:56:48 +0000 (UTC) Received: from localhost ([::1]:49357 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2ao2-0005hm-CI for patchwork-qemu-devel@patchwork.kernel.org; Tue, 17 May 2016 04:56:46 -0400 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 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E8910C05B1C7; Tue, 17 May 2016 08:56:32 +0000 (UTC) Received: from [10.36.4.225] (vpn1-4-225.ams2.redhat.com [10.36.4.225]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u4H8uUQP025527 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 17 May 2016 04:56:31 -0400 To: Peter Maydell , Paolo Bonzini 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 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 17 May 2016 08:56:33 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: Re: [Qemu-devel] [PATCH CFT v3 00/50] NEED_CPU_H / cpu.h / hw/hw.h cleanups X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Cornelia Huck , QEMU Developers Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 ‘icp_get_kvm_state’: >> /home/pm215/qemu/hw/intc/xics_kvm.c:54:12: error: variable ‘reg’ has >> initializer but incomplete type >> struct kvm_one_reg reg = { >> ^ >> /home/pm215/qemu/hw/intc/xics_kvm.c:55:9: error: unknown field ‘id’ >> specified in initializer >> .id = KVM_REG_PPC_ICP_STATE, >> ^ >> /home/pm215/qemu/hw/intc/xics_kvm.c:55:15: error: >> ‘KVM_REG_PPC_ICP_STATE’ undeclared (first use in this function) >> .id = 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 ‘spapr_phb_realize’: > /home/pm215/qemu/hw/ppc/spapr_pci.c:1426:5: error: implicit > declaration of function ‘kvm_enabled’ > [-Werror=implicit-function-declaration] > if (kvm_enabled()) { > ^ > /home/pm215/qemu/hw/ppc/spapr_pci.c:1426:5: error: nested extern > declaration of ‘kvm_enabled’ [-Werror=nested-externs] I've checked the build on our POWER server, too, and I get the same problems. You can fix it with this patch: (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 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 */