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 the APM BIOS to ensure that int

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [HVM] Fix the APM BIOS to ensure that interrupts are enabled when it
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 19 Aug 2006 02:41:27 +0000
Delivery-date: Fri, 18 Aug 2006 19:47:32 -0700
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 a658663ab2d0756f673a93f639d57569e7c66aa9
# Parent  28e9bba0342574ff971d1246f74d24009c897b36
[HVM] Fix the APM BIOS to ensure that interrupts are enabled when it
executes an idling HLT. This allow us to re-enable the 'shutdown on
HLT-with-interrupts-disabled' heuristic.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/firmware/rombios/apmbios.S |    3 +++
 xen/arch/x86/hvm/hvm.c           |    5 ++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff -r 28e9bba03425 -r a658663ab2d0 tools/firmware/rombios/apmbios.S
--- a/tools/firmware/rombios/apmbios.S  Fri Aug 18 15:24:10 2006 +0100
+++ b/tools/firmware/rombios/apmbios.S  Fri Aug 18 16:20:45 2006 +0100
@@ -225,7 +225,10 @@ APMSYM(05):
 APMSYM(05):
   cmp al, #0x05
   jne APMSYM(07)
+  pushf ; XEN
+  sti   ; XEN: OS calls us with ints disabled -- better re-enable here!
   hlt
+  popf  ; XEN
   jmp APMSYM(ok)
 
 ;-----------------
diff -r 28e9bba03425 -r a658663ab2d0 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Fri Aug 18 15:24:10 2006 +0100
+++ b/xen/arch/x86/hvm/hvm.c    Fri Aug 18 16:20:45 2006 +0100
@@ -345,13 +345,13 @@ int cpu_get_interrupt(struct vcpu *v, in
     return -1;
 }
 
+#include <asm/hvm/vmx/vmx.h>
 void hvm_hlt(unsigned long rflags)
 {
     struct vcpu *v = current;
     struct periodic_time *pt = &v->domain->arch.hvm_domain.pl_time.periodic_tm;
     s_time_t next_pit = -1, next_wakeup;
 
-#if 0 /* This seems to fire at unwelcome times in Linux */
     /*
      * Detect machine shutdown.  Only do this for vcpu 0, to avoid potentially 
      * shutting down the domain early. If we halt with interrupts disabled, 
@@ -360,12 +360,11 @@ void hvm_hlt(unsigned long rflags)
      */
     if ( (v->vcpu_id == 0) && !(rflags & X86_EFLAGS_IF) )
     {
-        printk("D%d: HLT with interrupts enabled -- shutting down.\n",
+        printk("D%d: HLT with interrupts disabled -- shutting down.\n",
                current->domain->domain_id);
         domain_shutdown(current->domain, SHUTDOWN_poweroff);
         return;
     }
-#endif /* 0 */
 
     if ( !v->vcpu_id )
         next_pit = get_scheduled(v, pt->irq, pt);

_______________________________________________
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 the APM BIOS to ensure that interrupts are enabled when it, Xen patchbot-unstable <=