Displaying 1 result from an estimated 1 matches for "guest_usec".
Did you mean:
guest_tsc
2012 Mar 05
6
[PATCH 3/5] RTC: Add UIP(update in progress) check logic
...vcpu_vrtc(x) (domain_vrtc((x)->domain))
#define vrtc_domain(x) (container_of((x), struct domain, \
@@ -239,6 +241,22 @@ static void rtc_copy_date(RTCState *s)
s->hw.cmos_data[RTC_YEAR] = to_bcd(s, tm->tm_year % 100);
}
+static int update_in_progress(RTCState *s)
+{
+ uint64_t guest_usec;
+ struct domain *d = vrtc_domain(s);
+
+ if (s->hw.cmos_data[RTC_REG_B] & RTC_SET)
+ return 0;
+
+ guest_usec = get_localtime_us(d);
+ /* UIP bit will be set at last 244us of every second. */
+ if ((guest_usec % USEC_PER_SEC) >= (USEC_PER_SEC - 244))
+ return...