aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kvm_host.h
diff options
context:
space:
mode:
authorTakuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp>2013-02-27 05:43:44 -0500
committerMarcelo Tosatti <mtosatti@redhat.com>2013-03-04 18:21:08 -0500
commit74d0727cb7aaaea48a6353209093be26abc8d160 (patch)
tree5fca51d427979429ff25fe8b4626726d6b54607d /include/linux/kvm_host.h
parent47ae31e257c548abdb199e0d26723139a9a967ba (diff)
KVM: set_memory_region: Make kvm_mr_change available to arch code
This will be used for cleaning up prepare/commit_memory_region() later. Signed-off-by: Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r--include/linux/kvm_host.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 84a994c7a5c5..8eaf61f7b02d 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -452,6 +452,24 @@ id_to_memslot(struct kvm_memslots *slots, int id)
452 return slot; 452 return slot;
453} 453}
454 454
455/*
456 * KVM_SET_USER_MEMORY_REGION ioctl allows the following operations:
457 * - create a new memory slot
458 * - delete an existing memory slot
459 * - modify an existing memory slot
460 * -- move it in the guest physical memory space
461 * -- just change its flags
462 *
463 * Since flags can be changed by some of these operations, the following
464 * differentiation is the best we can do for __kvm_set_memory_region():
465 */
466enum kvm_mr_change {
467 KVM_MR_CREATE,
468 KVM_MR_DELETE,
469 KVM_MR_MOVE,
470 KVM_MR_FLAGS_ONLY,
471};
472
455int kvm_set_memory_region(struct kvm *kvm, 473int kvm_set_memory_region(struct kvm *kvm,
456 struct kvm_userspace_memory_region *mem); 474 struct kvm_userspace_memory_region *mem);
457int __kvm_set_memory_region(struct kvm *kvm, 475int __kvm_set_memory_region(struct kvm *kvm,