KVM: Unmap kernel-allocated memory on slot destruction
authorIzik Eidus <izike@qumranet.com>
Thu, 25 Oct 2007 09:54:04 +0000 (11:54 +0200)
committerAvi Kivity <avi@qumranet.com>
Wed, 30 Jan 2008 15:52:55 +0000 (17:52 +0200)
commit80b14b5b32cb0a98234283daf9b5a6643e1a1ef3
tree1abf719d18e5bcbb6ba7fd5b517bb70ebb8b1776
parent5f43238d036fb30e73563e81e42d9c6f1de5551a
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>
drivers/kvm/kvm.h
drivers/kvm/kvm_main.c