qemu-kvm.c must register notifier as well

Signed-off-by: Michael S. Tsirkin <m...@redhat.com>
---
 kvm-all.c  |    4 ++++
 qemu-kvm.c |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

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();
-- 
1.6.6.144.g5c3af

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to