summaryrefslogtreecommitdiff
path: root/libkvm
diff options
context:
space:
mode:
authorGlauber Costa <glommer@redhat.com>2008-09-10 16:21:01 -0300
committerAvi Kivity <avi@qumranet.com>2008-09-11 11:56:02 +0300
commitb93fb98919bbcf80fc0f8d6f3d4f829a3bf34038 (patch)
tree93afb4d15d015e223bef7bc4b1b03780f9b26946 /libkvm
parent857a3c34714bd30e57b252889e2513352528a4bb (diff)
kvm: libkvm: get rid of kvm_create_userspace_phys_mem
It is just kvm_create_phys_mem() right now. Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'libkvm')
-rw-r--r--libkvm/libkvm.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c
index c1c295de..af69a0df 100644
--- a/libkvm/libkvm.c
+++ b/libkvm/libkvm.c
@@ -386,8 +386,8 @@ int kvm_create(kvm_context_t kvm, unsigned long phys_mem_bytes, void **vm_mem)
}
-void *kvm_create_userspace_phys_mem(kvm_context_t kvm, unsigned long phys_start,
- unsigned long len, int log, int writable)
+void *kvm_create_phys_mem(kvm_context_t kvm, unsigned long phys_start,
+ unsigned long len, int log, int writable)
{
int r;
int prot = PROT_READ;
@@ -408,7 +408,7 @@ void *kvm_create_userspace_phys_mem(kvm_context_t kvm, unsigned long phys_start,
MAP_FIXED | MAP_SHARED | MAP_ANONYMOUS, -1, 0);
#endif
if (ptr == MAP_FAILED) {
- fprintf(stderr, "create_userspace_phys_mem: %s", strerror(errno));
+ fprintf(stderr, "%s: %s", __func__, strerror(errno));
return 0;
}
@@ -418,7 +418,7 @@ void *kvm_create_userspace_phys_mem(kvm_context_t kvm, unsigned long phys_start,
memory.slot = get_free_slot(kvm);
r = ioctl(kvm->vm_fd, KVM_SET_USER_MEMORY_REGION, &memory);
if (r == -1) {
- fprintf(stderr, "create_userspace_phys_mem: %s", strerror(errno));
+ fprintf(stderr, "%s: %s", __func__, strerror(errno));
return 0;
}
register_slot(memory.slot, memory.guest_phys_addr, memory.memory_size,
@@ -453,13 +453,6 @@ void kvm_destroy_userspace_phys_mem(kvm_context_t kvm,
free_slot(memory.slot);
}
-void *kvm_create_phys_mem(kvm_context_t kvm, unsigned long phys_start,
- unsigned long len, int log, int writable)
-{
- return kvm_create_userspace_phys_mem(kvm, phys_start, len,
- log, writable);
-}
-
int kvm_is_intersecting_mem(kvm_context_t kvm, unsigned long phys_start)
{
return get_intersecting_slot(phys_start) != -1;