From patchwork Tue Jan 24 19:50:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadim Rozenfeld X-Patchwork-Id: 137634 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 78F11B6F65 for ; Wed, 25 Jan 2012 06:58:59 +1100 (EST) Received: from localhost ([::1]:45671 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpmW7-0005un-Tk for incoming@patchwork.ozlabs.org; Tue, 24 Jan 2012 14:58:55 -0500 Received: from eggs.gnu.org ([140.186.70.92]:40874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpmVl-0002Ol-Oo for qemu-devel@nongnu.org; Tue, 24 Jan 2012 14:58:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RpmNw-0006kh-SH for qemu-devel@nongnu.org; Tue, 24 Jan 2012 14:50:33 -0500 Received: from mx3-phx2.redhat.com ([209.132.183.24]:34573) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpmNw-0006kF-Kd for qemu-devel@nongnu.org; Tue, 24 Jan 2012 14:50:28 -0500 Received: from zmail09.collab.prod.int.phx2.redhat.com (zmail09.collab.prod.int.phx2.redhat.com [10.5.83.11]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q0OJoPmh029504; Tue, 24 Jan 2012 14:50:25 -0500 Date: Tue, 24 Jan 2012 14:50:25 -0500 (EST) From: Vadim Rozenfeld To: Blue Swirl Message-ID: In-Reply-To: MIME-Version: 1.0 X-Originating-IP: [10.35.203.140] X-Mailer: Zimbra 7.1.2_GA_3268 (ZimbraWebClient - FF3.0 (Linux)/7.1.2_GA_3268) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 209.132.183.24 Cc: qemu-devel Subject: Re: [Qemu-devel] [PATCH] hyperv: fix build on non-KVM hosts X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org ----- Original Message ----- From: "Blue Swirl" To: vrozenfe@redhat.com, "qemu-devel" Sent: Monday, January 23, 2012 10:10:51 PM Subject: [PATCH] hyperv: fix build on non-KVM hosts Signed-off-by: Blue Swirl --- Maybe a better fix would be to allow hyperv to be used also on TCG. [VR] Yes, it could be nice. But, sadly, I have no time to do it, at least not in the near future. Best, Vadim. --- Makefile.target | 2 +- target-i386/hyperv.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile.target b/Makefile.target index 092565a..69193d4 100644 --- a/Makefile.target +++ b/Makefile.target @@ -201,7 +201,7 @@ obj-$(CONFIG_VGA_CIRRUS) += cirrus_vga.o obj-y += memory.o savevm.o LIBS+=-lz -obj-i386-y +=hyperv.o +obj-i386-$(CONFIG_KVM) += hyperv.o QEMU_CFLAGS += $(VNC_TLS_CFLAGS) QEMU_CFLAGS += $(VNC_SASL_CFLAGS) diff --git a/target-i386/hyperv.h b/target-i386/hyperv.h index 15467bf..bacb1d4 100644 --- a/target-i386/hyperv.h +++ b/target-i386/hyperv.h @@ -14,7 +14,9 @@ #define QEMU_HW_HYPERV_H 1 #include "qemu-common.h" +#ifdef CONFIG_KVM #include +#endif #ifndef HYPERV_SPINLOCK_NEVER_RETRY #define HYPERV_SPINLOCK_NEVER_RETRY 0xFFFFFFFF @@ -24,7 +26,7 @@ #define KVM_CPUID_SIGNATURE_NEXT 0x40000100 #endif -#ifndef CONFIG_USER_ONLY +#if !defined(CONFIG_USER_ONLY) && defined(CONFIG_KVM) void hyperv_enable_vapic_recommended(bool val); void hyperv_enable_relaxed_timing(bool val); void hyperv_set_spinlock_retries(int val);