VirtualBox

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

Last change on this file since 56291 was 56291, checked in by vboxsync, 9 years ago

include: Updated (C) year.

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