All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix compilation with --disable-kvm
@ 2008-10-02 14:21 Glauber Costa
  2008-10-02 14:31 ` Avi Kivity
  0 siblings, 1 reply; 4+ messages in thread
From: Glauber Costa @ 2008-10-02 14:21 UTC (permalink / raw)
  To: kvm; +Cc: avi, aliguori

Currently, kvm is failing to build with --disable-kvm.
this patch fixes the issue.

Signed-off-by: Glauber Costa <glommer@redhat.com>
---
 qemu/hw/acpi.c       |    6 +++++-
 qemu/hw/cirrus_vga.c |    7 +++----
 qemu/qemu-kvm.h      |    2 ++
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/qemu/hw/acpi.c b/qemu/hw/acpi.c
index 05f5dc0..7a7a534 100644
--- a/qemu/hw/acpi.c
+++ b/qemu/hw/acpi.c
@@ -726,7 +726,11 @@ void qemu_system_cpu_hot_add(int cpu, int state)
 {
     CPUState *env;
 
-    if ((state) && (!qemu_kvm_cpu_env(cpu))) {
+    if (state
+#ifdef USE_KVM
+        && (!qemu_kvm_cpu_env(cpu))
+#endif
+    ) {
         env = pc_new_cpu(cpu, model, 1);
         if (!env) {
             fprintf(stderr, "cpu %d creation failed\n", cpu);
diff --git a/qemu/hw/cirrus_vga.c b/qemu/hw/cirrus_vga.c
index 4f3aef9..dac0731 100644
--- a/qemu/hw/cirrus_vga.c
+++ b/qemu/hw/cirrus_vga.c
@@ -2677,14 +2677,13 @@ static void kvm_update_vga_alias(CirrusVGAState *s, int ok, int bank)
 	if (!s->aliases_enabled
 	    || base != s->aliased_bank_base[bank]
 	    || limit != s->aliased_bank_limit[bank]) {
-	    kvm_create_memory_alias(kvm_context,
-				    0xa0000 + bank * 0x8000,
-				    limit, base);
+	    kvm_qemu_create_memory_alias(0xa0000 + bank * 0x8000,
+                                     limit, base);
 	    s->aliased_bank_base[bank] = base;
 	    s->aliased_bank_limit[bank] = limit;
 	}
     } else {
-	kvm_destroy_memory_alias(kvm_context, 0xa0000 + bank * 0x8000);
+	kvm_qemu_destroy_memory_alias(0xa0000 + bank * 0x8000);
     }
 }
 
diff --git a/qemu/qemu-kvm.h b/qemu/qemu-kvm.h
index fd9d5d1..330b2dc 100644
--- a/qemu/qemu-kvm.h
+++ b/qemu/qemu-kvm.h
@@ -107,6 +107,8 @@ extern kvm_context_t kvm_context;
 #define qemu_kvm_irqchip_in_kernel() (0)
 #define qemu_kvm_pit_in_kernel() (0)
 #define qemu_kvm_has_sync_mmu() (0)
+#define kvm_load_registers(env) do {} while(0)
+#define kvm_save_registers(env) do {} while(0)
 #endif
 
 void kvm_mutex_unlock(void);
-- 
1.5.5.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH 0/2] --disable-kvm currently not working
@ 2008-09-30 21:47 Glauber Costa
  2008-09-30 21:47 ` [PATCH] fix compilation with --disable-kvm Glauber Costa
  0 siblings, 1 reply; 4+ messages in thread
From: Glauber Costa @ 2008-09-30 21:47 UTC (permalink / raw)
  To: kvm; +Cc: avi, aliguori

Current compilations with --disable-kvm are broken.
I'm spliting the fix in two patches for clearity. The first one
does some code movement in qemu-kvm-x86.c, while the other just
do fixes to the current code base.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-10-02 15:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-02 14:21 [PATCH] fix compilation with --disable-kvm Glauber Costa
2008-10-02 14:31 ` Avi Kivity
2008-10-02 15:11   ` Glauber Costa
  -- strict thread matches above, loose matches on Subject: below --
2008-09-30 21:47 [PATCH 0/2] --disable-kvm currently not working Glauber Costa
2008-09-30 21:47 ` [PATCH] fix compilation with --disable-kvm Glauber Costa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.