From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: [PATCH 1/2] surround kvm function with kvm_enabled Date: Tue, 7 Jul 2009 14:36:30 -0400 Message-ID: <1246991791-21741-2-git-send-email-glommer@redhat.com> References: <1246991791-21741-1-git-send-email-glommer@redhat.com> Cc: avi@redhat.com To: kvm@vger.kernel.org Return-path: Received: from mx2.redhat.com ([66.187.237.31]:42287 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753633AbZGGSgd (ORCPT ); Tue, 7 Jul 2009 14:36:33 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n67IaX0i024018 for ; Tue, 7 Jul 2009 14:36:33 -0400 In-Reply-To: <1246991791-21741-1-git-send-email-glommer@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: otherwise, compilation breaks with kvm disabled. Signed-off-by: Glauber Costa --- hw/pc.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index cf84416..afab0ad 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -1131,7 +1131,9 @@ static void pc_init1(ram_addr_t ram_size, #endif } - kvm_set_boot_cpu_id(0); + if (kvm_enabled()) { + kvm_set_boot_cpu_id(0); + } for (i = 0; i < smp_cpus; i++) { env = pc_new_cpu(cpu_model); } -- 1.6.2.2