qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] icount: Fix virtual clock start value on ARM
@ 2014-07-23  9:11 Sebastian Tanase
  2014-07-23  9:16 ` Paolo Bonzini
  2014-07-23  9:41 ` Peter Maydell
  0 siblings, 2 replies; 5+ messages in thread
From: Sebastian Tanase @ 2014-07-23  9:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: alex, mst, stefanha, pbonzini, Sebastian Tanase, afaerber

When using the icount option on ARM, the virtual
clock starts counting at realtime clock but it
should start at 0.
This small fix addresses this issue.

Signed-off-by: Sebastian Tanase <sebastian.tanase@openwide.fr>
---
 cpus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpus.c b/cpus.c
index 5e7f2cf..de18ece 100644
--- a/cpus.c
+++ b/cpus.c
@@ -104,7 +104,7 @@ static bool all_cpu_threads_idle(void)
 
 /* Compensate for varying guest execution speed.  */
 static int64_t qemu_icount_bias;
-static int64_t vm_clock_warp_start;
+static int64_t vm_clock_warp_start = -1;
 /* Conversion factor from emulated instructions to virtual clock ticks.  */
 static int icount_time_shift;
 /* Arbitrarily pick 1MIPS as the minimum allowable speed.  */
-- 
2.0.0.rc2

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

* Re: [Qemu-devel] [PATCH] icount: Fix virtual clock start value on ARM
  2014-07-23  9:11 [Qemu-devel] [PATCH] icount: Fix virtual clock start value on ARM Sebastian Tanase
@ 2014-07-23  9:16 ` Paolo Bonzini
  2014-07-23  9:20   ` Andreas Färber
  2014-07-23  9:41 ` Peter Maydell
  1 sibling, 1 reply; 5+ messages in thread
From: Paolo Bonzini @ 2014-07-23  9:16 UTC (permalink / raw)
  To: Sebastian Tanase, qemu-devel; +Cc: stefanha, afaerber, alex, mst

Il 23/07/2014 11:11, Sebastian Tanase ha scritto:
> When using the icount option on ARM, the virtual
> clock starts counting at realtime clock but it
> should start at 0.
> This small fix addresses this issue.
> 
> Signed-off-by: Sebastian Tanase <sebastian.tanase@openwide.fr>

Thanks, this is ok for 2.2.

Paolo

> ---
>  cpus.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/cpus.c b/cpus.c
> index 5e7f2cf..de18ece 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -104,7 +104,7 @@ static bool all_cpu_threads_idle(void)
>  
>  /* Compensate for varying guest execution speed.  */
>  static int64_t qemu_icount_bias;
> -static int64_t vm_clock_warp_start;
> +static int64_t vm_clock_warp_start = -1;
>  /* Conversion factor from emulated instructions to virtual clock ticks.  */
>  static int icount_time_shift;
>  /* Arbitrarily pick 1MIPS as the minimum allowable speed.  */
> 

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

* Re: [Qemu-devel] [PATCH] icount: Fix virtual clock start value on ARM
  2014-07-23  9:16 ` Paolo Bonzini
@ 2014-07-23  9:20   ` Andreas Färber
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Färber @ 2014-07-23  9:20 UTC (permalink / raw)
  To: Paolo Bonzini, Sebastian Tanase, qemu-devel; +Cc: stefanha, alex, mst

Am 23.07.2014 11:16, schrieb Paolo Bonzini:
> Il 23/07/2014 11:11, Sebastian Tanase ha scritto:
>> When using the icount option on ARM, the virtual
>> clock starts counting at realtime clock but it
>> should start at 0.
>> This small fix addresses this issue.
>>
>> Signed-off-by: Sebastian Tanase <sebastian.tanase@openwide.fr>
> 
> Thanks, this is ok for 2.2.

Could we get an explanation (in the commit message) of why this fixes
that issue? :) By my reading -1 != 0.

Thanks,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

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

* Re: [Qemu-devel] [PATCH] icount: Fix virtual clock start value on ARM
  2014-07-23  9:11 [Qemu-devel] [PATCH] icount: Fix virtual clock start value on ARM Sebastian Tanase
  2014-07-23  9:16 ` Paolo Bonzini
@ 2014-07-23  9:41 ` Peter Maydell
  2014-07-23  9:45   ` Paolo Bonzini
  1 sibling, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2014-07-23  9:41 UTC (permalink / raw)
  To: Sebastian Tanase
  Cc: Alex Bligh, Michael S. Tsirkin, QEMU Developers, Stefan Hajnoczi,
	Paolo Bonzini, Andreas Färber

On 23 July 2014 10:11, Sebastian Tanase <sebastian.tanase@openwide.fr> wrote:
> When using the icount option on ARM, the virtual
> clock starts counting at realtime clock but it
> should start at 0.
> This small fix addresses this issue.
>
> Signed-off-by: Sebastian Tanase <sebastian.tanase@openwide.fr>
> ---
>  cpus.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/cpus.c b/cpus.c
> index 5e7f2cf..de18ece 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -104,7 +104,7 @@ static bool all_cpu_threads_idle(void)
>
>  /* Compensate for varying guest execution speed.  */
>  static int64_t qemu_icount_bias;
> -static int64_t vm_clock_warp_start;
> +static int64_t vm_clock_warp_start = -1;
>  /* Conversion factor from emulated instructions to virtual clock ticks.  */
>  static int icount_time_shift;
>  /* Arbitrarily pick 1MIPS as the minimum allowable speed.  */

Commit message says this is fixing an ARM bug but this is
a generic file. Is this actually a bug with wider scope than just
ARM?

thanks
-- PMM

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

* Re: [Qemu-devel] [PATCH] icount: Fix virtual clock start value on ARM
  2014-07-23  9:41 ` Peter Maydell
@ 2014-07-23  9:45   ` Paolo Bonzini
  0 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2014-07-23  9:45 UTC (permalink / raw)
  To: Peter Maydell, Sebastian Tanase
  Cc: Andreas Färber, Stefan Hajnoczi, QEMU Developers, Alex Bligh,
	Michael S. Tsirkin

Il 23/07/2014 11:41, Peter Maydell ha scritto:
> On 23 July 2014 10:11, Sebastian Tanase <sebastian.tanase@openwide.fr> wrote:
>> When using the icount option on ARM, the virtual
>> clock starts counting at realtime clock but it
>> should start at 0.
>> This small fix addresses this issue.
>>
>> Signed-off-by: Sebastian Tanase <sebastian.tanase@openwide.fr>
>> ---
>>  cpus.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/cpus.c b/cpus.c
>> index 5e7f2cf..de18ece 100644
>> --- a/cpus.c
>> +++ b/cpus.c
>> @@ -104,7 +104,7 @@ static bool all_cpu_threads_idle(void)
>>
>>  /* Compensate for varying guest execution speed.  */
>>  static int64_t qemu_icount_bias;
>> -static int64_t vm_clock_warp_start;
>> +static int64_t vm_clock_warp_start = -1;
>>  /* Conversion factor from emulated instructions to virtual clock ticks.  */
>>  static int icount_time_shift;
>>  /* Arbitrarily pick 1MIPS as the minimum allowable speed.  */
> 
> Commit message says this is fixing an ARM bug but this is
> a generic file. Is this actually a bug with wider scope than just
> ARM?

Yes, see the discussion yesterday under "Re: [RFC PATCH V4 6/6] monitor:
Add drift info to 'info jit'" and "Re: [RFC PATCH V4 0/6] icount:
Implement delay algorithm between guest and host clocks".

Paolo

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

end of thread, other threads:[~2014-07-23  9:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-23  9:11 [Qemu-devel] [PATCH] icount: Fix virtual clock start value on ARM Sebastian Tanase
2014-07-23  9:16 ` Paolo Bonzini
2014-07-23  9:20   ` Andreas Färber
2014-07-23  9:41 ` Peter Maydell
2014-07-23  9:45   ` Paolo Bonzini

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