From patchwork Mon Jan 23 20:10:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Blue Swirl X-Patchwork-Id: 137464 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 E452CB6FC2 for ; Tue, 24 Jan 2012 07:11:24 +1100 (EST) Received: from localhost ([::1]:35988 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpQEb-0006EI-Cr for incoming@patchwork.ozlabs.org; Mon, 23 Jan 2012 15:11:21 -0500 Received: from eggs.gnu.org ([140.186.70.92]:44262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpQEV-0006DE-15 for qemu-devel@nongnu.org; Mon, 23 Jan 2012 15:11:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RpQET-0000wF-Sm for qemu-devel@nongnu.org; Mon, 23 Jan 2012 15:11:15 -0500 Received: from mail-iy0-f173.google.com ([209.85.210.173]:34740) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpQET-0000w4-NT for qemu-devel@nongnu.org; Mon, 23 Jan 2012 15:11:13 -0500 Received: by iahk25 with SMTP id k25so3151614iah.4 for ; Mon, 23 Jan 2012 12:11:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=ovLy9PfWDwmS0oPtg0DgnwbZbEInVmz0GanQYMPkn8Y=; b=rIoressqr0v/nLpJAI5n3xLHYXWcid/H0533fgkLFNoyT+ExX305EPFOPuKSnkHCvX W5BkTJ4dSWJScldKZyWcPRzJ6O7DMnZDLrW8BR1PqsaCJPga6ZodEvKrhMrs2f78D7nf Qm/2ErlLbgDbYxOS/WG14XmF0T9PN87Er3EHc= Received: by 10.42.80.3 with SMTP id t3mr7646000ick.49.1327349472847; Mon, 23 Jan 2012 12:11:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.50.193.229 with HTTP; Mon, 23 Jan 2012 12:10:51 -0800 (PST) From: Blue Swirl Date: Mon, 23 Jan 2012 20:10:51 +0000 Message-ID: To: vrozenfe@redhat.com, qemu-devel X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.210.173 Subject: [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 Signed-off-by: Blue Swirl --- Maybe a better fix would be to allow hyperv to be used also on TCG. --- 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);