From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Tobler Subject: Re: [PATCH for-1.7] target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid() Date: Mon, 11 Nov 2013 22:28:18 +0100 Message-ID: <52814BF2.3010101@FreeBSD.org> References: <1384204922-8250-1-git-send-email-peter.maydell@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Paolo Bonzini , Anthony Liguori , kvm@vger.kernel.org, Gleb Natapov , patches@linaro.org To: Peter Maydell , qemu-devel@nongnu.org Return-path: In-Reply-To: <1384204922-8250-1-git-send-email-peter.maydell@linaro.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org On 11.11.13 22:22, Peter Maydell wrote: > Fix build failures with clang when KVM is not enabled by > providing a stub version of kvm_arch_get_supported_cpuid(). > > Signed-off-by: Peter Maydell > --- > I wouldn't be surprised if this also affected debug gcc > builds with KVM disabled, but I haven't checked. I can confirm the patch below fixes the clang link issue here. Also, the gcc debug build does work. Thanks a lot! Andreas > > Incidentally, since this is an x86 specific function its > prototype should be moved into target-i386/kvm_i386.h, but > that's a separate patch. > > target-i386/kvm-stub.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/target-i386/kvm-stub.c b/target-i386/kvm-stub.c > index 11429c4..18fe938 100644 > --- a/target-i386/kvm-stub.c > +++ b/target-i386/kvm-stub.c > @@ -16,3 +16,9 @@ bool kvm_allows_irq0_override(void) > { > return 1; > } > + > +uint32_t kvm_arch_get_supported_cpuid(KVMState *env, uint32_t function, > + uint32_t index, int reg) > +{ > + return 0; > +} > From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vfz26-0007rL-Mn for qemu-devel@nongnu.org; Mon, 11 Nov 2013 16:28:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vfz20-0006nc-S6 for qemu-devel@nongnu.org; Mon, 11 Nov 2013 16:28:30 -0500 Received: from mail.fgznet.ch ([81.92.96.47]:65442 helo=smtp.fgznet.ch) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vfz20-0006nE-Iu for qemu-devel@nongnu.org; Mon, 11 Nov 2013 16:28:24 -0500 Message-ID: <52814BF2.3010101@FreeBSD.org> Date: Mon, 11 Nov 2013 22:28:18 +0100 From: Andreas Tobler MIME-Version: 1.0 References: <1384204922-8250-1-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1384204922-8250-1-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for-1.7] target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , qemu-devel@nongnu.org Cc: Paolo Bonzini , Anthony Liguori , kvm@vger.kernel.org, Gleb Natapov , patches@linaro.org On 11.11.13 22:22, Peter Maydell wrote: > Fix build failures with clang when KVM is not enabled by > providing a stub version of kvm_arch_get_supported_cpuid(). > > Signed-off-by: Peter Maydell > --- > I wouldn't be surprised if this also affected debug gcc > builds with KVM disabled, but I haven't checked. I can confirm the patch below fixes the clang link issue here. Also, the gcc debug build does work. Thanks a lot! Andreas > > Incidentally, since this is an x86 specific function its > prototype should be moved into target-i386/kvm_i386.h, but > that's a separate patch. > > target-i386/kvm-stub.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/target-i386/kvm-stub.c b/target-i386/kvm-stub.c > index 11429c4..18fe938 100644 > --- a/target-i386/kvm-stub.c > +++ b/target-i386/kvm-stub.c > @@ -16,3 +16,9 @@ bool kvm_allows_irq0_override(void) > { > return 1; > } > + > +uint32_t kvm_arch_get_supported_cpuid(KVMState *env, uint32_t function, > + uint32_t index, int reg) > +{ > + return 0; > +} >