From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KOCT0-0003r3-EJ for qemu-devel@nongnu.org; Wed, 30 Jul 2008 10:15:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KOCSy-0003oh-SL for qemu-devel@nongnu.org; Wed, 30 Jul 2008 10:15:49 -0400 Received: from [199.232.76.173] (port=48454 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KOCSy-0003oT-Ez for qemu-devel@nongnu.org; Wed, 30 Jul 2008 10:15:48 -0400 Received: from an-out-0708.google.com ([209.85.132.248]:39712) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KOCSy-0006Cw-9W for qemu-devel@nongnu.org; Wed, 30 Jul 2008 10:15:48 -0400 Received: by an-out-0708.google.com with SMTP id d18so6979and.130 for ; Wed, 30 Jul 2008 07:15:47 -0700 (PDT) Message-ID: <48907772.5000801@codemonkey.ws> Date: Wed, 30 Jul 2008 09:15:14 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] replacing gettimeofday with clock_gettime in hw/serial References: <489040FF.1070601@eu.citrix.com> <200807301428.30863.paul@codesourcery.com> In-Reply-To: <200807301428.30863.paul@codesourcery.com> Content-Type: text/plain; charset=UTF-8; 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: qemu-devel@nongnu.org Cc: Stefano Stabellini Paul Brook wrote: > On Wednesday 30 July 2008, Stefano Stabellini wrote: > >> This patch substitutes gettimeofday with clock_gettime in hw/serial.c. >> >> gettimeofday is unsafe because can lead to incorrect behaviors if the user >> changes the system's date. >> > > This code is just plain wrong to start with. Devices should not depend on > host time. > Because host time continues even when the guest is stopped. It should instead be based on the vm_clock. I don't think it works either. I still have gotten messages in the guest about too many interrupts on the serial port. Regards, Anthony Liguori > Paul > > >