aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2008-05-02 14:20:13 +0300
committerAvi Kivity <avi@qumranet.com>2008-05-02 14:20:13 +0300
commit6e38c369aad2eba2d5a33b019fd5b36b4e9aeba7 (patch)
tree08f817c41f992fb34e42e2a9d153f9c226a00d4d
parent08859282182f418a10f78804d1cedc09b76d440b (diff)
kvm: libkvm: remove kvm->physical_memorykvm-68rc1kvm-68
As guest memory can be discontiguous, kvm->physical_memory is meaningless. Luckily it is no longer used, so we can remove it. Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r--kvm/libkvm/kvm-common.h2
-rw-r--r--kvm/libkvm/libkvm.c4
2 files changed, 0 insertions, 6 deletions
diff --git a/kvm/libkvm/kvm-common.h b/kvm/libkvm/kvm-common.h
index b8a88ee00..a3549e2a8 100644
--- a/kvm/libkvm/kvm-common.h
+++ b/kvm/libkvm/kvm-common.h
@@ -39,8 +39,6 @@ struct kvm_context {
/// Callbacks that KVM uses to emulate various unvirtualizable functionality
struct kvm_callbacks *callbacks;
void *opaque;
- /// A pointer to the memory used as the physical memory for the guest
- void *physical_memory;
/// is dirty pages logging enabled for all regions or not
int dirty_pages_log_all;
/// do not create in-kernel irqchip if set
diff --git a/kvm/libkvm/libkvm.c b/kvm/libkvm/libkvm.c
index f4852b670..d1e95a401 100644
--- a/kvm/libkvm/libkvm.c
+++ b/kvm/libkvm/libkvm.c
@@ -341,7 +341,6 @@ static int kvm_create_default_phys_mem(kvm_context_t kvm,
if (r < 0)
return r;
- kvm->physical_memory = *vm_mem;
return 0;
}
@@ -549,9 +548,6 @@ int kvm_register_userspace_phys_mem(kvm_context_t kvm,
};
int r;
- if (!kvm->physical_memory)
- kvm->physical_memory = userspace_addr - phys_start;
-
memory.slot = get_free_slot(kvm);
r = ioctl(kvm->vm_fd, KVM_SET_USER_MEMORY_REGION, &memory);
if (r == -1) {