From patchwork Tue Jul 7 18:36:30 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glauber Costa X-Patchwork-Id: 34505 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n67Iaab2031536 for ; Tue, 7 Jul 2009 18:36:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753865AbZGGSge (ORCPT ); Tue, 7 Jul 2009 14:36:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754209AbZGGSge (ORCPT ); Tue, 7 Jul 2009 14:36:34 -0400 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 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n67IaWgT021826; Tue, 7 Jul 2009 14:36:32 -0400 Received: from localhost.localdomain (virtlab1.virt.bos.redhat.com [10.16.72.21]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n67IaVqB026175; Tue, 7 Jul 2009 14:36:32 -0400 From: Glauber Costa To: kvm@vger.kernel.org Cc: avi@redhat.com 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> In-Reply-To: <1246991791-21741-1-git-send-email-glommer@redhat.com> References: <1246991791-21741-1-git-send-email-glommer@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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); }