From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kc9y4-0008IO-PA for qemu-devel@nongnu.org; Sat, 06 Sep 2008 22:25:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kc9y2-0008G2-GO for qemu-devel@nongnu.org; Sat, 06 Sep 2008 22:25:35 -0400 Received: from [199.232.76.173] (port=38209 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kc9y2-0008Fz-DP for qemu-devel@nongnu.org; Sat, 06 Sep 2008 22:25:34 -0400 Received: from an-out-0708.google.com ([209.85.132.247]:56866) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kc9y2-0000ft-5q for qemu-devel@nongnu.org; Sat, 06 Sep 2008 22:25:34 -0400 Received: by an-out-0708.google.com with SMTP id d18so162841and.130 for ; Sat, 06 Sep 2008 19:25:33 -0700 (PDT) Message-ID: <48C33B6D.5080606@codemonkey.ws> Date: Sat, 06 Sep 2008 21:24:45 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1/1] Make vmport an optional feature at run time. References: <1219578445-25610-1-git-send-email-blob@blob.co.uk> <48B1B8C5.4040902@codemonkey.ws> <48B1FB9F.3090405@codemonkey.ws> <20080825055840.GA683@fries.net> In-Reply-To: <20080825055840.GA683@fries.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: todd@fries.net, qemu-devel@nongnu.org Todd T. Fries wrote: > Just incase a 'more complete' vmport codeset is useful, here is my > stab at extending it. I haven't extended it far enough yet that > OpenBSD's vmt(4) interface works, but would be more than happy > if someone else were to carry this flag and run with it.. > > > > +static uint32_t vmport_cmd_get_time(void *opaque, uint32_t addr) > +{ > + CPUState *env = opaque; > + struct timeval tv; > + gettimeofday(&tv, NULL); > + env->regs[R_EAX] = tv.tv_sec; > + env->regs[R_EBX] = tv.tv_usec; > + return tv.tv_sec; > +} > > FWIW, this is incorrect. You are presenting the host's version of wall clock time, not the guest's version. Regards, Anthony Liguori