public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Glauber Costa <glommer@redhat.com>
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	[thread overview]
Message-ID: <1246991791-21741-2-git-send-email-glommer@redhat.com> (raw)
In-Reply-To: <1246991791-21741-1-git-send-email-glommer@redhat.com>

otherwise, compilation breaks with kvm disabled.

Signed-off-by: Glauber Costa <glommer@redhat.com>
---
 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


  reply	other threads:[~2009-07-07 18:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-07 18:36 [PATCH 0/2] Fix compilation with --disable-kvm Glauber Costa
2009-07-07 18:36 ` Glauber Costa [this message]
2009-07-07 18:36   ` [PATCH 2/2] fix compilation with kvm disabled Glauber Costa
2009-07-08  7:59     ` Michael S. Tsirkin
2009-07-08 12:09       ` Glauber Costa
2009-07-08 12:10         ` Avi Kivity
2009-07-08 12:11       ` Avi Kivity
2009-07-08 12:13         ` Michael S. Tsirkin
2009-07-08 12:20           ` Avi Kivity
2009-07-08 12:20             ` Michael S. Tsirkin
2009-07-09 12:57     ` Michael S. Tsirkin
2009-07-07 18:43 ` [PATCH 0/2] Fix compilation with --disable-kvm Jan Kiszka
2009-07-08 12:14 ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1246991791-21741-2-git-send-email-glommer@redhat.com \
    --to=glommer@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox