xen_machdep.c (215813) | xen_machdep.c (215818) |
---|---|
1/* 2 * 3 * Copyright (c) 2004 Christian Limpach. 4 * Copyright (c) 2004-2006,2008 Kip Macy 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 17 unchanged lines hidden (view full) --- 26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> | 1/* 2 * 3 * Copyright (c) 2004 Christian Limpach. 4 * Copyright (c) 2004-2006,2008 Kip Macy 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 17 unchanged lines hidden (view full) --- 26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/sys/i386/xen/xen_machdep.c 215813 2010-11-25 04:45:31Z cperciva $"); | 34__FBSDID("$FreeBSD: head/sys/i386/xen/xen_machdep.c 215818 2010-11-25 15:05:21Z cperciva $"); |
35 36#include <sys/param.h> 37#include <sys/systm.h> 38#include <sys/bus.h> 39#include <sys/ktr.h> 40#include <sys/lock.h> 41#include <sys/mount.h> 42#include <sys/malloc.h> --- 1129 unchanged lines hidden (view full) --- 1172 {16, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(fpu)}, 1173 {17, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(align)}, 1174 {18, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(mchk)}, 1175 {19, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(xmm)}, 1176 {0x80, 3, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(int0x80_syscall)}, 1177 { 0, 0, 0, 0 } 1178}; 1179 | 35 36#include <sys/param.h> 37#include <sys/systm.h> 38#include <sys/bus.h> 39#include <sys/ktr.h> 40#include <sys/lock.h> 41#include <sys/mount.h> 42#include <sys/malloc.h> --- 1129 unchanged lines hidden (view full) --- 1172 {16, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(fpu)}, 1173 {17, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(align)}, 1174 {18, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(mchk)}, 1175 {19, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(xmm)}, 1176 {0x80, 3, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(int0x80_syscall)}, 1177 { 0, 0, 0, 0 } 1178}; 1179 |
1180/* Perform a multicall and check that individual calls succeeded. */ 1181int 1182HYPERVISOR_multicall(struct multicall_entry * call_list, int nr_calls) 1183{ 1184 int ret = 0; 1185 int i; |
|
1180 | 1186 |
1187 /* Perform the multicall. */ 1188 PANIC_IF(_HYPERVISOR_multicall(call_list, nr_calls)); 1189 1190 /* Check the results of individual hypercalls. */ 1191 for (i = 0; i < nr_calls; i++) 1192 if (unlikely(call_list[i].result < 0)) 1193 ret++; 1194 if (unlikely(ret > 0)) 1195 panic("%d multicall(s) failed: cpu %d\n", 1196 ret, smp_processor_id()); 1197 1198 /* If we didn't panic already, everything succeeded. */ 1199 return (0); 1200} 1201 |
|
1181/********** CODE WORTH KEEPING ABOVE HERE *****************/ 1182 1183void xen_failsafe_handler(void); 1184 1185void 1186xen_failsafe_handler(void) 1187{ 1188 --- 40 unchanged lines hidden --- | 1202/********** CODE WORTH KEEPING ABOVE HERE *****************/ 1203 1204void xen_failsafe_handler(void); 1205 1206void 1207xen_failsafe_handler(void) 1208{ 1209 --- 40 unchanged lines hidden --- |