Re: svn commit: r221214 - head/sys/x86/x86

2011-05-02 Thread Jung-uk Kim
On Monday 02 May 2011 07:08 am, Dimitry Andric wrote: > On 2011-04-29 20:20, Jung-uk Kim wrote: > ... > > > +static __inline void > > +vmware_hvcall(u_int cmd, u_int *p) > > +{ > > + > > + __asm __volatile("inl (%%dx)" > > + : "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3]) > > + : "0" (VM

Re: svn commit: r221214 - head/sys/x86/x86

2011-05-02 Thread Dimitry Andric
On 2011-04-29 20:20, Jung-uk Kim wrote: ... +static __inline void +vmware_hvcall(u_int cmd, u_int *p) +{ + + __asm __volatile("inl (%%dx)" + : "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3]) + : "0" (VMW_HVMAGIC), "1" (UINT_MAX), "2" (cmd), "3" (VMW_HVPORT) + : "memory"

svn commit: r221214 - head/sys/x86/x86

2011-04-29 Thread Jung-uk Kim
Author: jkim Date: Fri Apr 29 18:20:12 2011 New Revision: 221214 URL: http://svn.freebsd.org/changeset/base/221214 Log: Detect VMware guest and set the TSC frequency as reported by the hypervisor. VMware products virtualize TSC and it run at fixed frequency in so-called "apparent time". Alt