VirtualBox

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

Last change on this file since 87835 was 85121, checked in by vboxsync, 4 years ago

iprt/cdefs.h: Refactored the typedef use of DECLCALLBACK as well as DECLCALLBACKMEMBER to wrap the whole expression, similar to the DECLR?CALLBACKMEMBER macros. This allows adding a throw() at the end when compiling with the VC++ compiler to indicate that the callbacks won't throw anything, so we can stop supressing the C5039 warning about passing functions that can potential throw C++ exceptions to extern C code that can't necessarily cope with such (unwind,++). Introduced a few _EX variations that allows specifying different/no calling convention too, as that's handy when dynamically resolving host APIs. Fixed numerous places missing DECLCALLBACK and such. Left two angry @todos regarding use of CreateThread. bugref:9794

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