diff options
author | Jan Beulich <jbeulich@suse.com> | 2013-05-21 10:14:21 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2013-05-21 10:14:21 +0200 |
commit | 9607327abbd3e77bde6cc7b5327f3efd781fc06e (patch) | |
tree | f9ddd0de1b5149cc22717a62e3649ef42c1a449b /xen/arch/x86/hvm/rtc.c | |
parent | f3347f520cb4d8aa4566182b013c6758d80cbe88 (diff) | |
download | xen-9607327abbd3e77bde6cc7b5327f3efd781fc06e.tar.gz xen-9607327abbd3e77bde6cc7b5327f3efd781fc06e.tar.bz2 xen-9607327abbd3e77bde6cc7b5327f3efd781fc06e.zip |
x86/HVM: properly handle RTC periodic timer even when !RTC_PIE
Since in that case the processing it pt_intr_post() won't occur, we
need to do some additional work in pt_update_irq(). Additionally we
must not pay attention to the respective IRQ being masked.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Roger Pau Monné <roger.pau@citrix.com> (FreeBSD guest)
Diffstat (limited to 'xen/arch/x86/hvm/rtc.c')
-rw-r--r-- | xen/arch/x86/hvm/rtc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xen/arch/x86/hvm/rtc.c b/xen/arch/x86/hvm/rtc.c index b215886ef0..77b380f287 100644 --- a/xen/arch/x86/hvm/rtc.c +++ b/xen/arch/x86/hvm/rtc.c @@ -67,11 +67,13 @@ static void rtc_update_irq(RTCState *s) hvm_isa_irq_assert(vrtc_domain(s), RTC_IRQ); } -void rtc_periodic_interrupt(void *opaque) +bool_t rtc_periodic_interrupt(void *opaque) { RTCState *s = opaque; + bool_t ret; spin_lock(&s->lock); + ret = !(s->hw.cmos_data[RTC_REG_C] & RTC_IRQF); if ( !(s->hw.cmos_data[RTC_REG_C] & RTC_PF) ) { s->hw.cmos_data[RTC_REG_C] |= RTC_PF; @@ -83,7 +85,11 @@ void rtc_periodic_interrupt(void *opaque) destroy_periodic_time(&s->pt); s->pt_code = 0; } + if ( !(s->hw.cmos_data[RTC_REG_C] & RTC_IRQF) ) + ret = 0; spin_unlock(&s->lock); + + return ret; } /* Enable/configure/disable the periodic timer based on the RTC_PIE and |