This is a note to let you know that I've just added the patch titled

    ARM: KVM: arch_timers: zero CNTVOFF upon return to host

to the 3.10-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     arm-kvm-arch_timers-zero-cntvoff-upon-return-to-host.patch
and it can be found in the queue-3.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From f793c23ebbe5afd1cabf4a42a3a297022213756f Mon Sep 17 00:00:00 2001
From: Mark Rutland <[email protected]>
Date: Tue, 26 Mar 2013 13:41:35 +0000
Subject: ARM: KVM: arch_timers: zero CNTVOFF upon return to host

From: Mark Rutland <[email protected]>

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 <[email protected]>
Acked-by: Marc Zyngier <[email protected]>
Acked-by: Santosh Shilimkar <[email protected]>
Acked-by: Christoffer Dall <[email protected]>
Cc: Mark Brown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 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


Patches currently in stable-queue which might be from [email protected] are

queue-3.10/arm-hyp-initialize-cntvoff-to-zero.patch
queue-3.10/arm64-virt-ensure-visibility-of-__boot_cpu_mode.patch
queue-3.10/arm-kvm-arch_timers-zero-cntvoff-upon-return-to-host.patch
queue-3.10/clocksource-arch_timer-use-virtual-counters.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to