summary refs log tree commit diff stats
path: root/linux-headers/asm-x86/kvm.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-05-25 14:27:54 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2018-06-01 15:14:31 +0200
commit65a6d8dd3f322e91efa320f2811bec83dde36b6b (patch)
tree0ce07583f33c185f008bd5afeb3c3083c066259c /linux-headers/asm-x86/kvm.h
parent2af1acadc22e86b9fff7b2cd73ea9c779ba1a065 (diff)
downloadfocaccia-qemu-65a6d8dd3f322e91efa320f2811bec83dde36b6b.tar.gz
focaccia-qemu-65a6d8dd3f322e91efa320f2811bec83dde36b6b.zip
Update Linux headers to 4.17-rc6
Update our copy of the Linux headers to upstream 4.17-rc6
(kernel commit 771c577c23bac90597c68).

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20180525132755.21839-6-peter.maydell@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'linux-headers/asm-x86/kvm.h')
-rw-r--r--linux-headers/asm-x86/kvm.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/linux-headers/asm-x86/kvm.h b/linux-headers/asm-x86/kvm.h
index f3a960488e..c535c2fdea 100644
--- a/linux-headers/asm-x86/kvm.h
+++ b/linux-headers/asm-x86/kvm.h
@@ -354,8 +354,25 @@ struct kvm_xcrs {
 	__u64 padding[16];
 };
 
-/* definition of registers in kvm_run */
+#define KVM_SYNC_X86_REGS      (1UL << 0)
+#define KVM_SYNC_X86_SREGS     (1UL << 1)
+#define KVM_SYNC_X86_EVENTS    (1UL << 2)
+
+#define KVM_SYNC_X86_VALID_FIELDS \
+	(KVM_SYNC_X86_REGS| \
+	 KVM_SYNC_X86_SREGS| \
+	 KVM_SYNC_X86_EVENTS)
+
+/* kvm_sync_regs struct included by kvm_run struct */
 struct kvm_sync_regs {
+	/* Members of this structure are potentially malicious.
+	 * Care must be taken by code reading, esp. interpreting,
+	 * data fields from them inside KVM to prevent TOCTOU and
+	 * double-fetch types of vulnerabilities.
+	 */
+	struct kvm_regs regs;
+	struct kvm_sregs sregs;
+	struct kvm_vcpu_events events;
 };
 
 #define KVM_X86_QUIRK_LINT0_REENABLED	(1 << 0)