aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2019-03-28 12:22:31 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2019-03-28 12:30:11 -0400
commite2788c4a41cb5fa68096f5a58bccacec1a700295 (patch)
treed345144ddc4a893cc42134c1986e82173a7be008
parent919f6cd8bb2fe7151f8aecebc3b3d1ca2567396e (diff)
Documentation: kvm: clarify KVM_SET_USER_MEMORY_REGION
The documentation does not mention how to delete a slot, add the information. Reported-by: Nathaniel McCallum <npmccallum@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--Documentation/virtual/kvm/api.txt18
1 files changed, 10 insertions, 8 deletions
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index f39969d0121e..67068c47c591 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -1114,14 +1114,12 @@ struct kvm_userspace_memory_region {
1114#define KVM_MEM_LOG_DIRTY_PAGES (1UL << 0) 1114#define KVM_MEM_LOG_DIRTY_PAGES (1UL << 0)
1115#define KVM_MEM_READONLY (1UL << 1) 1115#define KVM_MEM_READONLY (1UL << 1)
1116 1116
1117This ioctl allows the user to create or modify a guest physical memory 1117This ioctl allows the user to create, modify or delete a guest physical
1118slot. When changing an existing slot, it may be moved in the guest 1118memory slot. Bits 0-15 of "slot" specify the slot id and this value
1119physical memory space, or its flags may be modified. It may not be 1119should be less than the maximum number of user memory slots supported per
1120resized. Slots may not overlap in guest physical address space. 1120VM. The maximum allowed slots can be queried using KVM_CAP_NR_MEMSLOTS,
1121Bits 0-15 of "slot" specifies the slot id and this value should be 1121if this capability is supported by the architecture. Slots may not
1122less than the maximum number of user memory slots supported per VM. 1122overlap in guest physical address space.
1123The maximum allowed slots can be queried using KVM_CAP_NR_MEMSLOTS,
1124if this capability is supported by the architecture.
1125 1123
1126If KVM_CAP_MULTI_ADDRESS_SPACE is available, bits 16-31 of "slot" 1124If KVM_CAP_MULTI_ADDRESS_SPACE is available, bits 16-31 of "slot"
1127specifies the address space which is being modified. They must be 1125specifies the address space which is being modified. They must be
@@ -1130,6 +1128,10 @@ KVM_CAP_MULTI_ADDRESS_SPACE capability. Slots in separate address spaces
1130are unrelated; the restriction on overlapping slots only applies within 1128are unrelated; the restriction on overlapping slots only applies within
1131each address space. 1129each address space.
1132 1130
1131Deleting a slot is done by passing zero for memory_size. When changing
1132an existing slot, it may be moved in the guest physical memory space,
1133or its flags may be modified, but it may not be resized.
1134
1133Memory for the region is taken starting at the address denoted by the 1135Memory for the region is taken starting at the address denoted by the
1134field userspace_addr, which must point at user addressable memory for 1136field userspace_addr, which must point at user addressable memory for
1135the entire memory slot size. Any object may back this memory, including 1137the entire memory slot size. Any object may back this memory, including