From: Greg Kroah-Hartman Date: Tue, 7 Jan 2014 18:54:13 +0000 (-0800) Subject: 3.10-stable patches X-Git-Tag: v3.4.76~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=25f30735c3554b16009b98e7727116ef8372e1fd;p=thirdparty%2Fkernel%2Fstable-queue.git 3.10-stable patches added patches: arm-hyp-initialize-cntvoff-to-zero.patch arm-kvm-arch_timers-zero-cntvoff-upon-return-to-host.patch --- diff --git a/queue-3.10/arm-hyp-initialize-cntvoff-to-zero.patch b/queue-3.10/arm-hyp-initialize-cntvoff-to-zero.patch new file mode 100644 index 00000000000..941ec1bd5b6 --- /dev/null +++ b/queue-3.10/arm-hyp-initialize-cntvoff-to-zero.patch @@ -0,0 +1,34 @@ +From 0af0b189abf73d232af782df2f999235cd2fed7f Mon Sep 17 00:00:00 2001 +From: Marc Zyngier +Date: Wed, 30 Jan 2013 18:17:49 +0000 +Subject: ARM: hyp: initialize CNTVOFF to zero + +From: Marc Zyngier + +commit 0af0b189abf73d232af782df2f999235cd2fed7f upstream. + +In order to be able to use the virtual counter in a safe way, +make sure it is initialized to zero before dropping to SVC. + +Signed-off-by: Marc Zyngier +Signed-off-by: Mark Rutland +Acked-by: Santosh Shilimkar +Cc: Dave Martin +Cc: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/kernel/hyp-stub.S | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/arm/kernel/hyp-stub.S ++++ b/arch/arm/kernel/hyp-stub.S +@@ -153,6 +153,8 @@ THUMB( orr r7, #(1 << 30) ) @ HSCTLR.TE + mrc p15, 4, r7, c14, c1, 0 @ CNTHCTL + orr r7, r7, #3 @ PL1PCEN | PL1PCTEN + mcr p15, 4, r7, c14, c1, 0 @ CNTHCTL ++ mov r7, #0 ++ mcrr p15, 4, r7, r7, c14 @ CNTVOFF + 1: + #endif + diff --git a/queue-3.10/arm-kvm-arch_timers-zero-cntvoff-upon-return-to-host.patch b/queue-3.10/arm-kvm-arch_timers-zero-cntvoff-upon-return-to-host.patch new file mode 100644 index 00000000000..fde491f5288 --- /dev/null +++ b/queue-3.10/arm-kvm-arch_timers-zero-cntvoff-upon-return-to-host.patch @@ -0,0 +1,42 @@ +From f793c23ebbe5afd1cabf4a42a3a297022213756f Mon Sep 17 00:00:00 2001 +From: Mark Rutland +Date: Tue, 26 Mar 2013 13:41:35 +0000 +Subject: ARM: KVM: arch_timers: zero CNTVOFF upon return to host + +From: Mark Rutland + +commit f793c23ebbe5afd1cabf4a42a3a297022213756f upstream. + +To use the virtual counters from the host, we need to ensure that +CNTVOFF doesn't change unexpectedly. When we change to a guest, we +replace the host's CNTVOFF, but we don't restore it when returning to +the host. + +As the host sets CNTVOFF to zero, and never changes it, we can simply +zero CNTVOFF when returning to the host. This patch adds said zeroing to +the return to host path. + +Signed-off-by: Mark Rutland +Acked-by: Marc Zyngier +Acked-by: Santosh Shilimkar +Acked-by: Christoffer Dall +Cc: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/kvm/interrupts_head.S | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/arch/arm/kvm/interrupts_head.S ++++ b/arch/arm/kvm/interrupts_head.S +@@ -503,6 +503,10 @@ vcpu .req r0 @ vcpu pointer always in r + add r5, vcpu, r4 + strd r2, r3, [r5] + ++ @ Ensure host CNTVCT == CNTPCT ++ mov r2, #0 ++ mcrr p15, 4, r2, r2, c14 @ CNTVOFF ++ + 1: + #endif + @ Allow physical timer/counter access for the host diff --git a/queue-3.10/series b/queue-3.10/series index 3185565892d..f8a88d34948 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -72,7 +72,6 @@ mm-numa-avoid-unnecessary-work-on-the-failure-path.patch sched-fix-the-theoretical-signal_wake_up-vs-schedule-race.patch mm-fix-tlb-flush-race-between-migration-and-change_protection_range.patch mm-numa-guarantee-that-tlb_flush_pending-updates-are-visible-before-page-table-updates.patch -mm-mempolicy-correct-putback-method-for-isolate-pages-if-failed.patch mm-compaction-respect-ignore_skip_hint-in-update_pageblock_skip.patch mm-hugetlb-check-for-pte-null-pointer-in-__page_check_address.patch mm-fix-use-after-free-in-sys_remap_file_pages.patch @@ -124,6 +123,8 @@ arm64-check-for-number-of-arguments-in-syscall_get-set_arguments.patch arm64-dts-reserve-the-memory-used-for-secondary-cpu-release-address.patch arm64-remove-unused-cpu_name-ascii-in-arch-arm64-mm-proc.s.patch clocksource-arch_timer-use-virtual-counters.patch +arm-hyp-initialize-cntvoff-to-zero.patch +arm-kvm-arch_timers-zero-cntvoff-upon-return-to-host.patch arm64-avoid-cache-flushing-in-flush_dcache_page.patch arm64-do-not-flush-the-d-cache-for-anonymous-pages.patch arm64-use-normal-noncacheable-memory-for-writecombine.patch