summaryrefslogtreecommitdiffstats
path: root/include/linux/kvm_host.h
diff options
context:
space:
mode:
authorXiao Guangrong2012-08-21 04:58:45 +0200
committerAvi Kivity2012-08-22 14:08:51 +0200
commit67b29204c8c9ecb4b2799a06ab646eeb363a0fe6 (patch)
tree4340306cbdfa28169737010531590735f63b6b4f /include/linux/kvm_host.h
parentKVM: fix missing check for memslot flags (diff)
downloadkernel-qcow2-linux-67b29204c8c9ecb4b2799a06ab646eeb363a0fe6.tar.gz
kernel-qcow2-linux-67b29204c8c9ecb4b2799a06ab646eeb363a0fe6.tar.xz
kernel-qcow2-linux-67b29204c8c9ecb4b2799a06ab646eeb363a0fe6.zip
KVM: hide KVM_MEMSLOT_INVALID from userspace
Quote Avi's comment: | KVM_MEMSLOT_INVALID is actually an internal symbol, not used by | userspace. Please move it to kvm_host.h. Also, we divide the memlsot->flags into two parts, the lower 16 bits are visible for userspace, the higher 16 bits are internally used in kvm Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r--include/linux/kvm_host.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index d2b897ee3ac4..d4bd4d41e355 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -36,6 +36,13 @@
#endif
/*
+ * The bit 16 ~ bit 31 of kvm_memory_region::flags are internally used
+ * in kvm, other bits are visible for userspace which are defined in
+ * include/linux/kvm_h.
+ */
+#define KVM_MEMSLOT_INVALID (1UL << 16)
+
+/*
* If we support unaligned MMIO, at most one fragment will be split into two:
*/
#ifdef KVM_UNALIGNED_MMIO