diff mbox

[RFC,v7,10/21] cpus: make icount warp deterministic in replay mode

Message ID 20150112120043.3504.74278.stgit@PASHA-ISP
State New
Headers show

Commit Message

Pavel Dovgalyuk Jan. 12, 2015, noon UTC
This patch fixes icount warp rt timer. It should be based on virtual_rt
clock to be deterministic.

Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
---
 cpus.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Paolo Bonzini Jan. 12, 2015, 12:01 p.m. UTC | #1
On 12/01/2015 13:00, Pavel Dovgalyuk wrote:
> This patch fixes icount warp rt timer. It should be based on virtual_rt
> clock to be deterministic.
> 
> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
> ---
>  cpus.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/cpus.c b/cpus.c
> index 0c368f2..8787277 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -325,7 +325,7 @@ static void icount_adjust(void)
>  static void icount_adjust_rt(void *opaque)
>  {
>      timer_mod(icount_rt_timer,
> -                   qemu_clock_get_ms(QEMU_CLOCK_REALTIME) + 1000);
> +              qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL_RT) + 1000);
>      icount_adjust();
>  }
>  
> 

Oops, this is indeed a rebase conflict in the VIRTUAL_RT patches.  I'll
include this now.

Paolo
diff mbox

Patch

diff --git a/cpus.c b/cpus.c
index 0c368f2..8787277 100644
--- a/cpus.c
+++ b/cpus.c
@@ -325,7 +325,7 @@  static void icount_adjust(void)
 static void icount_adjust_rt(void *opaque)
 {
     timer_mod(icount_rt_timer,
-                   qemu_clock_get_ms(QEMU_CLOCK_REALTIME) + 1000);
+              qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL_RT) + 1000);
     icount_adjust();
 }