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: RTC emulation - RTC_UIE/RTC_SET fix

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] hvm: RTC emulation - RTC_UIE/RTC_SET fix
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 22 Nov 2007 12:00:30 -0800
Delivery-date: Thu, 22 Nov 2007 12:01:47 -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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1195240066 0
# Node ID 86e4b37a06ccc6c7c0ea75b5af9e6116b5d6a382
# Parent  68c911f7733a0158056d10e9e7997a6acfe47eb1
hvm: RTC emulation - RTC_UIE/RTC_SET fix

This patch fixes a bug in the RTC code which appears to originate in
having written the emuated device following an incorrect
specification. VMware has (or had, at least, at the time we were still
testing on both VMWare and Xen) the same issue. In the current code,
when RTC_SET is set, RTC_UIE is cleared. This does not match the
behavior of real hardware, where the case is simply that no update
ended interrupts are sent as long as RTC_SET is set, but the UE ints
will resume as soon as RTC_SET is cleared and the clock update is
done. This little patch fixes this issue. In practicality, this means
OS/2 can now set the time without having the clock stop. I don't know
if any other guests have been affected by this issue.

From: Trolle Selander <trolle.selander@xxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/hvm/rtc.c |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)

diff -r 68c911f7733a -r 86e4b37a06cc xen/arch/x86/hvm/rtc.c
--- a/xen/arch/x86/hvm/rtc.c    Fri Nov 16 18:33:24 2007 +0000
+++ b/xen/arch/x86/hvm/rtc.c    Fri Nov 16 19:07:46 2007 +0000
@@ -128,7 +128,6 @@ static int rtc_ioport_write(void *opaque
         {
             /* set mode: reset UIP mode */
             s->hw.cmos_data[RTC_REG_A] &= ~RTC_UIP;
-            data &= ~RTC_UIE;
         }
         else
         {
@@ -350,7 +349,7 @@ static void rtc_update_second2(void *opa
     }
 
     /* update ended interrupt */
-    if ( s->hw.cmos_data[RTC_REG_B] & RTC_UIE )
+    if ( (s->hw.cmos_data[RTC_REG_B] & (RTC_UIE|RTC_SET)) == RTC_UIE )
     {
         s->hw.cmos_data[RTC_REG_C] |= 0x90; 
         hvm_isa_irq_deassert(d, RTC_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: RTC emulation - RTC_UIE/RTC_SET fix, Xen patchbot-unstable <=