qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] replacing gettimeofday with clock_gettime in hw/serial
Date: Wed, 30 Jul 2008 16:30:14 +0100	[thread overview]
Message-ID: <48908906.3000508@eu.citrix.com> (raw)
In-Reply-To: <48907772.5000801@codemonkey.ws>

Anthony Liguori wrote:

> 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.
> 

I am sorry, I did a mistake: I have just realized that the serial
emulation code in qemu and ioemu under xen are so different that this
patch doesn't even apply to qemu.
I am so used to send the same patch twice that I haven't realize that
until now.
I'll try to merge them, if it makes sense.

      reply	other threads:[~2008-07-30 15:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-30 10:22 [Qemu-devel] [PATCH] replacing gettimeofday with clock_gettime in hw/serial Stefano Stabellini
2008-07-30 13:28 ` Paul Brook
2008-07-30 14:15   ` Anthony Liguori
2008-07-30 15:30     ` Stefano Stabellini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48908906.3000508@eu.citrix.com \
    --to=stefano.stabellini@eu.citrix.com \
    --cc=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).