Deleted Added
full compact
vmmapi.h (269042) vmmapi.h (276428)
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/lib/libvmmapi/vmmapi.h 269042 2014-07-24 01:38:11Z neel $
26 * $FreeBSD: head/lib/libvmmapi/vmmapi.h 276428 2014-12-30 22:19:34Z neel $
27 */
28
29#ifndef _VMMAPI_H_
30#define _VMMAPI_H_
31
32#include <sys/param.h>
33#include <sys/cpuset.h>
34

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

128 */
129int vm_copy_setup(struct vmctx *ctx, int vcpu, struct vm_guest_paging *pg,
130 uint64_t gla, size_t len, int prot, struct iovec *iov, int iovcnt);
131void vm_copyin(struct vmctx *ctx, int vcpu, struct iovec *guest_iov,
132 void *host_dst, size_t len);
133void vm_copyout(struct vmctx *ctx, int vcpu, const void *host_src,
134 struct iovec *guest_iov, size_t len);
135
27 */
28
29#ifndef _VMMAPI_H_
30#define _VMMAPI_H_
31
32#include <sys/param.h>
33#include <sys/cpuset.h>
34

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

128 */
129int vm_copy_setup(struct vmctx *ctx, int vcpu, struct vm_guest_paging *pg,
130 uint64_t gla, size_t len, int prot, struct iovec *iov, int iovcnt);
131void vm_copyin(struct vmctx *ctx, int vcpu, struct iovec *guest_iov,
132 void *host_dst, size_t len);
133void vm_copyout(struct vmctx *ctx, int vcpu, const void *host_src,
134 struct iovec *guest_iov, size_t len);
135
136/* RTC */
137int vm_rtc_write(struct vmctx *ctx, int offset, uint8_t value);
138int vm_rtc_read(struct vmctx *ctx, int offset, uint8_t *retval);
139int vm_rtc_settime(struct vmctx *ctx, time_t secs);
140int vm_rtc_gettime(struct vmctx *ctx, time_t *secs);
141
136/* Reset vcpu register state */
137int vcpu_reset(struct vmctx *ctx, int vcpu);
138
139int vm_active_cpus(struct vmctx *ctx, cpuset_t *cpus);
140int vm_suspended_cpus(struct vmctx *ctx, cpuset_t *cpus);
141int vm_activate_cpu(struct vmctx *ctx, int vcpu);
142
143/*
144 * FreeBSD specific APIs
145 */
146int vm_setup_freebsd_registers(struct vmctx *ctx, int vcpu,
147 uint64_t rip, uint64_t cr3, uint64_t gdtbase,
148 uint64_t rsp);
149int vm_setup_freebsd_registers_i386(struct vmctx *vmctx, int vcpu,
150 uint32_t eip, uint32_t gdtbase,
151 uint32_t esp);
152void vm_setup_freebsd_gdt(uint64_t *gdtr);
153#endif /* _VMMAPI_H_ */
142/* Reset vcpu register state */
143int vcpu_reset(struct vmctx *ctx, int vcpu);
144
145int vm_active_cpus(struct vmctx *ctx, cpuset_t *cpus);
146int vm_suspended_cpus(struct vmctx *ctx, cpuset_t *cpus);
147int vm_activate_cpu(struct vmctx *ctx, int vcpu);
148
149/*
150 * FreeBSD specific APIs
151 */
152int vm_setup_freebsd_registers(struct vmctx *ctx, int vcpu,
153 uint64_t rip, uint64_t cr3, uint64_t gdtbase,
154 uint64_t rsp);
155int vm_setup_freebsd_registers_i386(struct vmctx *vmctx, int vcpu,
156 uint32_t eip, uint32_t gdtbase,
157 uint32_t esp);
158void vm_setup_freebsd_gdt(uint64_t *gdtr);
159#endif /* _VMMAPI_H_ */