diff mbox

[04/20] qemu-kvm: fixup after merging memory notifiers

Message ID 20100204152742.GE8461@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Michael S. Tsirkin Feb. 4, 2010, 3:27 p.m. UTC
None
diff mbox

Patch

diff --git a/kvm-all.c b/kvm-all.c
index f31585e..51273e4 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -536,6 +536,8 @@  void kvm_set_phys_mem(target_phys_addr_t start_addr,
     }
 }
 
+#endif
+
 static void kvm_client_set_memory(struct CPUPhysMemoryClient *client,
 				  target_phys_addr_t start_addr,
 				  ram_addr_t size,
@@ -563,6 +565,8 @@  static CPUPhysMemoryClient kvm_cpu_phys_memory_client = {
 	.migration_log = kvm_client_migration_log,
 };
 
+#ifdef KVM_UPSTREAM
+
 int kvm_init(int smp_cpus)
 {
     static const char upgrade_note[] =
diff --git a/qemu-kvm.c b/qemu-kvm.c
index a305907..f7b2dda 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -406,6 +406,7 @@  int kvm_init(int smp_cpus)
         for (i = gsi_count; i < gsi_bits; i++)
             set_gsi(kvm_context, i);
     }
+    cpu_register_phys_memory_client(&kvm_cpu_phys_memory_client);
 
     pthread_mutex_lock(&qemu_mutex);
     return kvm_create_context();