WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [HVM] Fix bugs in RTC alarm code.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [HVM] Fix bugs in RTC alarm code.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 28 Nov 2006 13:40:14 +0000
Delivery-date: Tue, 28 Nov 2006 05:39:58 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 8795be1653c911bf33682bf81a3ce4250c5f9a8e
# Parent  f711b87ba951e608287abd0de028c6f0d83400a9
[HVM] Fix bugs in RTC alarm code.
 - comparing bcd with binary data
 - comparing min with mon

Signed-off-by: Xiaowei Yang <xiaowei.yang@xxxxxxxxx>
---
 xen/arch/x86/hvm/rtc.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff -r f711b87ba951 -r 8795be1653c9 xen/arch/x86/hvm/rtc.c
--- a/xen/arch/x86/hvm/rtc.c    Mon Nov 27 10:09:19 2006 +0000
+++ b/xen/arch/x86/hvm/rtc.c    Mon Nov 27 10:14:45 2006 +0000
@@ -282,11 +282,14 @@ static void rtc_update_second2(void *opa
     if ( s->cmos_data[RTC_REG_B] & RTC_AIE )
     {
         if ( ((s->cmos_data[RTC_SECONDS_ALARM] & 0xc0) == 0xc0 ||
-              s->cmos_data[RTC_SECONDS_ALARM] == s->current_tm.tm_sec) &&
+              from_bcd(s, s->cmos_data[RTC_SECONDS_ALARM]) ==
+              s->current_tm.tm_sec) &&
              ((s->cmos_data[RTC_MINUTES_ALARM] & 0xc0) == 0xc0 ||
-              s->cmos_data[RTC_MINUTES_ALARM] == s->current_tm.tm_mon) &&
+              from_bcd(s, s->cmos_data[RTC_MINUTES_ALARM]) ==
+              s->current_tm.tm_min) &&
              ((s->cmos_data[RTC_HOURS_ALARM] & 0xc0) == 0xc0 ||
-              s->cmos_data[RTC_HOURS_ALARM] == s->current_tm.tm_hour) )
+              from_bcd(s, s->cmos_data[RTC_HOURS_ALARM]) ==
+              s->current_tm.tm_hour) )
         {
             s->cmos_data[RTC_REG_C] |= 0xa0; 
             hvm_isa_irq_deassert(s->vcpu->domain, s->irq);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [HVM] Fix bugs in RTC alarm code., Xen patchbot-unstable <=