From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDCvr-0005y1-EH for qemu-devel@nongnu.org; Thu, 09 Jul 2015 10:36:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZDCvo-00021t-5V for qemu-devel@nongnu.org; Thu, 09 Jul 2015 10:36:11 -0400 Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:35218) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDCvn-00021m-UJ for qemu-devel@nongnu.org; Thu, 09 Jul 2015 10:36:08 -0400 Received: by wiga1 with SMTP id a1so314860734wig.0 for ; Thu, 09 Jul 2015 07:36:05 -0700 (PDT) From: hw.claudio@gmail.com Date: Thu, 9 Jul 2015 16:38:09 +0200 Message-Id: <1436452689-11159-1-git-send-email-hw.claudio@gmail.com> Subject: [Qemu-devel] [RFC] target-arm: do not change CNTVOFF_EL2 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Marc Zyngier , Peter Maydell , Claudio Fontana From: Claudio Fontana after a vm is created, the cntvoff_el2 is already calculated for us by kvm, do not attempt to change it. Signed-off-by: Claudio Fontana --- target-arm/kvm.c | 5 +++++ 1 file changed, 5 insertions(+) This is just an RFC to show where QEMU is causing the change of CNTVOFF_EL2. This fixes the issue for me, but maybe this is not the right way to do it? Thanks, Claudio diff --git a/target-arm/kvm.c b/target-arm/kvm.c index 548bfd7..c5ad580 100644 --- a/target-arm/kvm.c +++ b/target-arm/kvm.c @@ -421,6 +421,11 @@ bool write_list_to_kvmstate(ARMCPU *cpu) uint32_t v32; int ret; + if (regidx == KVM_REG_ARM_TIMER_CNT) { + /* do not cause a change of CNTVOFF_EL2. */ + continue; + } + r.id = regidx; switch (regidx & KVM_REG_SIZE_MASK) { case KVM_REG_SIZE_U32: -- 1.8.5.3