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: Only do hvm_disable() on HVM-enabled

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] hvm: Only do hvm_disable() on HVM-enabled systems.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 28 Feb 2007 12:20:30 -0800
Delivery-date: Wed, 28 Feb 2007 12:22:16 -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
# Date 1172673892 0
# Node ID d39dcdb9cca36d27d0c509640a15c03800bf706e
# Parent  868c28c0a4f4384014d170dad0a720ca99b0b3e9
hvm: Only do hvm_disable() on HVM-enabled systems.

Original patch by Jan Beulich.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/crash.c              |    2 +-
 xen/arch/x86/hvm/hvm.c            |    6 ++++++
 xen/arch/x86/smp.c                |    2 +-
 xen/include/asm-x86/hvm/hvm.h     |    9 ---------
 xen/include/asm-x86/hvm/support.h |    1 +
 5 files changed, 9 insertions(+), 11 deletions(-)

diff -r 868c28c0a4f4 -r d39dcdb9cca3 xen/arch/x86/crash.c
--- a/xen/arch/x86/crash.c      Wed Feb 28 14:34:25 2007 +0000
+++ b/xen/arch/x86/crash.c      Wed Feb 28 14:44:52 2007 +0000
@@ -25,7 +25,7 @@
 #include <xen/sched.h>
 #include <public/xen.h>
 #include <asm/shared.h>
-#include <asm/hvm/hvm.h>
+#include <asm/hvm/support.h>
 
 static atomic_t waiting_for_crash_ipi;
 static unsigned int crashing_cpu;
diff -r 868c28c0a4f4 -r d39dcdb9cca3 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Wed Feb 28 14:34:25 2007 +0000
+++ b/xen/arch/x86/hvm/hvm.c    Wed Feb 28 14:44:52 2007 +0000
@@ -74,6 +74,12 @@ void hvm_enable(struct hvm_function_tabl
 
     hvm_funcs   = *fns;
     hvm_enabled = 1;
+}
+
+void hvm_disable(void)
+{
+    if ( hvm_enabled )
+        hvm_funcs.disable();
 }
 
 void hvm_stts(struct vcpu *v)
diff -r 868c28c0a4f4 -r d39dcdb9cca3 xen/arch/x86/smp.c
--- a/xen/arch/x86/smp.c        Wed Feb 28 14:34:25 2007 +0000
+++ b/xen/arch/x86/smp.c        Wed Feb 28 14:44:52 2007 +0000
@@ -21,7 +21,7 @@
 #include <asm/smpboot.h>
 #include <asm/hardirq.h>
 #include <asm/ipi.h>
-#include <asm/hvm/hvm.h>
+#include <asm/hvm/support.h>
 #include <mach_apic.h>
 
 /*
diff -r 868c28c0a4f4 -r d39dcdb9cca3 xen/include/asm-x86/hvm/hvm.h
--- a/xen/include/asm-x86/hvm/hvm.h     Wed Feb 28 14:34:25 2007 +0000
+++ b/xen/include/asm-x86/hvm/hvm.h     Wed Feb 28 14:44:52 2007 +0000
@@ -140,15 +140,6 @@ struct hvm_function_table {
 
 extern struct hvm_function_table hvm_funcs;
 
-/*
- * For convenience, we use short hands.
- */
-static inline void
-hvm_disable(void)
-{
-    hvm_funcs.disable();
-}
-
 int hvm_domain_initialise(struct domain *d);
 void hvm_domain_destroy(struct domain *d);
 
diff -r 868c28c0a4f4 -r d39dcdb9cca3 xen/include/asm-x86/hvm/support.h
--- a/xen/include/asm-x86/hvm/support.h Wed Feb 28 14:34:25 2007 +0000
+++ b/xen/include/asm-x86/hvm/support.h Wed Feb 28 14:44:52 2007 +0000
@@ -258,6 +258,7 @@ extern int hvm_enabled;
 extern int hvm_enabled;
 
 void hvm_enable(struct hvm_function_table *);
+void hvm_disable(void);
 
 int hvm_copy_to_guest_phys(paddr_t paddr, void *buf, int size);
 int hvm_copy_from_guest_phys(void *buf, paddr_t paddr, int size);

_______________________________________________
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: Only do hvm_disable() on HVM-enabled systems., Xen patchbot-unstable <=