qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] replacing gettimeofday with clock_gettime in hw


From: Stefano Stabellini
Subject: Re: [Qemu-devel] [PATCH] replacing gettimeofday with clock_gettime in hw/serial
Date: Wed, 30 Jul 2008 16:30:14 +0100
User-agent: Thunderbird 2.0.0.14 (X11/20080505)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]