Blob Blame History Raw
From: Joerg Roedel <jroedel@suse.de>
Date: Mon, 28 Oct 2019 10:54:25 +0100
Subject: [PATCH] kABI Fix for IFU patches
Patch-mainline: Never, kABI Fix only
References: bsc#1117665, CVE-2018-12207

Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
 arch/x86/include/asm/kvm_host.h | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 245ffa94971a..821dcdaca123 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -276,7 +276,6 @@ struct kvm_rmap_head {
 struct kvm_mmu_page {
 	struct list_head link;
 	struct hlist_node hash_link;
-	struct list_head lpage_disallowed_link;
 
 	/*
 	 * The following two entries are used to key the shadow page in the
@@ -295,7 +294,6 @@ struct kvm_mmu_page {
 
 	/* The page is obsolete if mmu_valid_gen != kvm->arch.mmu_valid_gen.  */
 	unsigned long mmu_valid_gen;
-	bool lpage_disallowed; /* Can't be replaced by an equiv large page */
 
 	DECLARE_BITMAP(unsync_child_bitmap, 512);
 
@@ -309,6 +307,11 @@ struct kvm_mmu_page {
 
 	/* Number of writes since the last time traversal visited this page.  */
 	atomic_t write_flooding_count;
+
+#ifndef __GENKSYMS__
+	struct list_head lpage_disallowed_link;
+	bool lpage_disallowed; /* Can't be replaced by an equiv large page */
+#endif
 };
 
 struct kvm_pio_request {
@@ -797,7 +800,6 @@ struct kvm_arch {
 	 */
 	struct list_head active_mmu_pages;
 	struct list_head zapped_obsolete_pages;
-	struct list_head lpage_disallowed_mmu_pages;
 	struct kvm_page_track_notifier_node mmu_sp_tracker;
 	struct kvm_page_track_notifier_head track_notifier_head;
 
@@ -876,7 +878,10 @@ struct kvm_arch {
 
 	struct kvm_sev_info sev_info;
 
+#ifndef __GENKSYMS__
+	struct list_head lpage_disallowed_mmu_pages;
 	struct task_struct *nx_lpage_recovery_thread;
+#endif
 };
 
 struct kvm_vm_stat {
@@ -890,8 +895,10 @@ struct kvm_vm_stat {
 	ulong mmu_unsync;
 	ulong remote_tlb_flush;
 	ulong lpages;
-	ulong nx_lpage_splits;
 	ulong max_mmu_page_hash_collisions;
+#ifndef __GENKSYMS__
+	ulong nx_lpage_splits;
+#endif
 };
 
 struct kvm_vcpu_stat {
-- 
2.16.3