direct-io.hg
changeset 14171:d39dcdb9cca3
hvm: Only do hvm_disable() on HVM-enabled systems.
Original patch by Jan Beulich.
Signed-off-by: Keir Fraser <keir@xensource.com>
Original patch by Jan Beulich.
Signed-off-by: Keir Fraser <keir@xensource.com>
author | kfraser@localhost.localdomain |
---|---|
date | Wed Feb 28 14:44:52 2007 +0000 (2007-02-28) |
parents | 868c28c0a4f4 |
children | 7b35a9682d81 |
files | xen/arch/x86/crash.c xen/arch/x86/hvm/hvm.c xen/arch/x86/smp.c xen/include/asm-x86/hvm/hvm.h xen/include/asm-x86/hvm/support.h |
line diff
1.1 --- a/xen/arch/x86/crash.c Wed Feb 28 14:34:25 2007 +0000 1.2 +++ b/xen/arch/x86/crash.c Wed Feb 28 14:44:52 2007 +0000 1.3 @@ -25,7 +25,7 @@ 1.4 #include <xen/sched.h> 1.5 #include <public/xen.h> 1.6 #include <asm/shared.h> 1.7 -#include <asm/hvm/hvm.h> 1.8 +#include <asm/hvm/support.h> 1.9 1.10 static atomic_t waiting_for_crash_ipi; 1.11 static unsigned int crashing_cpu;
2.1 --- a/xen/arch/x86/hvm/hvm.c Wed Feb 28 14:34:25 2007 +0000 2.2 +++ b/xen/arch/x86/hvm/hvm.c Wed Feb 28 14:44:52 2007 +0000 2.3 @@ -76,6 +76,12 @@ void hvm_enable(struct hvm_function_tabl 2.4 hvm_enabled = 1; 2.5 } 2.6 2.7 +void hvm_disable(void) 2.8 +{ 2.9 + if ( hvm_enabled ) 2.10 + hvm_funcs.disable(); 2.11 +} 2.12 + 2.13 void hvm_stts(struct vcpu *v) 2.14 { 2.15 /* FPU state already dirty? Then no need to setup_fpu() lazily. */
3.1 --- a/xen/arch/x86/smp.c Wed Feb 28 14:34:25 2007 +0000 3.2 +++ b/xen/arch/x86/smp.c Wed Feb 28 14:44:52 2007 +0000 3.3 @@ -21,7 +21,7 @@ 3.4 #include <asm/smpboot.h> 3.5 #include <asm/hardirq.h> 3.6 #include <asm/ipi.h> 3.7 -#include <asm/hvm/hvm.h> 3.8 +#include <asm/hvm/support.h> 3.9 #include <mach_apic.h> 3.10 3.11 /*
4.1 --- a/xen/include/asm-x86/hvm/hvm.h Wed Feb 28 14:34:25 2007 +0000 4.2 +++ b/xen/include/asm-x86/hvm/hvm.h Wed Feb 28 14:44:52 2007 +0000 4.3 @@ -140,15 +140,6 @@ struct hvm_function_table { 4.4 4.5 extern struct hvm_function_table hvm_funcs; 4.6 4.7 -/* 4.8 - * For convenience, we use short hands. 4.9 - */ 4.10 -static inline void 4.11 -hvm_disable(void) 4.12 -{ 4.13 - hvm_funcs.disable(); 4.14 -} 4.15 - 4.16 int hvm_domain_initialise(struct domain *d); 4.17 void hvm_domain_destroy(struct domain *d); 4.18
5.1 --- a/xen/include/asm-x86/hvm/support.h Wed Feb 28 14:34:25 2007 +0000 5.2 +++ b/xen/include/asm-x86/hvm/support.h Wed Feb 28 14:44:52 2007 +0000 5.3 @@ -258,6 +258,7 @@ extern char hvm_io_bitmap[]; 5.4 extern int hvm_enabled; 5.5 5.6 void hvm_enable(struct hvm_function_table *); 5.7 +void hvm_disable(void); 5.8 5.9 int hvm_copy_to_guest_phys(paddr_t paddr, void *buf, int size); 5.10 int hvm_copy_from_guest_phys(void *buf, paddr_t paddr, int size);