On 2 June 2015 at 15:49, Stefan Hajnoczi <stefa...@gmail.com> wrote: > On Sun, May 31, 2015 at 07:11:25PM +0530, Sai Prajeeth wrote: >> I have done experiments and it seems that FreeBSD's libc function >> clock_gettime() results in a system call when running on QEMU whereas on >> hardware it does not. Does anybody know why? For those interested , you can >> find the clock_gettime libc call in freebsd source here: >> https://github.com/lattera/freebsd/blob/master/lib/libc/sys/clock_gettime.c > > This is more of a FreeBSD kernel question than a QEMU question. I don't > have time to dig into the FreeBSD sources but you should be able to find > the answer there.
The underlying answer is presumably "some difference between the (emulated?) (KVM?) CPU QEMU exposes to the guest and the CPU on real h/w makes FreeBSD decide it can't provide gettime in the vdso". Exactly what that difference is you'd need to look at the FreeBSD sources to find out, I agree. -- PMM