From: Greg Kroah-Hartman Date: Tue, 4 Feb 2014 17:54:04 +0000 (-0800) Subject: 3.12-stable patches X-Git-Tag: v3.4.79~1^2~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e5d19f8bcc147bbd9ec8e108698c4ddc6c3785e9;p=thirdparty%2Fkernel%2Fstable-queue.git 3.12-stable patches added patches: kvm-ppc-book3s-hv-use-xics_wake_cpu-only-when-defined.patch kvm-ppc-e500-fix-bad-address-type-in-deliver_tlb_misss.patch parisc-fix-cache-flushing.patch --- diff --git a/queue-3.12/kvm-ppc-book3s-hv-use-xics_wake_cpu-only-when-defined.patch b/queue-3.12/kvm-ppc-book3s-hv-use-xics_wake_cpu-only-when-defined.patch new file mode 100644 index 00000000000..c3b584f7464 --- /dev/null +++ b/queue-3.12/kvm-ppc-book3s-hv-use-xics_wake_cpu-only-when-defined.patch @@ -0,0 +1,44 @@ +From 48eaef0518a565d3852e301c860e1af6a6db5a84 Mon Sep 17 00:00:00 2001 +From: Andreas Schwab +Date: Mon, 30 Dec 2013 15:36:56 +0100 +Subject: KVM: PPC: Book3S HV: use xics_wake_cpu only when defined + +From: Andreas Schwab + +commit 48eaef0518a565d3852e301c860e1af6a6db5a84 upstream. + +Signed-off-by: Andreas Schwab +Signed-off-by: Alexander Graf +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/kvm/book3s_hv.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +--- a/arch/powerpc/kvm/book3s_hv.c ++++ b/arch/powerpc/kvm/book3s_hv.c +@@ -82,10 +82,13 @@ void kvmppc_fast_vcpu_kick(struct kvm_vc + + /* CPU points to the first thread of the core */ + if (cpu != me && cpu >= 0 && cpu < nr_cpu_ids) { ++#ifdef CONFIG_KVM_XICS + int real_cpu = cpu + vcpu->arch.ptid; + if (paca[real_cpu].kvm_hstate.xics_phys) + xics_wake_cpu(real_cpu); +- else if (cpu_online(cpu)) ++ else ++#endif ++ if (cpu_online(cpu)) + smp_send_reschedule(cpu); + } + put_cpu(); +@@ -1089,7 +1092,9 @@ static void kvmppc_start_thread(struct k + smp_wmb(); + #if defined(CONFIG_PPC_ICP_NATIVE) && defined(CONFIG_SMP) + if (vcpu->arch.ptid) { ++#ifdef CONFIG_KVM_XICS + xics_wake_cpu(cpu); ++#endif + ++vc->n_woken; + } + #endif diff --git a/queue-3.12/kvm-ppc-e500-fix-bad-address-type-in-deliver_tlb_misss.patch b/queue-3.12/kvm-ppc-e500-fix-bad-address-type-in-deliver_tlb_misss.patch new file mode 100644 index 00000000000..f199c1abda3 --- /dev/null +++ b/queue-3.12/kvm-ppc-e500-fix-bad-address-type-in-deliver_tlb_misss.patch @@ -0,0 +1,30 @@ +From 70713fe315ed14cd1bb07d1a7f33e973d136ae3d Mon Sep 17 00:00:00 2001 +From: Mihai Caraman +Date: Thu, 9 Jan 2014 17:01:05 +0200 +Subject: KVM: PPC: e500: Fix bad address type in deliver_tlb_misss() + +From: Mihai Caraman + +commit 70713fe315ed14cd1bb07d1a7f33e973d136ae3d upstream. + +Use gva_t instead of unsigned int for eaddr in deliver_tlb_miss(). + +Signed-off-by: Mihai Caraman +Signed-off-by: Alexander Graf +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/kvm/e500_mmu.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/powerpc/kvm/e500_mmu.c ++++ b/arch/powerpc/kvm/e500_mmu.c +@@ -127,7 +127,7 @@ static int kvmppc_e500_tlb_index(struct + } + + static inline void kvmppc_e500_deliver_tlb_miss(struct kvm_vcpu *vcpu, +- unsigned int eaddr, int as) ++ gva_t eaddr, int as) + { + struct kvmppc_vcpu_e500 *vcpu_e500 = to_e500(vcpu); + unsigned int victim, tsized; diff --git a/queue-3.12/parisc-fix-cache-flushing.patch b/queue-3.12/parisc-fix-cache-flushing.patch new file mode 100644 index 00000000000..50ffb58415c --- /dev/null +++ b/queue-3.12/parisc-fix-cache-flushing.patch @@ -0,0 +1,81 @@ +From 57737c49dd72c96cfbcd4f66559f3ffc399aeb4f Mon Sep 17 00:00:00 2001 +From: Helge Deller +Date: Fri, 31 Jan 2014 21:33:17 +0100 +Subject: parisc: fix cache-flushing + +From: Helge Deller + +commit 57737c49dd72c96cfbcd4f66559f3ffc399aeb4f upstream. + +This commit: +f8dae00684d678afa13041ef170cecfd1297ed40: parisc: Ensure full cache coherency for kmap/kunmap +caused negative caching side-effects, e.g. hanging processes with expect and +too many inequivalent alias messages from flush_dcache_page() on Debian 5 systems. + +This patch now partly reverts it and has been in production use on our debian buildd +makeservers since a week without any major problems. + +Signed-off-by: Helge Deller +Signed-off-by: John David Anglin +Signed-off-by: Helge Deller +Signed-off-by: Greg Kroah-Hartman + +--- + arch/parisc/include/asm/cacheflush.h | 2 -- + arch/parisc/include/asm/page.h | 3 ++- + arch/parisc/kernel/cache.c | 14 ++++++++++++++ + 3 files changed, 16 insertions(+), 3 deletions(-) + +--- a/arch/parisc/include/asm/cacheflush.h ++++ b/arch/parisc/include/asm/cacheflush.h +@@ -132,7 +132,6 @@ void mark_rodata_ro(void); + static inline void *kmap(struct page *page) + { + might_sleep(); +- flush_dcache_page(page); + return page_address(page); + } + +@@ -144,7 +143,6 @@ static inline void kunmap(struct page *p + static inline void *kmap_atomic(struct page *page) + { + pagefault_disable(); +- flush_dcache_page(page); + return page_address(page); + } + +--- a/arch/parisc/include/asm/page.h ++++ b/arch/parisc/include/asm/page.h +@@ -29,7 +29,8 @@ struct page; + void clear_page_asm(void *page); + void copy_page_asm(void *to, void *from); + #define clear_user_page(vto, vaddr, page) clear_page_asm(vto) +-#define copy_user_page(vto, vfrom, vaddr, page) copy_page_asm(vto, vfrom) ++void copy_user_page(void *vto, void *vfrom, unsigned long vaddr, ++ struct page *pg); + + /* #define CONFIG_PARISC_TMPALIAS */ + +--- a/arch/parisc/kernel/cache.c ++++ b/arch/parisc/kernel/cache.c +@@ -388,6 +388,20 @@ void flush_kernel_dcache_page_addr(void + } + EXPORT_SYMBOL(flush_kernel_dcache_page_addr); + ++void copy_user_page(void *vto, void *vfrom, unsigned long vaddr, ++ struct page *pg) ++{ ++ /* Copy using kernel mapping. No coherency is needed (all in ++ kunmap) for the `to' page. However, the `from' page needs to ++ be flushed through a mapping equivalent to the user mapping ++ before it can be accessed through the kernel mapping. */ ++ preempt_disable(); ++ flush_dcache_page_asm(__pa(vfrom), vaddr); ++ preempt_enable(); ++ copy_page_asm(vto, vfrom); ++} ++EXPORT_SYMBOL(copy_user_page); ++ + void purge_tlb_entries(struct mm_struct *mm, unsigned long addr) + { + unsigned long flags; diff --git a/queue-3.12/series b/queue-3.12/series index 8995bcc3e5b..73b27ffdaad 100644 --- a/queue-3.12/series +++ b/queue-3.12/series @@ -115,3 +115,6 @@ xen-netfront-fix-resource-leak-in-netfront.patch net-gre-use-icmp_hdr-to-get-inner-ip-header.patch inet_diag-fix-inet_diag_dump_icsk-timewait-socket-state-logic.patch alpha-fix-broken-network-checksum.patch +parisc-fix-cache-flushing.patch +kvm-ppc-book3s-hv-use-xics_wake_cpu-only-when-defined.patch +kvm-ppc-e500-fix-bad-address-type-in-deliver_tlb_misss.patch