VirtualBox

source: vbox/trunk/include/VBox/vmm/vmapi.h@ 93593

Last change on this file since 93593 was 93444, checked in by vboxsync, 3 years ago

VMM,Main,HostServices: Use a function table for accessing the VBoxVMM.dll/so/dylib functionality, and load it dynamically when the Console object is initialized. Also converted a few drivers in Main to use device helpers to get config values and such. bugref:10074

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 19.1 KB
Line 
1/** @file
2 * VM - The Virtual Machine, API.
3 */
4
5/*
6 * Copyright (C) 2006-2022 Oracle Corporation
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * The contents of this file may alternatively be used under the terms
17 * of the Common Development and Distribution License Version 1.0
18 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19 * VirtualBox OSE distribution, in which case the provisions of the
20 * CDDL are applicable instead of those of the GPL.
21 *
22 * You may elect to license modified versions of this file under the
23 * terms and conditions of either the GPL or the CDDL or both.
24 */
25
26#ifndef VBOX_INCLUDED_vmm_vmapi_h
27#define VBOX_INCLUDED_vmm_vmapi_h
28#ifndef RT_WITHOUT_PRAGMA_ONCE
29# pragma once
30#endif
31
32#include <VBox/types.h>
33#include <VBox/vmm/stam.h>
34#include <VBox/vmm/cfgm.h>
35
36#include <iprt/stdarg.h>
37
38RT_C_DECLS_BEGIN
39
40/** @defgroup grp_vm_apis VM All Contexts API
41 * @ingroup grp_vm
42 * @{ */
43
44/** @name VM_EXEC_ENGINE_XXX - VM::bMainExecutionEngine values.
45 * @sa EMR3QueryMainExecutionEngine, VM_IS_RAW_MODE_ENABLED, VM_IS_HM_ENABLED,
46 * VM_IS_HM_OR_NEM_ENABLED, VM_IS_NEM_ENABLED, VM_SET_MAIN_EXECUTION_ENGINE
47 * @{ */
48/** Has not yet been set. */
49#define VM_EXEC_ENGINE_NOT_SET UINT8_C(0)
50/** Raw-mode. */
51#define VM_EXEC_ENGINE_RAW_MODE UINT8_C(1)
52/** Hardware assisted virtualization thru HM. */
53#define VM_EXEC_ENGINE_HW_VIRT UINT8_C(2)
54/** Hardware assisted virtualization thru native API (NEM). */
55#define VM_EXEC_ENGINE_NATIVE_API UINT8_C(3)
56/** @} */
57
58
59/**
60 * VM error callback function.
61 *
62 * @param pUVM The user mode VM handle. Can be NULL if an error
63 * occurred before successfully creating a VM.
64 * @param pvUser The user argument.
65 * @param rc VBox status code.
66 * @param SRC_POS The source position arguments. See RT_SRC_POS and RT_SRC_POS_ARGS.
67 * @param pszFormat Error message format string.
68 * @param args Error message arguments.
69 */
70typedef DECLCALLBACKTYPE(void, FNVMATERROR,(PUVM pUVM, void *pvUser, int rc, RT_SRC_POS_DECL,
71 const char *pszFormat, va_list args));
72/** Pointer to a VM error callback. */
73typedef FNVMATERROR *PFNVMATERROR;
74
75#ifdef IN_RING3
76VMMDECL(int) VMSetError(PVMCC pVM, int rc, RT_SRC_POS_DECL, const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(6, 7);
77VMMDECL(int) VMSetErrorV(PVMCC pVM, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list args) RT_IPRT_FORMAT_ATTR(6, 7);
78#endif
79
80/** @def VM_SET_ERROR
81 * Macro for setting a simple VM error message.
82 * Don't use '%' in the message!
83 *
84 * @returns rc. Meaning you can do:
85 * @code
86 * return VM_SET_ERROR(pVM, VERR_OF_YOUR_CHOICE, "descriptive message");
87 * @endcode
88 * @param pVM The cross context VM structure.
89 * @param rc VBox status code.
90 * @param pszMessage Error message string.
91 * @thread Any
92 */
93#define VM_SET_ERROR(pVM, rc, pszMessage) (VMSetError(pVM, rc, RT_SRC_POS, pszMessage))
94
95/** @def VM_SET_ERROR
96 * Macro for setting a simple VM error message.
97 * Don't use '%' in the message!
98 *
99 * @returns rc. Meaning you can do:
100 * @code
101 * return VM_SET_ERROR(pVM, VERR_OF_YOUR_CHOICE, "descriptive message");
102 * @endcode
103 * @param pVM The cross context VM structure.
104 * @param rc VBox status code.
105 * @param pszMessage Error message string.
106 * @thread Any
107 */
108#define VM_SET_ERROR_U(a_pUVM, a_rc, a_pszMessage) (VMR3SetError(a_pUVM, a_rc, RT_SRC_POS, a_pszMessage))
109
110
111/**
112 * VM runtime error callback function.
113 *
114 * See VMSetRuntimeError for the detailed description of parameters.
115 *
116 * @param pUVM The user mode VM handle.
117 * @param pvUser The user argument.
118 * @param fFlags The error flags.
119 * @param pszErrorId Error ID string.
120 * @param pszFormat Error message format string.
121 * @param va Error message arguments.
122 */
123typedef DECLCALLBACKTYPE(void, FNVMATRUNTIMEERROR,(PUVM pUVM, void *pvUser, uint32_t fFlags, const char *pszErrorId,
124 const char *pszFormat, va_list va)) RT_IPRT_FORMAT_ATTR(5, 0);
125/** Pointer to a VM runtime error callback. */
126typedef FNVMATRUNTIMEERROR *PFNVMATRUNTIMEERROR;
127
128#ifdef IN_RING3
129VMMDECL(int) VMSetRuntimeError(PVMCC pVM, uint32_t fFlags, const char *pszErrorId,
130 const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(4, 5);
131VMMDECL(int) VMSetRuntimeErrorV(PVMCC pVM, uint32_t fFlags, const char *pszErrorId,
132 const char *pszFormat, va_list args) RT_IPRT_FORMAT_ATTR(4, 0);
133#endif
134
135/** @name VMSetRuntimeError fFlags
136 * When no flags are given the VM will continue running and it's up to the front
137 * end to take action on the error condition.
138 *
139 * @{ */
140/** The error is fatal.
141 * The VM is not in a state where it can be saved and will enter a state
142 * where it can no longer execute code. The caller <b>must</b> propagate status
143 * codes. */
144#define VMSETRTERR_FLAGS_FATAL RT_BIT_32(0)
145/** Suspend the VM after, or if possible before, raising the error on EMT. The
146 * caller <b>must</b> propagate status codes. */
147#define VMSETRTERR_FLAGS_SUSPEND RT_BIT_32(1)
148/** Don't wait for the EMT to handle the request.
149 * Only valid when on a worker thread and there is a high risk of a dead
150 * lock. Be careful not to flood the user with errors. */
151#define VMSETRTERR_FLAGS_NO_WAIT RT_BIT_32(2)
152/** @} */
153
154/**
155 * VM state change callback function.
156 *
157 * You are not allowed to call any function which changes the VM state from a
158 * state callback, except VMR3Destroy().
159 *
160 * @param pUVM The user mode VM handle.
161 * @param pVMM The VMM ring-3 vtable.
162 * @param enmState The new state.
163 * @param enmOldState The old state.
164 * @param pvUser The user argument.
165 */
166typedef DECLCALLBACKTYPE(void, FNVMATSTATE,(PUVM pUVM, PCVMMR3VTABLE pVMM, VMSTATE enmState, VMSTATE enmOldState, void *pvUser));
167/** Pointer to a VM state callback. */
168typedef FNVMATSTATE *PFNVMATSTATE;
169
170VMMDECL(const char *) VMGetStateName(VMSTATE enmState);
171
172VMMDECL(uint32_t) VMGetResetCount(PVMCC pVM);
173VMMDECL(uint32_t) VMGetSoftResetCount(PVMCC pVM);
174VMMDECL(uint32_t) VMGetHardResetCount(PVMCC pVM);
175
176
177/**
178 * Request type.
179 */
180typedef enum VMREQTYPE
181{
182 /** Invalid request. */
183 VMREQTYPE_INVALID = 0,
184 /** VM: Internal. */
185 VMREQTYPE_INTERNAL,
186 /** Maximum request type (exclusive). Used for validation. */
187 VMREQTYPE_MAX
188} VMREQTYPE;
189
190/**
191 * Request state.
192 */
193typedef enum VMREQSTATE
194{
195 /** The state is invalid. */
196 VMREQSTATE_INVALID = 0,
197 /** The request have been allocated and is in the process of being filed. */
198 VMREQSTATE_ALLOCATED,
199 /** The request is queued by the requester. */
200 VMREQSTATE_QUEUED,
201 /** The request is begin processed. */
202 VMREQSTATE_PROCESSING,
203 /** The request is completed, the requester is begin notified. */
204 VMREQSTATE_COMPLETED,
205 /** The request packet is in the free chain. (The requester */
206 VMREQSTATE_FREE
207} VMREQSTATE;
208
209/**
210 * Request flags.
211 */
212typedef enum VMREQFLAGS
213{
214 /** The request returns a VBox status code. */
215 VMREQFLAGS_VBOX_STATUS = 0,
216 /** The request is a void request and have no status code. */
217 VMREQFLAGS_VOID = 1,
218 /** Return type mask. */
219 VMREQFLAGS_RETURN_MASK = 1,
220 /** Caller does not wait on the packet, EMT will free it. */
221 VMREQFLAGS_NO_WAIT = 2,
222 /** Poke the destination EMT(s) if executing guest code. Use with care. */
223 VMREQFLAGS_POKE = 4,
224 /** Priority request that can safely be processed while doing async
225 * suspend and power off. */
226 VMREQFLAGS_PRIORITY = 8
227} VMREQFLAGS;
228
229
230/**
231 * VM Request packet.
232 *
233 * This is used to request an action in the EMT. Usually the requester is
234 * another thread, but EMT can also end up being the requester in which case
235 * it's carried out synchronously.
236 */
237typedef struct VMREQ
238{
239 /** Pointer to the next request in the chain. */
240 struct VMREQ * volatile pNext;
241 /** Pointer to ring-3 VM structure which this request belongs to. */
242 PUVM pUVM;
243 /** Request state. */
244 volatile VMREQSTATE enmState;
245 /** VBox status code for the completed request. */
246 volatile int32_t iStatus;
247 /** Requester event sem.
248 * The request can use this event semaphore to wait/poll for completion
249 * of the request.
250 */
251 RTSEMEVENT EventSem;
252 /** Set if the event semaphore is clear. */
253 volatile bool fEventSemClear;
254 /** Flags, VMR3REQ_FLAGS_*. */
255 unsigned fFlags;
256 /** Request type. */
257 VMREQTYPE enmType;
258 /** Request destination. */
259 VMCPUID idDstCpu;
260 /** Request specific data. */
261 union VMREQ_U
262 {
263 /** VMREQTYPE_INTERNAL. */
264 struct
265 {
266 /** Pointer to the function to be called. */
267 PFNRT pfn;
268 /** Number of arguments. */
269 unsigned cArgs;
270 /** Array of arguments. */
271 uintptr_t aArgs[64];
272 } Internal;
273 } u;
274} VMREQ;
275/** Pointer to a VM request packet. */
276typedef VMREQ *PVMREQ;
277
278
279#ifndef IN_RC
280/** @defgroup grp_vmm_apis_hc VM Host Context API
281 * @ingroup grp_vm
282 * @{ */
283
284/** @} */
285#endif
286
287
288#ifdef IN_RING3
289/** @defgroup grp_vmm_apis_r3 VM Host Context Ring 3 API
290 * @ingroup grp_vm
291 * @{ */
292
293/**
294 * Completion notification codes.
295 */
296typedef enum VMINITCOMPLETED
297{
298 /** The ring-3 init is completed. */
299 VMINITCOMPLETED_RING3 = 1,
300 /** The ring-0 init is completed. */
301 VMINITCOMPLETED_RING0,
302 /** The hardware accelerated virtualization init is completed.
303 * Used to make decisision depending on HM* bits being completely
304 * initialized. */
305 VMINITCOMPLETED_HM
306} VMINITCOMPLETED;
307
308
309/** Reason for VM resume. */
310typedef enum VMRESUMEREASON
311{
312 VMRESUMEREASON_INVALID = 0,
313 /** User decided to do so. */
314 VMRESUMEREASON_USER,
315 /** VM reconfiguration (like changing DVD). */
316 VMRESUMEREASON_RECONFIG,
317 /** The host resumed. */
318 VMRESUMEREASON_HOST_RESUME,
319 /** Restored state. */
320 VMRESUMEREASON_STATE_RESTORED,
321 /** Snapshot / saved state. */
322 VMRESUMEREASON_STATE_SAVED,
323 /** Teleported to a new box / instance. */
324 VMRESUMEREASON_TELEPORTED,
325 /** Teleportation failed. */
326 VMRESUMEREASON_TELEPORT_FAILED,
327 /** FTM temporarily suspended the VM. */
328 VMRESUMEREASON_FTM_SYNC,
329 /** End of valid reasons. */
330 VMRESUMEREASON_END,
331 /** Blow the type up to 32-bits. */
332 VMRESUMEREASON_32BIT_HACK = 0x7fffffff
333} VMRESUMEREASON;
334
335/** Reason for VM suspend. */
336typedef enum VMSUSPENDREASON
337{
338 VMSUSPENDREASON_INVALID = 0,
339 /** User decided to do so. */
340 VMSUSPENDREASON_USER,
341 /** VM reconfiguration (like changing DVD). */
342 VMSUSPENDREASON_RECONFIG,
343 /** The VM is suspending itself. */
344 VMSUSPENDREASON_VM,
345 /** The Vm is suspending because of a runtime error. */
346 VMSUSPENDREASON_RUNTIME_ERROR,
347 /** The host was suspended. */
348 VMSUSPENDREASON_HOST_SUSPEND,
349 /** The host is running low on battery power. */
350 VMSUSPENDREASON_HOST_BATTERY_LOW,
351 /** FTM is temporarily suspending the VM. */
352 VMSUSPENDREASON_FTM_SYNC,
353 /** End of valid reasons. */
354 VMSUSPENDREASON_END,
355 /** Blow the type up to 32-bits. */
356 VMSUSPENDREASON_32BIT_HACK = 0x7fffffff
357} VMSUSPENDREASON;
358
359
360/**
361 * Progress callback.
362 *
363 * This will report the completion percentage of an operation.
364 *
365 * @returns VINF_SUCCESS.
366 * @returns Error code to cancel the operation with.
367 * @param pUVM The user mode VM handle.
368 * @param uPercent Completion percentage (0-100).
369 * @param pvUser User specified argument.
370 */
371typedef DECLCALLBACKTYPE(int, FNVMPROGRESS,(PUVM pUVM, unsigned uPercent, void *pvUser));
372/** Pointer to a FNVMPROGRESS function. */
373typedef FNVMPROGRESS *PFNVMPROGRESS;
374
375
376VMMR3DECL(int) VMR3Create(uint32_t cCpus, PCVMM2USERMETHODS pVm2UserCbs,
377 PFNVMATERROR pfnVMAtError, void *pvUserVM,
378 PFNCFGMCONSTRUCTOR pfnCFGMConstructor, void *pvUserCFGM,
379 PVM *ppVM, PUVM *ppUVM);
380VMMR3DECL(int) VMR3PowerOn(PUVM pUVM);
381VMMR3DECL(int) VMR3Suspend(PUVM pUVM, VMSUSPENDREASON enmReason);
382VMMR3DECL(VMSUSPENDREASON) VMR3GetSuspendReason(PUVM);
383VMMR3DECL(int) VMR3Resume(PUVM pUVM, VMRESUMEREASON enmReason);
384VMMR3DECL(VMRESUMEREASON) VMR3GetResumeReason(PUVM);
385VMMR3DECL(int) VMR3Reset(PUVM pUVM);
386VMMR3_INT_DECL(VBOXSTRICTRC) VMR3ResetFF(PVM pVM);
387VMMR3_INT_DECL(VBOXSTRICTRC) VMR3ResetTripleFault(PVM pVM);
388VMMR3DECL(int) VMR3Save(PUVM pUVM, const char *pszFilename, bool fContinueAfterwards, PFNVMPROGRESS pfnProgress, void *pvUser, bool *pfSuspended);
389VMMR3DECL(int) VMR3Teleport(PUVM pUVM, uint32_t cMsDowntime, PCSSMSTRMOPS pStreamOps, void *pvStreamOpsUser, PFNVMPROGRESS pfnProgress, void *pvProgressUser, bool *pfSuspended);
390VMMR3DECL(int) VMR3LoadFromFile(PUVM pUVM, const char *pszFilename, PFNVMPROGRESS pfnProgress, void *pvUser);
391VMMR3DECL(int) VMR3LoadFromStream(PUVM pUVM, PCSSMSTRMOPS pStreamOps, void *pvStreamOpsUser,
392 PFNVMPROGRESS pfnProgress, void *pvProgressUser);
393
394VMMR3DECL(int) VMR3PowerOff(PUVM pUVM);
395VMMR3DECL(int) VMR3Destroy(PUVM pUVM);
396VMMR3_INT_DECL(void) VMR3Relocate(PVM pVM, RTGCINTPTR offDelta);
397
398VMMR3DECL(PVM) VMR3GetVM(PUVM pUVM);
399VMMR3DECL(PUVM) VMR3GetUVM(PVM pVM);
400VMMR3DECL(uint32_t) VMR3RetainUVM(PUVM pUVM);
401VMMR3DECL(uint32_t) VMR3ReleaseUVM(PUVM pUVM);
402VMMR3DECL(const char *) VMR3GetName(PUVM pUVM);
403VMMR3DECL(PRTUUID) VMR3GetUuid(PUVM pUVM, PRTUUID pUuid);
404VMMR3DECL(VMSTATE) VMR3GetState(PVM pVM);
405VMMR3DECL(VMSTATE) VMR3GetStateU(PUVM pUVM);
406VMMR3DECL(const char *) VMR3GetStateName(VMSTATE enmState);
407VMMR3DECL(int) VMR3AtStateRegister(PUVM pUVM, PFNVMATSTATE pfnAtState, void *pvUser);
408VMMR3DECL(int) VMR3AtStateDeregister(PUVM pUVM, PFNVMATSTATE pfnAtState, void *pvUser);
409VMMR3_INT_DECL(bool) VMR3SetGuruMeditation(PVM pVM);
410VMMR3_INT_DECL(bool) VMR3TeleportedAndNotFullyResumedYet(PVM pVM);
411VMMR3DECL(int) VMR3AtErrorRegister(PUVM pUVM, PFNVMATERROR pfnAtError, void *pvUser);
412VMMR3DECL(int) VMR3AtErrorDeregister(PUVM pUVM, PFNVMATERROR pfnAtError, void *pvUser);
413VMMR3DECL(int) VMR3SetError(PUVM pUVM, int rc, RT_SRC_POS_DECL, const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(6, 7);
414VMMR3DECL(int) VMR3SetErrorV(PUVM pUVM, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(6, 0);
415VMMR3_INT_DECL(void) VMR3SetErrorWorker(PVM pVM);
416VMMR3_INT_DECL(uint32_t) VMR3GetErrorCount(PUVM pUVM);
417VMMR3DECL(int) VMR3AtRuntimeErrorRegister(PUVM pUVM, PFNVMATRUNTIMEERROR pfnAtRuntimeError, void *pvUser);
418VMMR3DECL(int) VMR3AtRuntimeErrorDeregister(PUVM pUVM, PFNVMATRUNTIMEERROR pfnAtRuntimeError, void *pvUser);
419VMMR3_INT_DECL(int) VMR3SetRuntimeErrorWorker(PVM pVM);
420VMMR3_INT_DECL(uint32_t) VMR3GetRuntimeErrorCount(PUVM pUVM);
421
422VMMR3DECL(int) VMR3ReqCallU(PUVM pUVM, VMCPUID idDstCpu, PVMREQ *ppReq, RTMSINTERVAL cMillies, uint32_t fFlags, PFNRT pfnFunction, unsigned cArgs, ...);
423VMMR3DECL(int) VMR3ReqCallVU(PUVM pUVM, VMCPUID idDstCpu, PVMREQ *ppReq, RTMSINTERVAL cMillies, uint32_t fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args);
424VMMR3_INT_DECL(int) VMR3ReqCallWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
425VMMR3DECL(int) VMR3ReqCallWaitU(PUVM pUVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
426VMMR3DECL(int) VMR3ReqCallNoWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
427VMMR3DECL(int) VMR3ReqCallNoWaitU(PUVM pUVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
428VMMR3_INT_DECL(int) VMR3ReqCallVoidWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
429VMMR3DECL(int) VMR3ReqCallVoidWaitU(PUVM pUVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
430VMMR3DECL(int) VMR3ReqCallVoidNoWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
431VMMR3DECL(int) VMR3ReqPriorityCallWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
432VMMR3DECL(int) VMR3ReqPriorityCallWaitU(PUVM pUVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
433VMMR3DECL(int) VMR3ReqPriorityCallVoidWaitU(PUVM pUVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
434VMMR3DECL(int) VMR3ReqAlloc(PUVM pUVM, PVMREQ *ppReq, VMREQTYPE enmType, VMCPUID idDstCpu);
435VMMR3DECL(int) VMR3ReqFree(PVMREQ pReq);
436VMMR3DECL(int) VMR3ReqQueue(PVMREQ pReq, RTMSINTERVAL cMillies);
437VMMR3DECL(int) VMR3ReqWait(PVMREQ pReq, RTMSINTERVAL cMillies);
438VMMR3_INT_DECL(int) VMR3ReqProcessU(PUVM pUVM, VMCPUID idDstCpu, bool fPriorityOnly);
439
440/** @name Flags for VMR3NotifyCpuFFU and VMR3NotifyGlobalFFU.
441 * @{ */
442/** Whether we've done REM or not. */
443#define VMNOTIFYFF_FLAGS_DONE_REM RT_BIT_32(0)
444/** Whether we should poke the CPU if it's executing guest code. */
445#define VMNOTIFYFF_FLAGS_POKE RT_BIT_32(1)
446/** @} */
447VMMR3_INT_DECL(void) VMR3NotifyGlobalFFU(PUVM pUVM, uint32_t fFlags);
448VMMR3_INT_DECL(void) VMR3NotifyCpuFFU(PUVMCPU pUVMCpu, uint32_t fFlags);
449VMMR3DECL(int) VMR3NotifyCpuDeviceReady(PVM pVM, VMCPUID idCpu);
450VMMR3_INT_DECL(int) VMR3WaitHalted(PVM pVM, PVMCPU pVCpu, bool fIgnoreInterrupts);
451VMMR3_INT_DECL(int) VMR3WaitU(PUVMCPU pUVMCpu);
452VMMR3DECL(int) VMR3WaitForDeviceReady(PVM pVM, VMCPUID idCpu);
453VMMR3_INT_DECL(int) VMR3AsyncPdmNotificationWaitU(PUVMCPU pUVCpu);
454VMMR3_INT_DECL(void) VMR3AsyncPdmNotificationWakeupU(PUVM pUVM);
455VMMR3_INT_DECL(RTCPUID) VMR3GetVMCPUId(PVM pVM);
456VMMR3_INT_DECL(bool) VMR3IsLongModeAllowed(PVM pVM);
457VMMR3_INT_DECL(RTTHREAD) VMR3GetThreadHandle(PUVMCPU pUVCpu);
458VMMR3DECL(RTTHREAD) VMR3GetVMCPUThread(PUVM pUVM);
459VMMR3DECL(RTNATIVETHREAD) VMR3GetVMCPUNativeThread(PVM pVM);
460VMMR3DECL(RTNATIVETHREAD) VMR3GetVMCPUNativeThreadU(PUVM pUVM);
461VMMR3DECL(int) VMR3GetCpuCoreAndPackageIdFromCpuId(PUVM pUVM, VMCPUID idCpu, uint32_t *pidCpuCore, uint32_t *pidCpuPackage);
462VMMR3_INT_DECL(uint32_t) VMR3GetActiveEmts(PUVM pUVM);
463VMMR3DECL(int) VMR3HotUnplugCpu(PUVM pUVM, VMCPUID idCpu);
464VMMR3DECL(int) VMR3HotPlugCpu(PUVM pUVM, VMCPUID idCpu);
465VMMR3DECL(int) VMR3SetCpuExecutionCap(PUVM pUVM, uint32_t uCpuExecutionCap);
466VMMR3DECL(int) VMR3SetPowerOffInsteadOfReset(PUVM pUVM, bool fPowerOffInsteadOfReset);
467/** @} */
468#endif /* IN_RING3 */
469
470RT_C_DECLS_END
471
472/** @} */
473
474#endif /* !VBOX_INCLUDED_vmm_vmapi_h */
475
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette