Deleted Added
full compact
vmm.h (240912) vmm.h (240922)
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

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

35
36struct vm;
37struct vm_memory_segment;
38struct seg_desc;
39struct vm_exit;
40struct vm_run;
41struct vlapic;
42
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

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

35
36struct vm;
37struct vm_memory_segment;
38struct seg_desc;
39struct vm_exit;
40struct vm_run;
41struct vlapic;
42
43enum x2apic_state;
44
43typedef int (*vmm_init_func_t)(void);
44typedef int (*vmm_cleanup_func_t)(void);
45typedef void * (*vmi_init_func_t)(struct vm *vm); /* instance specific apis */
46typedef int (*vmi_run_func_t)(void *vmi, int vcpu, register_t rip);
47typedef void (*vmi_cleanup_func_t)(void *vmi);
48typedef int (*vmi_mmap_func_t)(void *vmi, vm_paddr_t gpa, vm_paddr_t hpa,
49 size_t length, vm_memattr_t attr,
50 int prot, boolean_t superpages_ok);

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

104int vm_run(struct vm *vm, struct vm_run *vmrun);
105int vm_inject_event(struct vm *vm, int vcpu, int type,
106 int vector, uint32_t error_code, int error_code_valid);
107int vm_inject_nmi(struct vm *vm, int vcpu);
108uint64_t *vm_guest_msrs(struct vm *vm, int cpu);
109struct vlapic *vm_lapic(struct vm *vm, int cpu);
110int vm_get_capability(struct vm *vm, int vcpu, int type, int *val);
111int vm_set_capability(struct vm *vm, int vcpu, int type, int val);
45typedef int (*vmm_init_func_t)(void);
46typedef int (*vmm_cleanup_func_t)(void);
47typedef void * (*vmi_init_func_t)(struct vm *vm); /* instance specific apis */
48typedef int (*vmi_run_func_t)(void *vmi, int vcpu, register_t rip);
49typedef void (*vmi_cleanup_func_t)(void *vmi);
50typedef int (*vmi_mmap_func_t)(void *vmi, vm_paddr_t gpa, vm_paddr_t hpa,
51 size_t length, vm_memattr_t attr,
52 int prot, boolean_t superpages_ok);

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

106int vm_run(struct vm *vm, struct vm_run *vmrun);
107int vm_inject_event(struct vm *vm, int vcpu, int type,
108 int vector, uint32_t error_code, int error_code_valid);
109int vm_inject_nmi(struct vm *vm, int vcpu);
110uint64_t *vm_guest_msrs(struct vm *vm, int cpu);
111struct vlapic *vm_lapic(struct vm *vm, int cpu);
112int vm_get_capability(struct vm *vm, int vcpu, int type, int *val);
113int vm_set_capability(struct vm *vm, int vcpu, int type, int val);
114int vm_get_x2apic_state(struct vm *vm, int vcpu, enum x2apic_state *state);
115int vm_set_x2apic_state(struct vm *vm, int vcpu, enum x2apic_state state);
112void vm_activate_cpu(struct vm *vm, int vcpu);
113cpuset_t vm_active_cpus(struct vm *vm);
114struct vm_exit *vm_exitinfo(struct vm *vm, int vcpuid);
115
116/*
117 * Return 1 if device indicated by bus/slot/func is supposed to be a
118 * pci passthrough device.
119 *

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

200enum vm_cap_type {
201 VM_CAP_HALT_EXIT,
202 VM_CAP_MTRAP_EXIT,
203 VM_CAP_PAUSE_EXIT,
204 VM_CAP_UNRESTRICTED_GUEST,
205 VM_CAP_MAX
206};
207
116void vm_activate_cpu(struct vm *vm, int vcpu);
117cpuset_t vm_active_cpus(struct vm *vm);
118struct vm_exit *vm_exitinfo(struct vm *vm, int vcpuid);
119
120/*
121 * Return 1 if device indicated by bus/slot/func is supposed to be a
122 * pci passthrough device.
123 *

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

204enum vm_cap_type {
205 VM_CAP_HALT_EXIT,
206 VM_CAP_MTRAP_EXIT,
207 VM_CAP_PAUSE_EXIT,
208 VM_CAP_UNRESTRICTED_GUEST,
209 VM_CAP_MAX
210};
211
212enum x2apic_state {
213 X2APIC_ENABLED,
214 X2APIC_AVAILABLE,
215 X2APIC_DISABLED,
216 X2APIC_STATE_LAST
217};
218
208/*
209 * The 'access' field has the format specified in Table 21-2 of the Intel
210 * Architecture Manual vol 3b.
211 *
212 * XXX The contents of the 'access' field are architecturally defined except
213 * bit 16 - Segment Unusable.
214 */
215struct seg_desc {

--- 56 unchanged lines hidden ---
219/*
220 * The 'access' field has the format specified in Table 21-2 of the Intel
221 * Architecture Manual vol 3b.
222 *
223 * XXX The contents of the 'access' field are architecturally defined except
224 * bit 16 - Segment Unusable.
225 */
226struct seg_desc {

--- 56 unchanged lines hidden ---