qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC] target-arm: do not change CNTVOFF_EL2
@ 2015-07-09 14:38 hw.claudio
  2015-07-09 15:08 ` Peter Maydell
  0 siblings, 1 reply; 2+ messages in thread
From: hw.claudio @ 2015-07-09 14:38 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc Zyngier, Peter Maydell, Claudio Fontana

From: Claudio Fontana <claudio.fontana@huawei.com>

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 <claudio.fontana@huawei.com>
---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [RFC] target-arm: do not change CNTVOFF_EL2
  2015-07-09 14:38 [Qemu-devel] [RFC] target-arm: do not change CNTVOFF_EL2 hw.claudio
@ 2015-07-09 15:08 ` Peter Maydell
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Maydell @ 2015-07-09 15:08 UTC (permalink / raw)
  To: Claudio Fontana; +Cc: Marc Zyngier, Claudio Fontana, QEMU Developers

On 9 July 2015 at 15:38,  <hw.claudio@gmail.com> wrote:
> From: Claudio Fontana <claudio.fontana@huawei.com>
>
> 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 <claudio.fontana@huawei.com>
> ---
>  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?

Yeah, pretty sure it isn't -- see the discussion in
the kvmarm thread. We do want to fix this on the
QEMU side, but not like this...

-- PMM

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-09 15:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-09 14:38 [Qemu-devel] [RFC] target-arm: do not change CNTVOFF_EL2 hw.claudio
2015-07-09 15:08 ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).