]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
KVM: Remove kernel-allocated memory regions
authorAvi Kivity <avi@redhat.com>
Mon, 21 Jun 2010 08:48:05 +0000 (11:48 +0300)
committerAvi Kivity <avi@redhat.com>
Sun, 1 Aug 2010 07:47:01 +0000 (10:47 +0300)
Equivalent (and better) functionality is provided by user-allocated memory
regions.

Signed-off-by: Avi Kivity <avi@redhat.com>
Documentation/feature-removal-schedule.txt
Documentation/kvm/api.txt
arch/x86/kvm/x86.c

index ad1e90dd2780c286695c2fcacc3f01e0b9c1ff75..123ec0e237385c10277e260d1bab2d1e9d82d278 100644 (file)
@@ -548,16 +548,6 @@ Who:       John Stultz <johnstul@us.ibm.com>
 
 ----------------------------
 
-What:  KVM kernel-allocated memory slots
-When:  July 2010
-Why:   Since 2.6.25, kvm supports user-allocated memory slots, which are
-       much more flexible than kernel-allocated slots.  All current userspace
-       supports the newer interface and this code can be removed with no
-       impact.
-Who:   Avi Kivity <avi@redhat.com>
-
-----------------------------
-
 What:  KVM paravirt mmu host support
 When:  January 2011
 Why:   The paravirt mmu host support is slower than non-paravirt mmu, both
index 7e415943a11e54cd19c42f8d9d2f8ec69bdbeec3..d9b00f15fbe660b096bad185d88433c47376e4a7 100644 (file)
@@ -160,29 +160,7 @@ Type: vm ioctl
 Parameters: struct kvm_memory_region (in)
 Returns: 0 on success, -1 on error
 
-struct kvm_memory_region {
-       __u32 slot;
-       __u32 flags;
-       __u64 guest_phys_addr;
-       __u64 memory_size; /* bytes */
-};
-
-/* for kvm_memory_region::flags */
-#define KVM_MEM_LOG_DIRTY_PAGES  1UL
-
-This ioctl allows the user to create or modify a guest physical memory
-slot.  When changing an existing slot, it may be moved in the guest
-physical memory space, or its flags may be modified.  It may not be
-resized.  Slots may not overlap.
-
-The flags field supports just one flag, KVM_MEM_LOG_DIRTY_PAGES, which
-instructs kvm to keep track of writes to memory within the slot.  See
-the KVM_GET_DIRTY_LOG ioctl.
-
-It is recommended to use the KVM_SET_USER_MEMORY_REGION ioctl instead
-of this API, if available.  This newer API allows placing guest memory
-at specified locations in the host address space, yielding better
-control and easy access.
+This ioctl is obsolete and has been removed.
 
 4.6 KVM_CREATE_VCPU
 
index 62596d373a49a53c5f5c79247679619b7eb2b90b..9be6e4e5e8eefc9a138f3ef77fb084da7f809457 100644 (file)
@@ -2967,22 +2967,6 @@ long kvm_arch_vm_ioctl(struct file *filp,
                        goto out;
                break;
        }
-       case KVM_SET_MEMORY_REGION: {
-               struct kvm_memory_region kvm_mem;
-               struct kvm_userspace_memory_region kvm_userspace_mem;
-
-               r = -EFAULT;
-               if (copy_from_user(&kvm_mem, argp, sizeof kvm_mem))
-                       goto out;
-               kvm_userspace_mem.slot = kvm_mem.slot;
-               kvm_userspace_mem.flags = kvm_mem.flags;
-               kvm_userspace_mem.guest_phys_addr = kvm_mem.guest_phys_addr;
-               kvm_userspace_mem.memory_size = kvm_mem.memory_size;
-               r = kvm_vm_ioctl_set_memory_region(kvm, &kvm_userspace_mem, 0);
-               if (r)
-                       goto out;
-               break;
-       }
        case KVM_SET_NR_MMU_PAGES:
                r = kvm_vm_ioctl_set_nr_mmu_pages(kvm, arg);
                if (r)