@@ -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[] =
@@ -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();