Deleted Added
full compact
bhyverun.c (330449) bhyverun.c (336161)
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 *
4 * Copyright (c) 2011 NetApp, Inc.
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

--- 11 unchanged lines hidden (view full) ---

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 *
4 * Copyright (c) 2011 NetApp, Inc.
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

--- 11 unchanged lines hidden (view full) ---

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * $FreeBSD: stable/11/usr.sbin/bhyve/bhyverun.c 330449 2018-03-05 07:26:05Z eadler $
28 * $FreeBSD: stable/11/usr.sbin/bhyve/bhyverun.c 336161 2018-07-10 04:26:32Z araujo $
29 */
30
31#include <sys/cdefs.h>
29 */
30
31#include <sys/cdefs.h>
32__FBSDID("$FreeBSD: stable/11/usr.sbin/bhyve/bhyverun.c 330449 2018-03-05 07:26:05Z eadler $");
32__FBSDID("$FreeBSD: stable/11/usr.sbin/bhyve/bhyverun.c 336161 2018-07-10 04:26:32Z araujo $");
33
34#include <sys/types.h>
35#ifndef WITHOUT_CAPSICUM
36#include <sys/capsicum.h>
37#endif
38#include <sys/mman.h>
39#include <sys/time.h>
40

--- 69 unchanged lines hidden (view full) ---

110
111static cpuset_t cpumask;
112
113static void vm_loop(struct vmctx *ctx, int vcpu, uint64_t rip);
114
115static struct vm_exit vmexit[VM_MAXCPU];
116
117struct bhyvestats {
33
34#include <sys/types.h>
35#ifndef WITHOUT_CAPSICUM
36#include <sys/capsicum.h>
37#endif
38#include <sys/mman.h>
39#include <sys/time.h>
40

--- 69 unchanged lines hidden (view full) ---

110
111static cpuset_t cpumask;
112
113static void vm_loop(struct vmctx *ctx, int vcpu, uint64_t rip);
114
115static struct vm_exit vmexit[VM_MAXCPU];
116
117struct bhyvestats {
118 uint64_t vmexit_bogus;
118 uint64_t vmexit_bogus;
119 uint64_t vmexit_reqidle;
119 uint64_t vmexit_reqidle;
120 uint64_t vmexit_hlt;
121 uint64_t vmexit_pause;
122 uint64_t vmexit_mtrap;
123 uint64_t vmexit_inst_emul;
124 uint64_t cpu_switch_rotate;
125 uint64_t cpu_switch_direct;
120 uint64_t vmexit_hlt;
121 uint64_t vmexit_pause;
122 uint64_t vmexit_mtrap;
123 uint64_t vmexit_inst_emul;
124 uint64_t cpu_switch_rotate;
125 uint64_t cpu_switch_direct;
126} stats;
127
128struct mt_vmm_info {
129 pthread_t mt_thr;
130 struct vmctx *mt_ctx;
131 int mt_vcpu;
132} mt_vmm_info[VM_MAXCPU];
133

--- 215 unchanged lines hidden (view full) ---

349vmexit_handle_notify(struct vmctx *ctx, struct vm_exit *vme, int *pvcpu,
350 uint32_t eax)
351{
352#if BHYVE_DEBUG
353 /*
354 * put guest-driven debug here
355 */
356#endif
126} stats;
127
128struct mt_vmm_info {
129 pthread_t mt_thr;
130 struct vmctx *mt_ctx;
131 int mt_vcpu;
132} mt_vmm_info[VM_MAXCPU];
133

--- 215 unchanged lines hidden (view full) ---

349vmexit_handle_notify(struct vmctx *ctx, struct vm_exit *vme, int *pvcpu,
350 uint32_t eax)
351{
352#if BHYVE_DEBUG
353 /*
354 * put guest-driven debug here
355 */
356#endif
357 return (VMEXIT_CONTINUE);
357 return (VMEXIT_CONTINUE);
358}
359
360static int
361vmexit_inout(struct vmctx *ctx, struct vm_exit *vme, int *pvcpu)
362{
363 int error;
364 int bytes, port, in, out;
365 int vcpu;

--- 686 unchanged lines hidden ---
358}
359
360static int
361vmexit_inout(struct vmctx *ctx, struct vm_exit *vme, int *pvcpu)
362{
363 int error;
364 int bytes, port, in, out;
365 int vcpu;

--- 686 unchanged lines hidden ---