ia64/xen-unstable
changeset 7205:540d17fe32ce
Clean up sched_op() hypercall interface. One particular
change to watch out for is that the suspend record, on
save/restore, is now passed via register %edx not %esi
(both i386 and x86/64).
Signed-off-by: Keir Fraser <keir@xensource.com>
change to watch out for is that the suspend record, on
save/restore, is now passed via register %edx not %esi
(both i386 and x86/64).
Signed-off-by: Keir Fraser <keir@xensource.com>
line diff
1.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c Tue Oct 04 15:02:51 2005 +0100 1.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c Tue Oct 04 15:34:02 2005 +0100 1.3 @@ -106,7 +106,8 @@ void xen_idle(void) 1.4 local_irq_enable(); 1.5 } else { 1.6 stop_hz_timer(); 1.7 - HYPERVISOR_block(); /* implicit local_irq_enable() */ 1.8 + /* Blocking includes an implicit local_irq_enable(). */ 1.9 + HYPERVISOR_sched_op(SCHEDOP_block, 0); 1.10 start_hz_timer(); 1.11 } 1.12 } 1.13 @@ -122,7 +123,7 @@ static inline void play_dead(void) 1.14 { 1.15 /* Death loop */ 1.16 while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE) 1.17 - HYPERVISOR_yield(); 1.18 + HYPERVISOR_sched_op(SCHEDOP_yield, 0); 1.19 1.20 __flush_tlb_all(); 1.21 /*
2.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c Tue Oct 04 15:02:51 2005 +0100 2.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c Tue Oct 04 15:34:02 2005 +0100 2.3 @@ -1784,7 +1784,7 @@ void __init setup_arch(char **cmdline_p) 2.4 static int 2.5 xen_panic_event(struct notifier_block *this, unsigned long event, void *ptr) 2.6 { 2.7 - HYPERVISOR_crash(); 2.8 + HYPERVISOR_sched_op(SCHEDOP_shutdown, SHUTDOWN_crash); 2.9 /* we're never actually going to get here... */ 2.10 return NOTIFY_DONE; 2.11 }
3.1 --- a/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c Tue Oct 04 15:02:51 2005 +0100 3.2 +++ b/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c Tue Oct 04 15:34:02 2005 +0100 3.3 @@ -26,7 +26,7 @@ void machine_restart(char * __unused) 3.4 /* We really want to get pending console data out before we die. */ 3.5 extern void xencons_force_flush(void); 3.6 xencons_force_flush(); 3.7 - HYPERVISOR_reboot(); 3.8 + HYPERVISOR_sched_op(SCHEDOP_shutdown, SHUTDOWN_reboot); 3.9 } 3.10 3.11 void machine_halt(void) 3.12 @@ -39,7 +39,7 @@ void machine_power_off(void) 3.13 /* We really want to get pending console data out before we die. */ 3.14 extern void xencons_force_flush(void); 3.15 xencons_force_flush(); 3.16 - HYPERVISOR_shutdown(); 3.17 + HYPERVISOR_sched_op(SCHEDOP_shutdown, SHUTDOWN_poweroff); 3.18 } 3.19 3.20 int reboot_thru_bios = 0; /* for dmi_scan.c */
4.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/process.c Tue Oct 04 15:02:51 2005 +0100 4.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/process.c Tue Oct 04 15:34:02 2005 +0100 4.3 @@ -96,7 +96,8 @@ void xen_idle(void) 4.4 local_irq_enable(); 4.5 } else { 4.6 stop_hz_timer(); 4.7 - HYPERVISOR_block(); /* implicit local_irq_enable() */ 4.8 + /* Blocking includes an implicit local_irq_enable(). */ 4.9 + HYPERVISOR_sched_op(SCHEDOP_block, 0); 4.10 start_hz_timer(); 4.11 } 4.12 } 4.13 @@ -114,7 +115,7 @@ static inline void play_dead(void) 4.14 * it "work" for testing purposes. */ 4.15 /* Death loop */ 4.16 while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE) 4.17 - HYPERVISOR_yield(); 4.18 + HYPERVISOR_sched_op(SCHEDOP_yield, 0); 4.19 4.20 local_irq_disable(); 4.21 __flush_tlb_all();
5.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h Tue Oct 04 15:02:51 2005 +0100 5.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h Tue Oct 04 15:34:02 2005 +0100 5.3 @@ -31,6 +31,7 @@ 5.4 #define __HYPERCALL_H__ 5.5 5.6 #include <asm-xen/xen-public/xen.h> 5.7 +#include <asm-xen/xen-public/sched.h> 5.8 5.9 #define _hypercall0(type, name) \ 5.10 ({ \ 5.11 @@ -160,41 +161,10 @@ HYPERVISOR_fpu_taskswitch( 5.12 } 5.13 5.14 static inline int 5.15 -HYPERVISOR_yield( 5.16 - void) 5.17 -{ 5.18 - return _hypercall2(int, sched_op, SCHEDOP_yield, 0); 5.19 -} 5.20 - 5.21 -static inline int 5.22 -HYPERVISOR_block( 5.23 - void) 5.24 -{ 5.25 - return _hypercall2(int, sched_op, SCHEDOP_block, 0); 5.26 -} 5.27 - 5.28 -static inline int 5.29 -HYPERVISOR_shutdown( 5.30 - void) 5.31 +HYPERVISOR_sched_op( 5.32 + int cmd, unsigned long arg) 5.33 { 5.34 - return _hypercall2(int, sched_op, SCHEDOP_shutdown | 5.35 - (SHUTDOWN_poweroff << SCHEDOP_reasonshift), 0); 5.36 -} 5.37 - 5.38 -static inline int 5.39 -HYPERVISOR_reboot( 5.40 - void) 5.41 -{ 5.42 - return _hypercall2(int, sched_op, SCHEDOP_shutdown | 5.43 - (SHUTDOWN_reboot << SCHEDOP_reasonshift), 0); 5.44 -} 5.45 - 5.46 -static inline int 5.47 -HYPERVISOR_crash( 5.48 - void) 5.49 -{ 5.50 - return _hypercall2(int, sched_op, SCHEDOP_shutdown | 5.51 - (SHUTDOWN_crash << SCHEDOP_reasonshift), 0); 5.52 + return _hypercall2(int, sched_op, cmd, arg); 5.53 } 5.54 5.55 static inline long 5.56 @@ -326,19 +296,8 @@ static inline int 5.57 HYPERVISOR_suspend( 5.58 unsigned long srec) 5.59 { 5.60 - int ret; 5.61 - unsigned long ign1, ign2; 5.62 - 5.63 - /* On suspend, control software expects a suspend record in %esi. */ 5.64 - __asm__ __volatile__ ( 5.65 - TRAP_INSTR 5.66 - : "=a" (ret), "=b" (ign1), "=S" (ign2) 5.67 - : "0" (__HYPERVISOR_sched_op), 5.68 - "1" (SCHEDOP_shutdown | (SHUTDOWN_suspend << 5.69 - SCHEDOP_reasonshift)), 5.70 - "2" (srec) : "memory", "ecx"); 5.71 - 5.72 - return ret; 5.73 + return _hypercall3(int, sched_op, SCHEDOP_shutdown, 5.74 + SHUTDOWN_suspend, srec); 5.75 } 5.76 5.77 #endif /* __HYPERCALL_H__ */
6.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-ia64/hypercall.h Tue Oct 04 15:02:51 2005 +0100 6.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-ia64/hypercall.h Tue Oct 04 15:34:02 2005 +0100 6.3 @@ -29,7 +29,9 @@ 6.4 6.5 #ifndef __HYPERCALL_H__ 6.6 #define __HYPERCALL_H__ 6.7 + 6.8 #include <asm-xen/xen-public/xen.h> 6.9 +#include <asm-xen/xen-public/sched.h> 6.10 6.11 /* FIXME: temp place to hold these page related macros */ 6.12 #include <asm/page.h> 6.13 @@ -184,77 +186,9 @@ HYPERVISOR_fpu_taskswitch( 6.14 } 6.15 6.16 static inline int 6.17 -HYPERVISOR_yield( 6.18 - void) 6.19 -{ 6.20 -#if 0 6.21 - int ret; 6.22 - unsigned long ign; 6.23 - 6.24 - __asm__ __volatile__ ( 6.25 - TRAP_INSTR 6.26 - : "=a" (ret), "=b" (ign) 6.27 - : "0" (__HYPERVISOR_sched_op), "1" (SCHEDOP_yield) 6.28 - : "memory" ); 6.29 - 6.30 - return ret; 6.31 -#endif 6.32 - return 1; 6.33 -} 6.34 - 6.35 -static inline int 6.36 -HYPERVISOR_block( 6.37 - void) 6.38 +HYPERVISOR_sched_op( 6.39 + int cmd, unsigned long arg) 6.40 { 6.41 -#if 0 6.42 - int ret; 6.43 - unsigned long ign1; 6.44 - __asm__ __volatile__ ( 6.45 - TRAP_INSTR 6.46 - : "=a" (ret), "=b" (ign1) 6.47 - : "0" (__HYPERVISOR_sched_op), "1" (SCHEDOP_block) 6.48 - : "memory" ); 6.49 - 6.50 - return ret; 6.51 -#endif 6.52 - return 1; 6.53 -} 6.54 - 6.55 -static inline int 6.56 -HYPERVISOR_shutdown( 6.57 - void) 6.58 -{ 6.59 -#if 0 6.60 - int ret; 6.61 - unsigned long ign1; 6.62 - __asm__ __volatile__ ( 6.63 - TRAP_INSTR 6.64 - : "=a" (ret), "=b" (ign1) 6.65 - : "0" (__HYPERVISOR_sched_op), 6.66 - "1" (SCHEDOP_shutdown | (SHUTDOWN_poweroff << SCHEDOP_reasonshift)) 6.67 - : "memory" ); 6.68 - 6.69 - return ret; 6.70 -#endif 6.71 - return 1; 6.72 -} 6.73 - 6.74 -static inline int 6.75 -HYPERVISOR_reboot( 6.76 - void) 6.77 -{ 6.78 -#if 0 6.79 - int ret; 6.80 - unsigned long ign1; 6.81 - __asm__ __volatile__ ( 6.82 - TRAP_INSTR 6.83 - : "=a" (ret), "=b" (ign1) 6.84 - : "0" (__HYPERVISOR_sched_op), 6.85 - "1" (SCHEDOP_shutdown | (SHUTDOWN_reboot << SCHEDOP_reasonshift)) 6.86 - : "memory" ); 6.87 - 6.88 - return ret; 6.89 -#endif 6.90 return 1; 6.91 } 6.92 6.93 @@ -262,39 +196,6 @@ static inline int 6.94 HYPERVISOR_suspend( 6.95 unsigned long srec) 6.96 { 6.97 -#if 0 6.98 - int ret; 6.99 - unsigned long ign1, ign2; 6.100 - 6.101 - /* NB. On suspend, control software expects a suspend record in %esi. */ 6.102 - __asm__ __volatile__ ( 6.103 - TRAP_INSTR 6.104 - : "=a" (ret), "=b" (ign1), "=S" (ign2) 6.105 - : "0" (__HYPERVISOR_sched_op), 6.106 - "b" (SCHEDOP_shutdown | (SHUTDOWN_suspend << SCHEDOP_reasonshift)), 6.107 - "S" (srec) : "memory"); 6.108 - 6.109 - return ret; 6.110 -#endif 6.111 - return 1; 6.112 -} 6.113 - 6.114 -static inline int 6.115 -HYPERVISOR_crash( 6.116 - void) 6.117 -{ 6.118 -#if 0 6.119 - int ret; 6.120 - unsigned long ign1; 6.121 - __asm__ __volatile__ ( 6.122 - TRAP_INSTR 6.123 - : "=a" (ret), "=b" (ign1) 6.124 - : "0" (__HYPERVISOR_sched_op), 6.125 - "1" (SCHEDOP_shutdown | (SHUTDOWN_crash << SCHEDOP_reasonshift)) 6.126 - : "memory" ); 6.127 - 6.128 - return ret; 6.129 -#endif 6.130 return 1; 6.131 } 6.132
7.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h Tue Oct 04 15:02:51 2005 +0100 7.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h Tue Oct 04 15:34:02 2005 +0100 7.3 @@ -35,6 +35,7 @@ 7.4 #define __HYPERCALL_H__ 7.5 7.6 #include <asm-xen/xen-public/xen.h> 7.7 +#include <asm-xen/xen-public/sched.h> 7.8 7.9 #define __syscall_clobber "r11","rcx","memory" 7.10 7.11 @@ -165,33 +166,10 @@ HYPERVISOR_fpu_taskswitch( 7.12 } 7.13 7.14 static inline int 7.15 -HYPERVISOR_yield( 7.16 - void) 7.17 -{ 7.18 - return _hypercall2(int, sched_op, SCHEDOP_yield, 0); 7.19 -} 7.20 - 7.21 -static inline int 7.22 -HYPERVISOR_block( 7.23 - void) 7.24 +HYPERVISOR_sched_op( 7.25 + int cmd, unsigned long arg) 7.26 { 7.27 - return _hypercall2(int, sched_op, SCHEDOP_block, 0); 7.28 -} 7.29 - 7.30 -static inline int 7.31 -HYPERVISOR_shutdown( 7.32 - void) 7.33 -{ 7.34 - return _hypercall2(int, sched_op, SCHEDOP_shutdown | 7.35 - (SHUTDOWN_poweroff << SCHEDOP_reasonshift), 0); 7.36 -} 7.37 - 7.38 -static inline int 7.39 -HYPERVISOR_reboot( 7.40 - void) 7.41 -{ 7.42 - return _hypercall2(int, sched_op, SCHEDOP_shutdown | 7.43 - (SHUTDOWN_reboot << SCHEDOP_reasonshift), 0); 7.44 + return _hypercall2(int, sched_op, cmd, arg); 7.45 } 7.46 7.47 static inline long 7.48 @@ -325,8 +303,8 @@ static inline int 7.49 HYPERVISOR_suspend( 7.50 unsigned long srec) 7.51 { 7.52 - return _hypercall2(int, sched_op, SCHEDOP_shutdown | 7.53 - (SHUTDOWN_suspend << SCHEDOP_reasonshift), srec); 7.54 + return _hypercall3(int, sched_op, SCHEDOP_shutdown, 7.55 + SHUTDOWN_suspend, srec); 7.56 } 7.57 7.58 #endif /* __HYPERCALL_H__ */
8.1 --- a/tools/libxc/xc_linux_restore.c Tue Oct 04 15:02:51 2005 +0100 8.2 +++ b/tools/libxc/xc_linux_restore.c Tue Oct 04 15:34:02 2005 +0100 8.3 @@ -500,13 +500,13 @@ int xc_linux_restore(int xc_handle, int 8.4 } 8.5 8.6 /* Uncanonicalise the suspend-record frame number and poke resume rec. */ 8.7 - pfn = ctxt.user_regs.esi; 8.8 + pfn = ctxt.user_regs.edx; 8.9 if ( (pfn >= nr_pfns) || (pfn_type[pfn] != NOTAB) ) 8.10 { 8.11 ERR("Suspend record frame number is bad"); 8.12 goto out; 8.13 } 8.14 - ctxt.user_regs.esi = mfn = pfn_to_mfn_table[pfn]; 8.15 + ctxt.user_regs.edx = mfn = pfn_to_mfn_table[pfn]; 8.16 start_info = xc_map_foreign_range( 8.17 xc_handle, dom, PAGE_SIZE, PROT_READ | PROT_WRITE, mfn); 8.18 start_info->nr_pages = nr_pfns;
9.1 --- a/tools/libxc/xc_linux_save.c Tue Oct 04 15:02:51 2005 +0100 9.2 +++ b/tools/libxc/xc_linux_save.c Tue Oct 04 15:34:02 2005 +0100 9.3 @@ -978,9 +978,9 @@ int xc_linux_save(int xc_handle, int io_ 9.4 goto out; 9.5 } 9.6 9.7 - DPRINTF("SUSPEND shinfo %08lx eip %08u esi %08u\n", 9.8 + DPRINTF("SUSPEND shinfo %08lx eip %08u edx %08u\n", 9.9 info.shared_info_frame, 9.10 - ctxt.user_regs.eip, ctxt.user_regs.esi); 9.11 + ctxt.user_regs.eip, ctxt.user_regs.edx); 9.12 } 9.13 9.14 if ( xc_shadow_control( xc_handle, dom, 9.15 @@ -1048,7 +1048,7 @@ int xc_linux_save(int xc_handle, int io_ 9.16 } 9.17 9.18 /* Canonicalise the suspend-record frame number. */ 9.19 - if ( !translate_mfn_to_pfn(&ctxt.user_regs.esi) ) 9.20 + if ( !translate_mfn_to_pfn(&ctxt.user_regs.edx) ) 9.21 { 9.22 ERR("Suspend record is not in range of pseudophys map"); 9.23 goto out;
10.1 --- a/tools/libxc/xenctrl.h Tue Oct 04 15:02:51 2005 +0100 10.2 +++ b/tools/libxc/xenctrl.h Tue Oct 04 15:34:02 2005 +0100 10.3 @@ -25,6 +25,7 @@ typedef int64_t s64; 10.4 #include <xen/dom0_ops.h> 10.5 #include <xen/version.h> 10.6 #include <xen/event_channel.h> 10.7 +#include <xen/sched.h> 10.8 #include <xen/sched_ctl.h> 10.9 #include <xen/acm.h> 10.10
11.1 --- a/tools/xenstat/libxenstat/src/xen-interface.h Tue Oct 04 15:02:51 2005 +0100 11.2 +++ b/tools/xenstat/libxenstat/src/xen-interface.h Tue Oct 04 15:34:02 2005 +0100 11.3 @@ -28,6 +28,7 @@ typedef uint64_t u64; 11.4 11.5 #include <xen/xen.h> 11.6 #include <xen/dom0_ops.h> 11.7 +#include <xen/sched.h> 11.8 #include <xen/version.h> 11.9 11.10 /* Opaque handles */
12.1 --- a/xen/arch/x86/vmx.c Tue Oct 04 15:02:51 2005 +0100 12.2 +++ b/xen/arch/x86/vmx.c Tue Oct 04 15:34:02 2005 +0100 12.3 @@ -41,7 +41,7 @@ 12.4 #if CONFIG_PAGING_LEVELS >= 3 12.5 #include <asm/shadow_64.h> 12.6 #endif 12.7 - 12.8 +#include <public/sched.h> 12.9 #include <public/io/ioreq.h> 12.10 12.11 int hvm_enabled;
13.1 --- a/xen/common/domain.c Tue Oct 04 15:02:51 2005 +0100 13.2 +++ b/xen/common/domain.c Tue Oct 04 15:34:02 2005 +0100 13.3 @@ -18,6 +18,7 @@ 13.4 #include <xen/domain_page.h> 13.5 #include <asm/debugger.h> 13.6 #include <public/dom0_ops.h> 13.7 +#include <public/sched.h> 13.8 #include <public/vcpu.h> 13.9 13.10 /* Both these structures are protected by the domlist_lock. */
14.1 --- a/xen/common/schedule.c Tue Oct 04 15:02:51 2005 +0100 14.2 +++ b/xen/common/schedule.c Tue Oct 04 15:34:02 2005 +0100 14.3 @@ -36,6 +36,7 @@ 14.4 #include <xen/softirq.h> 14.5 #include <xen/trace.h> 14.6 #include <xen/mm.h> 14.7 +#include <public/sched.h> 14.8 #include <public/sched_ctl.h> 14.9 14.10 extern void arch_getdomaininfo_ctxt(struct vcpu *, 14.11 @@ -270,11 +271,11 @@ static long do_yield(void) 14.12 return 0; 14.13 } 14.14 14.15 -long do_sched_op(unsigned long op, unsigned long arg) 14.16 +long do_sched_op(int cmd, unsigned long arg) 14.17 { 14.18 long ret = 0; 14.19 14.20 - switch ( op & SCHEDOP_cmdmask ) 14.21 + switch ( cmd ) 14.22 { 14.23 case SCHEDOP_yield: 14.24 { 14.25 @@ -291,9 +292,8 @@ long do_sched_op(unsigned long op, unsig 14.26 case SCHEDOP_shutdown: 14.27 { 14.28 TRACE_3D(TRC_SCHED_SHUTDOWN, 14.29 - current->domain->domain_id, current->vcpu_id, 14.30 - (op >> SCHEDOP_reasonshift)); 14.31 - domain_shutdown((u8)(op >> SCHEDOP_reasonshift)); 14.32 + current->domain->domain_id, current->vcpu_id, arg); 14.33 + domain_shutdown((u8)arg); 14.34 break; 14.35 } 14.36
15.1 --- a/xen/include/public/dom0_ops.h Tue Oct 04 15:02:51 2005 +0100 15.2 +++ b/xen/include/public/dom0_ops.h Tue Oct 04 15:34:02 2005 +0100 15.3 @@ -19,7 +19,7 @@ 15.4 * This makes sure that old versions of dom0 tools will stop working in a 15.5 * well-defined way (rather than crashing the machine, for instance). 15.6 */ 15.7 -#define DOM0_INTERFACE_VERSION 0xAAAA1010 15.8 +#define DOM0_INTERFACE_VERSION 0xAAAA1011 15.9 15.10 /************************************************************************/ 15.11
16.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 16.2 +++ b/xen/include/public/sched.h Tue Oct 04 15:34:02 2005 +0100 16.3 @@ -0,0 +1,50 @@ 16.4 +/****************************************************************************** 16.5 + * sched.h 16.6 + * 16.7 + * Scheduler state interactions 16.8 + * 16.9 + * Copyright (c) 2005, Keir Fraser <keir@xensource.com> 16.10 + */ 16.11 + 16.12 +#ifndef __XEN_PUBLIC_SCHED_H__ 16.13 +#define __XEN_PUBLIC_SCHED_H__ 16.14 + 16.15 +/* 16.16 + * Prototype for this hypercall is: 16.17 + * int sched_op(int cmd, unsigned long arg) 16.18 + * @cmd == SCHEDOP_??? (scheduler operation). 16.19 + * @arg == Operation-specific extra argument(s). 16.20 + */ 16.21 + 16.22 +/* 16.23 + * Voluntarily yield the CPU. 16.24 + * @arg == 0. 16.25 + */ 16.26 +#define SCHEDOP_yield 0 16.27 + 16.28 +/* 16.29 + * Block execution of this VCPU until an event is received for processing. 16.30 + * If called with event upcalls masked, this operation will atomically 16.31 + * reenable event delivery and check for pending events before blocking the 16.32 + * VCPU. This avoids a "wakeup waiting" race. 16.33 + * @arg == 0. 16.34 + */ 16.35 +#define SCHEDOP_block 1 16.36 + 16.37 +/* 16.38 + * Halt execution of this domain (all VCPUs) and notify the system controller. 16.39 + * @arg == SHUTDOWN_??? (reason for shutdown). 16.40 + */ 16.41 +#define SCHEDOP_shutdown 2 16.42 + 16.43 +/* 16.44 + * Reason codes for SCHEDOP_shutdown. These may be interpreted by controller 16.45 + * software to determine the appropriate action. For the most part, Xen does 16.46 + * not care about the shutdown code. 16.47 + */ 16.48 +#define SHUTDOWN_poweroff 0 /* Domain exited normally. Clean up and kill. */ 16.49 +#define SHUTDOWN_reboot 1 /* Clean up, kill, and then restart. */ 16.50 +#define SHUTDOWN_suspend 2 /* Clean up, save suspend info, kill. */ 16.51 +#define SHUTDOWN_crash 3 /* Tell controller we've crashed. */ 16.52 + 16.53 +#endif /* __XEN_PUBLIC_SCHED_H__ */
17.1 --- a/xen/include/public/xen.h Tue Oct 04 15:02:51 2005 +0100 17.2 +++ b/xen/include/public/xen.h Tue Oct 04 15:34:02 2005 +0100 17.3 @@ -196,25 +196,6 @@ struct mmuext_op { 17.4 #define UVMF_ALL (1UL<<2) /* Flush all TLBs. */ 17.5 17.6 /* 17.7 - * Commands to HYPERVISOR_sched_op(). 17.8 - */ 17.9 -#define SCHEDOP_yield 0 /* Give up the CPU voluntarily. */ 17.10 -#define SCHEDOP_block 1 /* Block until an event is received. */ 17.11 -#define SCHEDOP_shutdown 2 /* Stop executing this domain. */ 17.12 -#define SCHEDOP_cmdmask 255 /* 8-bit command. */ 17.13 -#define SCHEDOP_reasonshift 8 /* 8-bit reason code. (SCHEDOP_shutdown) */ 17.14 - 17.15 -/* 17.16 - * Reason codes for SCHEDOP_shutdown. These may be interpreted by control 17.17 - * software to determine the appropriate action. For the most part, Xen does 17.18 - * not care about the shutdown code (SHUTDOWN_crash excepted). 17.19 - */ 17.20 -#define SHUTDOWN_poweroff 0 /* Domain exited normally. Clean up and kill. */ 17.21 -#define SHUTDOWN_reboot 1 /* Clean up, kill, and then restart. */ 17.22 -#define SHUTDOWN_suspend 2 /* Clean up, save suspend info, kill. */ 17.23 -#define SHUTDOWN_crash 3 /* Tell controller we've crashed. */ 17.24 - 17.25 -/* 17.26 * Commands to HYPERVISOR_console_io(). 17.27 */ 17.28 #define CONSOLEIO_write 0