Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlaf Hering <ohering@suse.de>2017-10-20 12:20:33 +0200
committerOlaf Hering <ohering@suse.de>2017-10-20 12:23:30 +0200
commit6f087bf06b3d0bddf1475b2a2c59fb82564e4640 (patch)
tree485d76e2fcbb35f6aa49ee86321c11e86ca295c0
parent32343838ca7273e407d3f45bc6205d43509bcb85 (diff)
x86/hyperv: Fix hypercalls with extended CPU ranges for TLB
flushing (fate#323887).
-rw-r--r--patches.suse/msft-hv-1473-x86-hyperv-Fix-hypercalls-with-extended-CPU-ranges-f.patch66
-rw-r--r--series.conf1
2 files changed, 67 insertions, 0 deletions
diff --git a/patches.suse/msft-hv-1473-x86-hyperv-Fix-hypercalls-with-extended-CPU-ranges-f.patch b/patches.suse/msft-hv-1473-x86-hyperv-Fix-hypercalls-with-extended-CPU-ranges-f.patch
new file mode 100644
index 0000000000..890e96008c
--- /dev/null
+++ b/patches.suse/msft-hv-1473-x86-hyperv-Fix-hypercalls-with-extended-CPU-ranges-f.patch
@@ -0,0 +1,66 @@
+From: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
+Date: Thu, 5 Oct 2017 10:34:29 -0300
+Patch-mainline: v4.14-rc5
+Subject: x86/hyperv: Fix hypercalls with extended CPU ranges for TLB flushing
+Git-commit: ab7ff471aa5db670197070760f022622793da7e5
+References: fate#323887
+
+Do not consider the fixed size of hv_vp_set when passing the variable
+header size to hv_do_rep_hypercall().
+
+The Hyper-V hypervisor specification states that for a hypercall with a
+variable header only the size of the variable portion should be supplied
+via the input control.
+
+For HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX/LIST_EX calls that means the
+fixed portion of hv_vp_set should not be considered.
+
+That fixes random failures of some applications that are unexpectedly
+killed with SIGBUS or SIGSEGV.
+
+Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
+Cc: Dexuan Cui <decui@microsoft.com>
+Cc: Haiyang Zhang <haiyangz@microsoft.com>
+Cc: Jork Loeser <Jork.Loeser@microsoft.com>
+Cc: Josh Poulson <jopoulso@microsoft.com>
+Cc: K. Y. Srinivasan <kys@microsoft.com>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Simon Xiao <sixiao@microsoft.com>
+Cc: Stephen Hemminger <sthemmin@microsoft.com>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
+Cc: devel@linuxdriverproject.org
+Fixes: 628f54cc6451 ("x86/hyper-v: Support extended CPU ranges for TLB flush hypercalls")
+Link: http://lkml.kernel.org/r/1507210469-29065-1-git-send-email-marcelo.cerri@canonical.com
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Acked-by: Olaf Hering <ohering@suse.de>
+---
+ arch/x86/hyperv/mmu.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/arch/x86/hyperv/mmu.c b/arch/x86/hyperv/mmu.c
+--- a/arch/x86/hyperv/mmu.c
++++ b/arch/x86/hyperv/mmu.c
+@@ -251,18 +251,18 @@ static void hyperv_flush_tlb_others_ex(const struct cpumask *cpus,
+ flush->flags |= HV_FLUSH_NON_GLOBAL_MAPPINGS_ONLY;
+ status = hv_do_rep_hypercall(
+ HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX,
+- 0, nr_bank + 2, flush, NULL);
++ 0, nr_bank, flush, NULL);
+ } else if (end &&
+ ((end - start)/HV_TLB_FLUSH_UNIT) > max_gvas) {
+ status = hv_do_rep_hypercall(
+ HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX,
+- 0, nr_bank + 2, flush, NULL);
++ 0, nr_bank, flush, NULL);
+ } else {
+ gva_n = fill_gva_list(flush->gva_list, nr_bank,
+ start, end);
+ status = hv_do_rep_hypercall(
+ HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST_EX,
+- gva_n, nr_bank + 2, flush, NULL);
++ gva_n, nr_bank, flush, NULL);
+ }
+
+ local_irq_restore(flags);
diff --git a/series.conf b/series.conf
index a6c1c5f324..f2bd53623d 100644
--- a/series.conf
+++ b/series.conf
@@ -1719,6 +1719,7 @@
patches.suse/msft-hv-1470-Drivers-hv-vmbus-Fix-bugs-in-rescind-handling.patch
patches.suse/msft-hv-1471-x86-hyperv-Clear-vCPU-banks-between-calls-to-avoid-f.patch
patches.suse/msft-hv-1472-x86-hyperv-Don-t-use-percpu-areas-for-pcpu_flush-pcp.patch
+ patches.suse/msft-hv-1473-x86-hyperv-Fix-hypercalls-with-extended-CPU-ranges-f.patch
patches.suse/suse-hv-guest-os-id.patch
patches.suse/suse-hv-kvp_on_msg.dbg.patch