Re: [Qemu-devel] [PATCH] timer.h: Provide monotonic time for ARM guests

2017-04-20 Thread Peter Maydell
On 18 April 2017 at 20:19, Pranith Kumar wrote: > On Tue, Apr 18, 2017 at 5:56 AM, Paolo Bonzini wrote: >> >> >> On 17/04/2017 20:55, Pranith Kumar wrote: > +/* ARM does not have a user-space readble cycle counter available. > + * This is a compromise to get monotonically increasing time.

Re: [Qemu-devel] [PATCH] timer.h: Provide monotonic time for ARM guests

2017-04-18 Thread Pranith Kumar
On Tue, Apr 18, 2017 at 5:56 AM, Paolo Bonzini wrote: > > > On 17/04/2017 20:55, Pranith Kumar wrote: +/* ARM does not have a user-space readble cycle counter available. + * This is a compromise to get monotonically increasing time. + */ +static inline int64_t cpu_get_host_tick

Re: [Qemu-devel] [PATCH] timer.h: Provide monotonic time for ARM guests

2017-04-18 Thread Paolo Bonzini
On 17/04/2017 20:55, Pranith Kumar wrote: >>> +/* ARM does not have a user-space readble cycle counter available. >>> + * This is a compromise to get monotonically increasing time. >>> + */ >>> +static inline int64_t cpu_get_host_ticks(void) >>> +{ >>> +return get_clock(); >>> +} >> This does

Re: [Qemu-devel] [PATCH] timer.h: Provide monotonic time for ARM guests

2017-04-17 Thread Pranith Kumar
On Mon, Apr 17, 2017 at 2:42 PM, Peter Maydell wrote: > On 15 April 2017 at 20:29, Pranith Kumar wrote: >> Tested and confirmed that the stretch i386 debian qcow2 image on a >> raspberry pi 2 works. >> >> Fixes: LP#: 893208 >> Signed-off-by: Pranith

Re: [Qemu-devel] [PATCH] timer.h: Provide monotonic time for ARM guests

2017-04-17 Thread Peter Maydell
On 15 April 2017 at 20:29, Pranith Kumar wrote: > Tested and confirmed that the stretch i386 debian qcow2 image on a > raspberry pi 2 works. > > Fixes: LP#: 893208 > Signed-off-by: Pranith Kumar > --- > include/qemu/timer.h | 10 ++ > 1 file

[Qemu-devel] [PATCH] timer.h: Provide monotonic time for ARM guests

2017-04-15 Thread Pranith Kumar
Tested and confirmed that the stretch i386 debian qcow2 image on a raspberry pi 2 works. Fixes: LP#: 893208 Signed-off-by: Pranith Kumar --- include/qemu/timer.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/qemu/timer.h b/