diff mbox

[1/2] surround kvm function with kvm_enabled

Message ID 1246991791-21741-2-git-send-email-glommer@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Glauber Costa July 7, 2009, 6:36 p.m. UTC
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 mbox

Patch

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);
     }