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] cpuidle: Fix PV RTC I/O port access hook

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] cpuidle: Fix PV RTC I/O port access hook
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 16 Apr 2009 04:00:45 -0700
Delivery-date: Thu, 16 Apr 2009 04:01:00 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 1239879128 -3600
# Node ID b14dc215dd19ce28d95261ca2b5d4d302195926b
# Parent  573e6673e9e08328762bf58e7c02f8144c109ec2
cpuidle: Fix PV RTC I/O port access hook

Call hook before writing to I/O ports. Only hook single-byte writes.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/traps.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff -r 573e6673e9e0 -r b14dc215dd19 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Wed Apr 15 15:47:25 2009 +0100
+++ b/xen/arch/x86/traps.c      Thu Apr 16 11:52:08 2009 +0100
@@ -1564,11 +1564,11 @@ static void guest_io_write(
     {
         switch ( bytes ) {
         case 1:
+            if ( ((port == 0x70) || (port == 0x71)) && pv_rtc_handler )
+                pv_rtc_handler(port, (uint8_t)data);
             outb((uint8_t)data, port);
             if ( pv_post_outb_hook )
                 pv_post_outb_hook(port, (uint8_t)data);
-            if ( ((port == 0x71) || (port == 0x70)) && pv_rtc_handler )
-                pv_rtc_handler(port, (uint8_t)data);
             break;
         case 2:
             outw((uint16_t)data, port);
@@ -1937,11 +1937,13 @@ static int emulate_privileged_op(struct 
             goto fail;
         if ( admin_io_okay(port, op_bytes, v, regs) )
         {
+            if ( (op_bytes == 1) &&
+                 ((port == 0x71) || (port == 0x70)) &&
+                 pv_rtc_handler )
+                pv_rtc_handler(port, regs->eax);
             io_emul(regs);            
             if ( (op_bytes == 1) && pv_post_outb_hook )
                 pv_post_outb_hook(port, regs->eax);
-            if ( ((port == 0x71) || (port == 0x70)) && pv_rtc_handler )
-                pv_rtc_handler(port, regs->eax);
         }
         else
         {

_______________________________________________
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] cpuidle: Fix PV RTC I/O port access hook, Xen patchbot-unstable <=