@@ -886,7 +886,6 @@ int kvm_has_vcpu_events(void)
return kvm_state->vcpu_events;
}
-#ifdef KVM_UPSTREAM
void kvm_setup_guest_memory(void *start, size_t size)
{
if (!kvm_has_sync_mmu()) {
@@ -905,8 +904,6 @@ void kvm_setup_guest_memory(void *start, size_t size)
}
}
-#endif /* KVM_UPSTREAM */
-
#ifdef KVM_CAP_SET_GUEST_DEBUG
#ifdef KVM_UPSTREAM
@@ -54,10 +54,9 @@ int kvm_has_vcpu_events(void);
int kvm_put_vcpu_events(CPUState *env);
int kvm_get_vcpu_events(CPUState *env);
-#ifdef KVM_UPSTREAM
-
void kvm_setup_guest_memory(void *start, size_t size);
+#ifdef KVM_UPSTREAM
int kvm_coalesce_mmio_region(target_phys_addr_t start, ram_addr_t size);
int kvm_uncoalesce_mmio_region(target_phys_addr_t start, ram_addr_t size);
@@ -2321,21 +2321,6 @@ void kvm_set_phys_mem(target_phys_addr_t start_addr, ram_addr_t size,
return;
}
-int kvm_setup_guest_memory(void *area, unsigned long size)
-{
- int ret = 0;
-
-#ifdef MADV_DONTFORK
- if (kvm_enabled() && !kvm_has_sync_mmu())
- ret = madvise(area, size, MADV_DONTFORK);
-#endif
-
- if (ret)
- perror("madvise");
-
- return ret;
-}
-
#ifdef KVM_CAP_SET_GUEST_DEBUG
struct kvm_set_guest_debug_data {
@@ -923,7 +923,6 @@ void kvm_cpu_destroy_phys_mem(target_phys_addr_t start_addr,
unsigned long size);
void kvm_qemu_log_memory(target_phys_addr_t start, target_phys_addr_t size,
int log);
-int kvm_setup_guest_memory(void *area, unsigned long size);
int kvm_qemu_create_memory_alias(uint64_t phys_start, uint64_t len,
uint64_t target_phys);
int kvm_qemu_destroy_memory_alias(uint64_t phys_start);