]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Jun 2014 19:16:30 +0000 (15:16 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Jun 2014 19:16:30 +0000 (15:16 -0400)
added patches:
mips-kvm-allocate-at-least-16kb-for-exception-handlers.patch

queue-3.14/mips-kvm-allocate-at-least-16kb-for-exception-handlers.patch [new file with mode: 0644]
queue-3.14/series

diff --git a/queue-3.14/mips-kvm-allocate-at-least-16kb-for-exception-handlers.patch b/queue-3.14/mips-kvm-allocate-at-least-16kb-for-exception-handlers.patch
new file mode 100644 (file)
index 0000000..5d5f860
--- /dev/null
@@ -0,0 +1,50 @@
+From 7006e2dfda9adfa40251093604db76d7e44263b3 Mon Sep 17 00:00:00 2001
+From: James Hogan <james.hogan@imgtec.com>
+Date: Thu, 29 May 2014 10:16:23 +0100
+Subject: MIPS: KVM: Allocate at least 16KB for exception handlers
+
+From: James Hogan <james.hogan@imgtec.com>
+
+commit 7006e2dfda9adfa40251093604db76d7e44263b3 upstream.
+
+Each MIPS KVM guest has its own copy of the KVM exception vector. This
+contains the TLB refill exception handler at offset 0x000, the general
+exception handler at offset 0x180, and interrupt exception handlers at
+offset 0x200 in case Cause_IV=1. A common handler is copied to offset
+0x2000 and offset 0x3000 is used for temporarily storing k1 during entry
+from guest.
+
+However the amount of memory allocated for this purpose is calculated as
+0x200 rounded up to the next page boundary, which is insufficient if 4KB
+pages are in use. This can lead to the common handler at offset 0x2000
+being overwritten and infinitely recursive exceptions on the next exit
+from the guest.
+
+Increase the minimum size from 0x200 to 0x4000 to cover the full use of
+the page.
+
+Signed-off-by: James Hogan <james.hogan@imgtec.com>
+Cc: Paolo Bonzini <pbonzini@redhat.com>
+Cc: Gleb Natapov <gleb@kernel.org>
+Cc: kvm@vger.kernel.org
+Cc: Ralf Baechle <ralf@linux-mips.org>
+Cc: linux-mips@linux-mips.org
+Cc: Sanjay Lal <sanjayl@kymasys.com>
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/mips/kvm/kvm_mips.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/mips/kvm/kvm_mips.c
++++ b/arch/mips/kvm/kvm_mips.c
+@@ -304,7 +304,7 @@ struct kvm_vcpu *kvm_arch_vcpu_create(st
+       if (cpu_has_veic || cpu_has_vint) {
+               size = 0x200 + VECTORSPACING * 64;
+       } else {
+-              size = 0x200;
++              size = 0x4000;
+       }
+       /* Save Linux EBASE */
index 98df0cd3f58ada9e367b365aa451ac7eba87d717..7be20742486f058791b1ffb622e30eeb539c0a35 100644 (file)
@@ -35,3 +35,4 @@ net-mlx4_core-preserve-pci_dev_data-after.patch
 net-mlx4_core-keep-only-one-driver-entry-release.patch
 kvm-lapic-sync-highest-isr-to-hardware-apic-on-eoi.patch
 arm-at91-fix-at91_sysirq_mask_rtc-for-sam9x5-socs.patch
+mips-kvm-allocate-at-least-16kb-for-exception-handlers.patch