search for: get_localtime_us

Displaying 2 results from an estimated 2 matches for "get_localtime_us".

2012 Mar 05
6
[PATCH 3/5] RTC: Add UIP(update in progress) check logic
..._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 1; + + return 0; +} + static uint32_t rtc_ioport_read(RTCState *s, uint32_t addr) { int ret; @@ -268,6 +286,8 @@ static uint32_t rtc_ioport_re...
2013 Jan 23
10
[PATCH 0/6] x86/HVM: miscellaneous RTC emulation adjustments
Finally I got around to breaking up the similarly named monolithic patch that caused a regression shortly before the 4.2 release and got therefore reverted. This series consists of the broken up pieces that - according to my testing - don''t expose the reported lockup; the 7th will need debugging to understand what''s wrong there. 1: use RTC_* names instead of literal numbers 2: