Skip to contentSkip to conversation

x86: fix reboot on non-hvm-capable machines

PATCH New Jan Beulich 1 participant 1 message Feb 28, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: fix reboot on non-hvm-capable machines

c/s 14080 made the call to hvm_funcs.disable unconditional, but on machines not capable of (or with disabled) VMX/SVM the function pointer is NULL.

xen/include/asm-x86/hvm/hvm.h +3 -1
Index: 2007-02-27/xen/include/asm-x86/hvm/hvm.h
===================================================================
@@ -139,6 +139,7 @@ struct hvm_function_table {
 };
 
 extern struct hvm_function_table hvm_funcs;
+extern int hvm_enabled;
 
 /*
  * For convenience, we use short hands.
@@ -146,7 +147,8 @@ extern struct hvm_function_table hvm_fun
 static inline void
 hvm_disable(void)
 {
-    hvm_funcs.disable();
+    if (hvm_enabled)
+        hvm_funcs.disable();
 }
 
 int hvm_domain_initialise(struct domain *d);