Blob Blame History Raw
From: Petr Tesarik <ptesarik@suse.com>
Subject: kABI fixup after adding vcpu_idx to struct kvm_cpu
Patch-mainline: Never, kABI compatibility
References: bsc#1190973

patches.suse/KVM-remember-position-in-kvm-vcpus-array adds a
vcpu_idx field to struct kvm_vcpu, shifting all subsequent fields
by 4 bytes. Use the 4-byte hole after pre_pcpu instead.

Signed-off-by: Petr Tesarik <ptesarik@suse.com>

---
 include/linux/kvm_host.h |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -223,13 +223,15 @@ struct kvm_vcpu {
 #endif
 	int cpu;
 	int vcpu_id; /* id given by userspace at creation */
-	int vcpu_idx; /* index in kvm->vcpus array */
 	int srcu_idx;
 	int mode;
 	unsigned long requests;
 	unsigned long guest_debug;
 
 	int pre_pcpu;
+#ifndef __GENKSYMS__
+	int vcpu_idx; /* index in kvm->vcpus array */
+#endif
 	struct list_head blocked_vcpu_list;
 
 	struct mutex mutex;