From 6e38c369aad2eba2d5a33b019fd5b36b4e9aeba7 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Fri, 2 May 2008 14:20:13 +0300 Subject: kvm: libkvm: remove kvm->physical_memory 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 --- kvm/libkvm/kvm-common.h | 2 -- kvm/libkvm/libkvm.c | 4 ---- 2 files changed, 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) { -- cgit v1.2.3