Patch-mainline: Never, kABI fix
References: git-fixes
From: Juergen Gross <jgross@suse.com>
Date: Thu, 1 Jul 2021 17:41:00 +0200
Subject: [PATCH] kABI: Fix kABI after fixing vcpu-id indexed arrays
Fix kABI after fixing the array sizes of arrays indexed by vcpu-id.
Fortunately the size today being KVM_MAX_VCPU_ID (with an odd value
of that macro) means, that there is always enough padding space in the
arrays for the correct value KVM_MAX_VCPU_ID+1.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
arch/x86/kvm/ioapic.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/x86/kvm/ioapic.h b/arch/x86/kvm/ioapic.h
index 660401700075..11e4065e1617 100644
--- a/arch/x86/kvm/ioapic.h
+++ b/arch/x86/kvm/ioapic.h
@@ -43,13 +43,21 @@ struct kvm_vcpu;
struct dest_map {
/* vcpu bitmap where IRQ has been sent */
+#ifdef __GENKSYMS__
+ DECLARE_BITMAP(map, KVM_MAX_VCPU_ID);
+#else
DECLARE_BITMAP(map, KVM_MAX_VCPU_ID + 1);
+#endif
/*
* Vector sent to a given vcpu, only valid when
* the vcpu's bit in map is set
*/
+#ifdef __GENKSYMS__
+ u8 vectors[KVM_MAX_VCPU_ID];
+#else
u8 vectors[KVM_MAX_VCPU_ID + 1];
+#endif
};
--
2.26.2