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-devel

[Xen-devel] [PATCH] fix QEMU RTC alarm intr

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] fix QEMU RTC alarm intr
From: "Yang, Xiaowei" <xiaowei.yang@xxxxxxxxx>
Date: Mon, 27 Nov 2006 11:29:14 +0800
Delivery-date: Sun, 26 Nov 2006 19:29:25 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AccR1DZn9BbiwtriRRWM0k34DV5aUg==
Thread-topic: [PATCH] fix QEMU RTC alarm intr

2 small bugs:

- comparing bcd with binary data

- comparing min with mon

Signed-off-by: Xiaowei Yang <xiaowei.yang@xxxxxxxxx>

diff -r 65318c8e7694 -r b756fa5fcc64 xen/arch/x86/hvm/rtc.c

--- a/xen/arch/x86/hvm/rtc.c    Sun Nov 26 18:18:34 2006 +0800

+++ b/xen/arch/x86/hvm/rtc.c    Sun Nov 26 19:24:25 2006 +0800

@@ -278,12 +278,15 @@ static void rtc_update_second2(void *opa

     /* check alarm */

     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) &&

-             ((s->cmos_data[RTC_MINUTES_ALARM] & 0xc0) == 0xc0 ||

-              s->cmos_data[RTC_MINUTES_ALARM] == s->current_tm.tm_mon) &&

-             ((s->cmos_data[RTC_HOURS_ALARM] & 0xc0) == 0xc0 ||

-              s->cmos_data[RTC_HOURS_ALARM] == s->current_tm.tm_hour) )

+        if (((s->cmos_data[RTC_SECONDS_ALARM] & 0xc0) == 0xc0

+                || from_bcd(s, s->cmos_data[RTC_SECONDS_ALARM]) ==

+                s->current_tm.tm_sec)

+            && ((s->cmos_data[RTC_MINUTES_ALARM] & 0xc0) == 0xc0

+                || from_bcd(s, s->cmos_data[RTC_MINUTES_ALARM]) ==

+                s->current_tm.tm_min)

+            && ((s->cmos_data[RTC_HOURS_ALARM] & 0xc0) == 0xc0

+                || 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->pt.vcpu->domain, s->irq);

Thanks,
Xiaowei

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] fix QEMU RTC alarm intr, Yang, Xiaowei <=