bhyverun.c (263780) | bhyverun.c (264916) |
---|---|
1/*- 2 * Copyright (c) 2011 NetApp, Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2011 NetApp, Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/usr.sbin/bhyve/bhyverun.c 263780 2014-03-26 23:34:27Z neel $ | 26 * $FreeBSD: head/usr.sbin/bhyve/bhyverun.c 264916 2014-04-25 13:38:18Z tychon $ |
27 */ 28 29#include <sys/cdefs.h> | 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/usr.sbin/bhyve/bhyverun.c 263780 2014-03-26 23:34:27Z neel $"); | 30__FBSDID("$FreeBSD: head/usr.sbin/bhyve/bhyverun.c 264916 2014-04-25 13:38:18Z tychon $"); |
31 32#include <sys/types.h> 33#include <sys/mman.h> 34#include <sys/time.h> 35 36#include <machine/atomic.h> 37#include <machine/segments.h> 38 --- 237 unchanged lines hidden (view full) --- 276 eax = vme->u.inout.eax; 277 in = vme->u.inout.in; 278 out = !in; 279 280 /* We don't deal with these */ 281 if (vme->u.inout.string || vme->u.inout.rep) 282 return (VMEXIT_ABORT); 283 | 31 32#include <sys/types.h> 33#include <sys/mman.h> 34#include <sys/time.h> 35 36#include <machine/atomic.h> 37#include <machine/segments.h> 38 --- 237 unchanged lines hidden (view full) --- 276 eax = vme->u.inout.eax; 277 in = vme->u.inout.in; 278 out = !in; 279 280 /* We don't deal with these */ 281 if (vme->u.inout.string || vme->u.inout.rep) 282 return (VMEXIT_ABORT); 283 |
284 /* Special case of guest reset */ 285 if (out && port == 0x64 && (uint8_t)eax == 0xFE) 286 return (vmexit_catch_reset()); 287 | |
288 /* Extra-special case of host notifications */ 289 if (out && port == GUEST_NIO_PORT) 290 return (vmexit_handle_notify(ctx, vme, pvcpu, eax)); 291 292 error = emulate_inout(ctx, vcpu, in, port, bytes, &eax, strictio); 293 if (error == INOUT_OK && in) 294 error = vm_set_register(ctx, vcpu, VM_REG_GUEST_RAX, eax); 295 --- 490 unchanged lines hidden --- | 284 /* Extra-special case of host notifications */ 285 if (out && port == GUEST_NIO_PORT) 286 return (vmexit_handle_notify(ctx, vme, pvcpu, eax)); 287 288 error = emulate_inout(ctx, vcpu, in, port, bytes, &eax, strictio); 289 if (error == INOUT_OK && in) 290 error = vm_set_register(ctx, vcpu, VM_REG_GUEST_RAX, eax); 291 --- 490 unchanged lines hidden --- |