RE: [Qemu-devel] [PATCH v4 2/7] RTC: Update the RTC clock only when reading it

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

 



> -----Original Message-----
> From: Stefano Stabellini [mailto:stefano.stabellini@xxxxxxxxxxxxx]
> Sent: Tuesday, March 20, 2012 10:16 PM
> To: Zhang, Yang Z
> Cc: qemu-devel@xxxxxxxxxx; Paolo Bonzini; aliguori@xxxxxxxxxx;
> kvm@xxxxxxxxxxxxxxx
> Subject: Re: [Qemu-devel] [PATCH v4 2/7] RTC: Update the RTC clock only when
> reading it
> 
> On Mon, 19 Mar 2012, Zhang, Yang Z wrote:
> > There has no need to use two periodic timer to update RTC time. In this patch,
> we only update it when guest reading it.
> 
> So the basic idea here is that we don't need to two periodic timers
> because we are going to calculate the RTC guest time from QEMU's
> host_clock.
> 
> I only have a couple of observations:
> 
> - shouldn't we use QEMU rtc_clock, rather than host_clock?
Right. It should be rtc_clock not host_clock

> - it would be better to use shifts rather than divisions whenever
> possible, they are much cheaper;
Agree.
 
> - rtc_calibrate_time seems to be the new functions that updates the
> guest rtc time based on QEMU host_clock. Are you sure we are calling
> it all the times we need to call it? Could we just call it at the
> beginning of cmos_ioport_write and cmos_ioport_read?
No. If the RTC_B_SET is set or divider reset is held, we should not call the rtc_calibrate_time.

best regards
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