vmm.h (cd942e0f257c9d5156cd0a51d73f8b5dcf9b011c) vmm.h (98ed632c63bec8b8cfe7f8849f74ba15657bd06b)
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

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

38struct seg_desc;
39struct vm_exit;
40struct vm_run;
41struct vlapic;
42
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 */
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

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

38struct seg_desc;
39struct vm_exit;
40struct vm_run;
41struct vlapic;
42
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,
47 struct vm_exit *vmexit);
46typedef int (*vmi_run_func_t)(void *vmi, int vcpu, register_t rip);
48typedef void (*vmi_cleanup_func_t)(void *vmi);
49typedef int (*vmi_mmap_func_t)(void *vmi, vm_paddr_t gpa, vm_paddr_t hpa,
50 size_t length, vm_memattr_t attr,
51 int prot, boolean_t superpages_ok);
52typedef int (*vmi_get_register_t)(void *vmi, int vcpu, int num,
53 uint64_t *retval);
54typedef int (*vmi_set_register_t)(void *vmi, int vcpu, int num,
55 uint64_t val);

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

107 int vector, uint32_t error_code, int error_code_valid);
108int vm_inject_nmi(struct vm *vm, int vcpu);
109uint64_t *vm_guest_msrs(struct vm *vm, int cpu);
110struct vlapic *vm_lapic(struct vm *vm, int cpu);
111int vm_get_capability(struct vm *vm, int vcpu, int type, int *val);
112int vm_set_capability(struct vm *vm, int vcpu, int type, int val);
113void vm_activate_cpu(struct vm *vm, int vcpu);
114cpuset_t vm_active_cpus(struct vm *vm);
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);
51typedef int (*vmi_get_register_t)(void *vmi, int vcpu, int num,
52 uint64_t *retval);
53typedef int (*vmi_set_register_t)(void *vmi, int vcpu, int num,
54 uint64_t val);

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

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);
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 *
120 * Return 0 otherwise.
121 */
122int vmm_is_pptdev(int bus, int slot, int func);

--- 144 unchanged lines hidden ---
115
116/*
117 * Return 1 if device indicated by bus/slot/func is supposed to be a
118 * pci passthrough device.
119 *
120 * Return 0 otherwise.
121 */
122int vmm_is_pptdev(int bus, int slot, int func);

--- 144 unchanged lines hidden ---