diff options
author | Izik Eidus <izike@qumranet.com> | 2007-10-25 05:54:04 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 10:52:55 -0500 |
commit | 80b14b5b32cb0a98234283daf9b5a6643e1a1ef3 (patch) | |
tree | 1abf719d18e5bcbb6ba7fd5b517bb70ebb8b1776 /drivers/kvm/kvm.h | |
parent | 5f43238d036fb30e73563e81e42d9c6f1de5551a (diff) |
KVM: Unmap kernel-allocated memory on slot destruction
kvm_vm_ioctl_set_memory_region() is able to remove memory in addition to
adding it. Therefore when using kernel swapping support for old userspaces,
we need to munmap the memory if the user request to remove it
Signed-off-by: Izik Eidus <izike@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm.h')
-rw-r--r-- | drivers/kvm/kvm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index f7181a407be1..12de42c789a2 100644 --- a/drivers/kvm/kvm.h +++ b/drivers/kvm/kvm.h | |||
@@ -353,6 +353,7 @@ struct kvm_memory_slot { | |||
353 | unsigned long *rmap; | 353 | unsigned long *rmap; |
354 | unsigned long *dirty_bitmap; | 354 | unsigned long *dirty_bitmap; |
355 | unsigned long userspace_addr; | 355 | unsigned long userspace_addr; |
356 | int user_alloc; | ||
356 | }; | 357 | }; |
357 | 358 | ||
358 | struct kvm { | 359 | struct kvm { |