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

[Xen-devel] [PATCH 2/6] x86/HVM: slightly adjust RTC reset



We should clear the interrupt enable flags here, deassert the IRQ, and
clear REG_C.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/arch/x86/hvm/rtc.c
+++ b/xen/arch/x86/hvm/rtc.c
@@ -732,6 +732,11 @@ void rtc_reset(struct domain *d)
     destroy_periodic_time(&s->pt);
     s->pt_code = 0;
     s->pt.source = PTSRC_isa;
+
+    s->hw.cmos_data[RTC_REG_B] &= ~(RTC_PIE | RTC_AIE | RTC_UIE);
+    if ( s->hw.cmos_data[RTC_REG_C] & RTC_IRQF )
+        hvm_isa_irq_deassert(d, RTC_IRQ);
+    s->hw.cmos_data[RTC_REG_C] = 0;
 }
 
 void rtc_init(struct domain *d)



Attachment: x86-HVM-RTC-reset.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.