diff options
Diffstat (limited to 'vmmon.patch')
-rw-r--r-- | vmmon.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/vmmon.patch b/vmmon.patch index 1acbc54c0ac4..abf692ba1c01 100644 --- a/vmmon.patch +++ b/vmmon.patch @@ -319,3 +319,61 @@ index ec6856a..4a7afb1 100644 if (res == sizeof value) { res = MX_WAITNORMAL; +From 1c4c297ddd28f430037efc972b77639f8bdc3ff1 Mon Sep 17 00:00:00 2001 +From: Michal Kubecek <mkubecek@suse.cz> +Date: Sat, 8 Aug 2020 22:53:50 +0200 +Subject: [PATCH] vmmon: handle change of vmstat slab counters to bytes + +Mainline commit d42f3245c7e2 ("mm: memcg: convert vmstat slab counters to +bytes") in kernel 5.9-rc1 changed vmstat accounting of slab to byte +counters. Unfortunately there doesn't seem to be any obvious way to check +for this change except version check. +--- + vmmon-only/linux/hostif.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c +index 9b179a8..107e11f 100644 +--- a/vmmon-only/linux/hostif.c ++++ b/vmmon-only/linux/hostif.c +@@ -1548,8 +1548,11 @@ HostIF_EstimateLockedPageLimit(const VMDriver* vm, // IN + #else + lockedPages += global_page_state(NR_PAGETABLE); + #endif ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0) ++ /* NR_SLAB_* converted to byte counters in 5.9 */ ++ lockedPages += global_node_page_state_pages(NR_SLAB_UNRECLAIMABLE_B); ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) + /* NR_SLAB_* moved from zone to node in 4.13. */ +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) + lockedPages += global_node_page_state(NR_SLAB_UNRECLAIMABLE); + #else + lockedPages += global_page_state(NR_SLAB_UNRECLAIMABLE); +From 505c6b8967d2b14223e8ba482acffe020a93782f Mon Sep 17 00:00:00 2001 +From: Michal Kubecek <mkubecek@suse.cz> +Date: Thu, 20 Aug 2020 10:39:56 +0200 +Subject: [PATCH] vmmon: include <asm/irq_vectors.h> explicitly + +After mainline commit 13c01139b171 ("x86/headers: Remove APIC headers from +<asm/smp.h>") in 5.9-rc1, APIC headers are no longer included via +<asm/smp.h> so that linux/hostif.c will use incorrect fallback definitions +of SPURIOUS_APIC_VECTOR, POSTED_INTR_VECTOR and ERROR_APIC_VECTOR even if +built against kernel where these are defined. + +Include <asm/irq_vectors.h> in linux/hostif.c explicitly to avoid that. +--- + vmmon-only/linux/hostif.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c +index 107e11f..a42a034 100644 +--- a/vmmon-only/linux/hostif.c ++++ b/vmmon-only/linux/hostif.c +@@ -49,6 +49,7 @@ + #include <asm/page.h> + #include <asm/tlbflush.h> + #include <asm/uaccess.h> ++#include <asm/irq_vectors.h> + #include <linux/capability.h> + #include <linux/kthread.h> + #include <linux/wait.h> |