RE: [PATCH v4 0/7] RTC: New logic to emulate RTC

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

 



> -----Original Message-----
> From: Paolo Bonzini [mailto:pbonzini@xxxxxxxxxx]
> I attach a patch that fixes some problems with divider reset and in
> general simplifies the logic.  Even with the patch, however, I still see
> failures in my test case unfortunately.  Probably there are rounding
> errors somewhere.
Actually, I also see some failures during testing. And most of them are fail to pass the 244us update cycle checking. Since we are in emulation environment, we cannot ensure it always greater than 244us. So I think it should not be a bug.
Also, maybe there are some other bugs, I will do more testing.

> Also (minor change) you need to use rtc_clock instead of host_clock.
> 
> I'm afraid that we're hitting a wall. :(  The problem I have is that the
> logic in your patch is very complex and, without understanding it well,
> I'm afraid we'll never be able to fix it completely (while the old
> inefficient one is buggy but it _can_ be fixed).
> 
> By the way in general the SET bit and the divider should be handled in
> the same way, because both stop the updates.  That is, in general there
> should be a function like
> 
> static inline bool rtc_running(RTCState *s)
> {
>     return (!(s->cmos_data[RTC_REG_B] & REG_B_SET) &&
> 	    (s->cmos_data[RTC_REG_A] & 0x70) == 0x20);
> }
> 
> that is used instead of testing REG_B_SET.  I pushed some work along
> these lines at git://github.com/bonzini/qemu.git (branch rtc-intel), but
> it does not really improve the situation with respect to rounding errors
> so the bug must be elsewhere.
You are right, I missed this logic. Will add it in next version.

Best regrads
yang
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux