VirtualBox

source: vbox/trunk/include/VBox/vmm/vmm.h@ 44519

Last change on this file since 44519 was 44394, checked in by vboxsync, 12 years ago

+VMMR3GetCpuByIdU, -FNATOMICHANDLER

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 18.9 KB
Line 
1/** @file
2 * VMM - The Virtual Machine Monitor.
3 */
4
5/*
6 * Copyright (C) 2006-2013 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_vmm_h
27#define ___VBox_vmm_vmm_h
28
29#include <VBox/types.h>
30#include <VBox/vmm/vmapi.h>
31#include <VBox/sup.h>
32#include <VBox/log.h>
33#include <iprt/stdarg.h>
34
35RT_C_DECLS_BEGIN
36
37/** @defgroup grp_vmm The Virtual Machine Monitor API
38 * @{
39 */
40
41/**
42 * World switcher identifiers.
43 */
44typedef enum VMMSWITCHER
45{
46 /** The usual invalid 0. */
47 VMMSWITCHER_INVALID = 0,
48 /** Switcher for 32-bit host to 32-bit shadow paging. */
49 VMMSWITCHER_32_TO_32,
50 /** Switcher for 32-bit host paging to PAE shadow paging. */
51 VMMSWITCHER_32_TO_PAE,
52 /** Switcher for 32-bit host paging to AMD64 shadow paging. */
53 VMMSWITCHER_32_TO_AMD64,
54 /** Switcher for PAE host to 32-bit shadow paging. */
55 VMMSWITCHER_PAE_TO_32,
56 /** Switcher for PAE host to PAE shadow paging. */
57 VMMSWITCHER_PAE_TO_PAE,
58 /** Switcher for PAE host paging to AMD64 shadow paging. */
59 VMMSWITCHER_PAE_TO_AMD64,
60 /** Switcher for AMD64 host paging to 32-bit shadow paging. */
61 VMMSWITCHER_AMD64_TO_32,
62 /** Switcher for AMD64 host paging to PAE shadow paging. */
63 VMMSWITCHER_AMD64_TO_PAE,
64 /** Switcher for AMD64 host paging to AMD64 shadow paging. */
65 VMMSWITCHER_AMD64_TO_AMD64,
66 /** Used to make a count for array declarations and suchlike. */
67 VMMSWITCHER_MAX,
68 /** The usual 32-bit paranoia. */
69 VMMSWITCHER_32BIT_HACK = 0x7fffffff
70} VMMSWITCHER;
71
72
73/**
74 * VMMRZCallRing3 operations.
75 */
76typedef enum VMMCALLRING3
77{
78 /** Invalid operation. */
79 VMMCALLRING3_INVALID = 0,
80 /** Acquire the PDM lock. */
81 VMMCALLRING3_PDM_LOCK,
82 /** Acquire the critical section specified as argument. */
83 VMMCALLRING3_PDM_CRIT_SECT_ENTER,
84 /** Acquire the PGM lock. */
85 VMMCALLRING3_PGM_LOCK,
86 /** Grow the PGM shadow page pool. */
87 VMMCALLRING3_PGM_POOL_GROW,
88 /** Maps a chunk into ring-3. */
89 VMMCALLRING3_PGM_MAP_CHUNK,
90 /** Allocates more handy pages. */
91 VMMCALLRING3_PGM_ALLOCATE_HANDY_PAGES,
92 /** Allocates a large (2MB) page. */
93 VMMCALLRING3_PGM_ALLOCATE_LARGE_HANDY_PAGE,
94 /** Acquire the MM hypervisor heap lock. */
95 VMMCALLRING3_MMHYPER_LOCK,
96 /** Replay the REM handler notifications. */
97 VMMCALLRING3_REM_REPLAY_HANDLER_NOTIFICATIONS,
98 /** Flush the GC/R0 logger. */
99 VMMCALLRING3_VMM_LOGGER_FLUSH,
100 /** Set the VM error message. */
101 VMMCALLRING3_VM_SET_ERROR,
102 /** Set the VM runtime error message. */
103 VMMCALLRING3_VM_SET_RUNTIME_ERROR,
104 /** Signal a ring 0 assertion. */
105 VMMCALLRING3_VM_R0_ASSERTION,
106 /** Ring switch to force preemption. */
107 VMMCALLRING3_VM_R0_PREEMPT,
108 /** Sync the FTM state with the standby node. */
109 VMMCALLRING3_FTM_SET_CHECKPOINT,
110 /** The usual 32-bit hack. */
111 VMMCALLRING3_32BIT_HACK = 0x7fffffff
112} VMMCALLRING3;
113
114/**
115 * Rendezvous callback.
116 *
117 * @returns VBox strict status code - EM scheduling. Do not return
118 * informational status code other than the ones used by EM for
119 * scheduling.
120 *
121 * @param pVM The VM handle.
122 * @param pVCpu The handle of the calling virtual CPU.
123 * @param pvUser The user argument.
124 */
125typedef DECLCALLBACK(VBOXSTRICTRC) FNVMMEMTRENDEZVOUS(PVM pVM, PVMCPU pVCpu, void *pvUser);
126/** Pointer to a rendezvous callback function. */
127typedef FNVMMEMTRENDEZVOUS *PFNVMMEMTRENDEZVOUS;
128
129/**
130 * Method table that the VMM uses to call back the user of the VMM.
131 */
132typedef struct VMM2USERMETHODS
133{
134 /** Magic value (VMM2USERMETHODS_MAGIC). */
135 uint32_t u32Magic;
136 /** Structure version (VMM2USERMETHODS_VERSION). */
137 uint32_t u32Version;
138
139 /**
140 * Save the VM state.
141 *
142 * @returns VBox status code.
143 * @param pThis Pointer to the callback method table.
144 * @param pUVM The user mode VM handle.
145 *
146 * @remarks This member shall be set to NULL if the operation is not
147 * supported.
148 */
149 DECLR3CALLBACKMEMBER(int, pfnSaveState,(PCVMM2USERMETHODS pThis, PUVM pUVM));
150 /** @todo Move pfnVMAtError and pfnCFGMConstructor here? */
151
152 /**
153 * EMT initialization notification callback.
154 *
155 * This is intended for doing per-thread initialization for EMTs (like COM
156 * init).
157 *
158 * @param pThis Pointer to the callback method table.
159 * @param pUVM The user mode VM handle.
160 * @param pUVCpu The user mode virtual CPU handle.
161 *
162 * @remarks This is optional and shall be set to NULL if not wanted.
163 */
164 DECLR3CALLBACKMEMBER(void, pfnNotifyEmtInit,(PCVMM2USERMETHODS pThis, PUVM pUVM, PUVMCPU pUVCpu));
165
166 /**
167 * EMT termination notification callback.
168 *
169 * This is intended for doing per-thread cleanups for EMTs (like COM).
170 *
171 * @param pThis Pointer to the callback method table.
172 * @param pUVM The user mode VM handle.
173 * @param pUVCpu The user mode virtual CPU handle.
174 *
175 * @remarks This is optional and shall be set to NULL if not wanted.
176 */
177 DECLR3CALLBACKMEMBER(void, pfnNotifyEmtTerm,(PCVMM2USERMETHODS pThis, PUVM pUVM, PUVMCPU pUVCpu));
178
179 /**
180 * PDM thread initialization notification callback.
181 *
182 * This is intended for doing per-thread initialization (like COM init).
183 *
184 * @param pThis Pointer to the callback method table.
185 * @param pUVM The user mode VM handle.
186 *
187 * @remarks This is optional and shall be set to NULL if not wanted.
188 */
189 DECLR3CALLBACKMEMBER(void, pfnNotifyPdmtInit,(PCVMM2USERMETHODS pThis, PUVM pUVM));
190
191 /**
192 * EMT termination notification callback.
193 *
194 * This is intended for doing per-thread cleanups for EMTs (like COM).
195 *
196 * @param pThis Pointer to the callback method table.
197 * @param pUVM The user mode VM handle.
198 *
199 * @remarks This is optional and shall be set to NULL if not wanted.
200 */
201 DECLR3CALLBACKMEMBER(void, pfnNotifyPdmtTerm,(PCVMM2USERMETHODS pThis, PUVM pUVM));
202
203 /** Magic value (VMM2USERMETHODS_MAGIC) marking the end of the structure. */
204 uint32_t u32EndMagic;
205} VMM2USERMETHODS;
206
207/** Magic value of the VMM2USERMETHODS (Franz Kafka). */
208#define VMM2USERMETHODS_MAGIC UINT32_C(0x18830703)
209/** The VMM2USERMETHODS structure version. */
210#define VMM2USERMETHODS_VERSION UINT32_C(0x00020000)
211
212
213VMM_INT_DECL(RTRCPTR) VMMGetStackRC(PVMCPU pVCpu);
214VMMDECL(VMCPUID) VMMGetCpuId(PVM pVM);
215VMMDECL(PVMCPU) VMMGetCpu(PVM pVM);
216VMMDECL(PVMCPU) VMMGetCpu0(PVM pVM);
217VMMDECL(PVMCPU) VMMGetCpuById(PVM pVM, VMCPUID idCpu);
218VMMR3DECL(PVMCPU) VMMR3GetCpuByIdU(PUVM pVM, VMCPUID idCpu);
219VMM_INT_DECL(uint32_t) VMMGetSvnRev(void);
220VMM_INT_DECL(VMMSWITCHER) VMMGetSwitcher(PVM pVM);
221VMM_INT_DECL(void) VMMTrashVolatileXMMRegs(void);
222
223/** @def VMMIsHwVirtExtForced
224 * Checks if forced to use the hardware assisted virtualization extensions.
225 *
226 * This is intended for making setup decisions where we can save resources when
227 * using hardware assisted virtualization.
228 *
229 * @returns true / false.
230 * @param pVM Pointer to the shared VM structure.
231 * @internal
232 */
233#define VMMIsHwVirtExtForced(pVM) ((pVM)->fHwVirtExtForced)
234
235
236#ifdef IN_RING3
237/** @defgroup grp_vmm_r3 The VMM Host Context Ring 3 API
238 * @ingroup grp_vmm
239 * @{
240 */
241VMMR3_INT_DECL(int) VMMR3Init(PVM pVM);
242VMMR3_INT_DECL(int) VMMR3InitR0(PVM pVM);
243VMMR3_INT_DECL(int) VMMR3InitRC(PVM pVM);
244VMMR3_INT_DECL(int) VMMR3InitCompleted(PVM pVM, VMINITCOMPLETED enmWhat);
245VMMR3_INT_DECL(int) VMMR3Term(PVM pVM);
246VMMR3_INT_DECL(void) VMMR3Relocate(PVM pVM, RTGCINTPTR offDelta);
247VMMR3_INT_DECL(int) VMMR3UpdateLoggers(PVM pVM);
248VMMR3DECL(const char *) VMMR3GetRZAssertMsg1(PVM pVM);
249VMMR3DECL(const char *) VMMR3GetRZAssertMsg2(PVM pVM);
250VMMR3_INT_DECL(int) VMMR3GetImportRC(PVM pVM, const char *pszSymbol, PRTRCPTR pRCPtrValue);
251VMMR3_INT_DECL(int) VMMR3SelectSwitcher(PVM pVM, VMMSWITCHER enmSwitcher);
252VMMR3_INT_DECL(int) VMMR3DisableSwitcher(PVM pVM);
253VMMR3_INT_DECL(RTR0PTR) VMMR3GetHostToGuestSwitcher(PVM pVM, VMMSWITCHER enmSwitcher);
254VMMR3_INT_DECL(int) VMMR3RawRunGC(PVM pVM, PVMCPU pVCpu);
255VMMR3_INT_DECL(int) VMMR3HmRunGC(PVM pVM, PVMCPU pVCpu);
256VMMR3DECL(int) VMMR3CallRC(PVM pVM, RTRCPTR RCPtrEntry, unsigned cArgs, ...);
257VMMR3DECL(int) VMMR3CallRCV(PVM pVM, RTRCPTR RCPtrEntry, unsigned cArgs, va_list args);
258VMMR3DECL(int) VMMR3CallR0(PVM pVM, uint32_t uOperation, uint64_t u64Arg, PSUPVMMR0REQHDR pReqHdr);
259VMMR3DECL(int) VMMR3ResumeHyper(PVM pVM, PVMCPU pVCpu);
260VMMR3DECL(void) VMMR3FatalDump(PVM pVM, PVMCPU pVCpu, int rcErr);
261VMMR3_INT_DECL(void) VMMR3YieldSuspend(PVM pVM);
262VMMR3_INT_DECL(void) VMMR3YieldStop(PVM pVM);
263VMMR3_INT_DECL(void) VMMR3YieldResume(PVM pVM);
264VMMR3_INT_DECL(void) VMMR3SendSipi(PVM pVM, VMCPUID idCpu, uint32_t uVector);
265VMMR3_INT_DECL(void) VMMR3SendInitIpi(PVM pVM, VMCPUID idCpu);
266VMMR3DECL(int) VMMR3RegisterPatchMemory(PVM pVM, RTGCPTR pPatchMem, unsigned cbPatchMem);
267VMMR3DECL(int) VMMR3DeregisterPatchMemory(PVM pVM, RTGCPTR pPatchMem, unsigned cbPatchMem);
268VMMR3DECL(int) VMMR3EmtRendezvous(PVM pVM, uint32_t fFlags, PFNVMMEMTRENDEZVOUS pfnRendezvous, void *pvUser);
269VMMR3_INT_DECL(bool) VMMR3EmtRendezvousSetDisabled(PVMCPU pVCpu, bool fDisabled);
270/** @defgroup grp_VMMR3EmtRendezvous_fFlags VMMR3EmtRendezvous flags
271 * @{ */
272/** Execution type mask. */
273#define VMMEMTRENDEZVOUS_FLAGS_TYPE_MASK UINT32_C(0x00000007)
274/** Invalid execution type. */
275#define VMMEMTRENDEZVOUS_FLAGS_TYPE_INVALID UINT32_C(0)
276/** Let the EMTs execute the callback one by one (in no particular order). */
277#define VMMEMTRENDEZVOUS_FLAGS_TYPE_ONE_BY_ONE UINT32_C(1)
278/** Let all the EMTs execute the callback at the same time. */
279#define VMMEMTRENDEZVOUS_FLAGS_TYPE_ALL_AT_ONCE UINT32_C(2)
280/** Only execute the callback on one EMT (no particular one). */
281#define VMMEMTRENDEZVOUS_FLAGS_TYPE_ONCE UINT32_C(3)
282/** Let the EMTs execute the callback one by one in ascending order. */
283#define VMMEMTRENDEZVOUS_FLAGS_TYPE_ASCENDING UINT32_C(4)
284/** Let the EMTs execute the callback one by one in descending order. */
285#define VMMEMTRENDEZVOUS_FLAGS_TYPE_DESCENDING UINT32_C(5)
286/** Stop after the first error.
287 * This is not valid for any execution type where more than one EMT is active
288 * at a time. */
289#define VMMEMTRENDEZVOUS_FLAGS_STOP_ON_ERROR UINT32_C(0x00000008)
290/** The valid flags. */
291#define VMMEMTRENDEZVOUS_FLAGS_VALID_MASK UINT32_C(0x0000000f)
292/** @} */
293VMMR3_INT_DECL(int) VMMR3EmtRendezvousFF(PVM pVM, PVMCPU pVCpu);
294VMMR3_INT_DECL(int) VMMR3ReadR0Stack(PVM pVM, VMCPUID idCpu, RTHCUINTPTR R0Addr, void *pvBuf, size_t cbRead);
295/** @} */
296#endif /* IN_RING3 */
297
298
299/** @defgroup grp_vmm_r0 The VMM Host Context Ring 0 API
300 * @ingroup grp_vmm
301 * @{
302 */
303
304/**
305 * The VMMR0Entry() codes.
306 */
307typedef enum VMMR0OPERATION
308{
309 /** Run guest context. */
310 VMMR0_DO_RAW_RUN = SUP_VMMR0_DO_RAW_RUN,
311 /** Run guest code using the available hardware acceleration technology. */
312 VMMR0_DO_HM_RUN = SUP_VMMR0_DO_HM_RUN,
313 /** Official NOP that we use for profiling. */
314 VMMR0_DO_NOP = SUP_VMMR0_DO_NOP,
315 /** Official slow iocl NOP that we use for profiling. */
316 VMMR0_DO_SLOW_NOP,
317
318 /** Ask the GVMM to create a new VM. */
319 VMMR0_DO_GVMM_CREATE_VM,
320 /** Ask the GVMM to destroy the VM. */
321 VMMR0_DO_GVMM_DESTROY_VM,
322 /** Call GVMMR0SchedHalt(). */
323 VMMR0_DO_GVMM_SCHED_HALT,
324 /** Call GVMMR0SchedWakeUp(). */
325 VMMR0_DO_GVMM_SCHED_WAKE_UP,
326 /** Call GVMMR0SchedPoke(). */
327 VMMR0_DO_GVMM_SCHED_POKE,
328 /** Call GVMMR0SchedWakeUpAndPokeCpus(). */
329 VMMR0_DO_GVMM_SCHED_WAKE_UP_AND_POKE_CPUS,
330 /** Call GVMMR0SchedPoll(). */
331 VMMR0_DO_GVMM_SCHED_POLL,
332 /** Call GVMMR0QueryStatistics(). */
333 VMMR0_DO_GVMM_QUERY_STATISTICS,
334 /** Call GVMMR0ResetStatistics(). */
335 VMMR0_DO_GVMM_RESET_STATISTICS,
336 /** Call GVMMR0RegisterVCpu(). */
337 VMMR0_DO_GVMM_REGISTER_VMCPU,
338
339 /** Call VMMR0 Per VM Init. */
340 VMMR0_DO_VMMR0_INIT,
341 /** Call VMMR0 Per VM Termination. */
342 VMMR0_DO_VMMR0_TERM,
343 /** Setup the hardware accelerated raw-mode session. */
344 VMMR0_DO_HM_SETUP_VM,
345 /** Attempt to enable or disable hardware accelerated raw-mode. */
346 VMMR0_DO_HM_ENABLE,
347 /** Calls function in the hypervisor.
348 * The caller must setup the hypervisor context so the call will be performed.
349 * The difference between VMMR0_DO_RUN_GC and this one is the handling of
350 * the return GC code. The return code will not be interpreted by this operation.
351 */
352 VMMR0_DO_CALL_HYPERVISOR,
353
354 /** Call PGMR0PhysAllocateHandyPages(). */
355 VMMR0_DO_PGM_ALLOCATE_HANDY_PAGES,
356 /** Call PGMR0PhysFlushHandyPages(). */
357 VMMR0_DO_PGM_FLUSH_HANDY_PAGES,
358 /** Call PGMR0AllocateLargePage(). */
359 VMMR0_DO_PGM_ALLOCATE_LARGE_HANDY_PAGE,
360 /** Call PGMR0PhysSetupIommu(). */
361 VMMR0_DO_PGM_PHYS_SETUP_IOMMU,
362
363 /** Call GMMR0InitialReservation(). */
364 VMMR0_DO_GMM_INITIAL_RESERVATION,
365 /** Call GMMR0UpdateReservation(). */
366 VMMR0_DO_GMM_UPDATE_RESERVATION,
367 /** Call GMMR0AllocatePages(). */
368 VMMR0_DO_GMM_ALLOCATE_PAGES,
369 /** Call GMMR0FreePages(). */
370 VMMR0_DO_GMM_FREE_PAGES,
371 /** Call GMMR0FreeLargePage(). */
372 VMMR0_DO_GMM_FREE_LARGE_PAGE,
373 /** Call GMMR0QueryHypervisorMemoryStatsReq(). */
374 VMMR0_DO_GMM_QUERY_HYPERVISOR_MEM_STATS,
375 /** Call GMMR0QueryMemoryStatsReq(). */
376 VMMR0_DO_GMM_QUERY_MEM_STATS,
377 /** Call GMMR0BalloonedPages(). */
378 VMMR0_DO_GMM_BALLOONED_PAGES,
379 /** Call GMMR0MapUnmapChunk(). */
380 VMMR0_DO_GMM_MAP_UNMAP_CHUNK,
381 /** Call GMMR0SeedChunk(). */
382 VMMR0_DO_GMM_SEED_CHUNK,
383 /** Call GMMR0RegisterSharedModule. */
384 VMMR0_DO_GMM_REGISTER_SHARED_MODULE,
385 /** Call GMMR0UnregisterSharedModule. */
386 VMMR0_DO_GMM_UNREGISTER_SHARED_MODULE,
387 /** Call GMMR0ResetSharedModules. */
388 VMMR0_DO_GMM_RESET_SHARED_MODULES,
389 /** Call GMMR0CheckSharedModules. */
390 VMMR0_DO_GMM_CHECK_SHARED_MODULES,
391 /** Call GMMR0FindDuplicatePage. */
392 VMMR0_DO_GMM_FIND_DUPLICATE_PAGE,
393 /** Call GMMR0QueryStatistics(). */
394 VMMR0_DO_GMM_QUERY_STATISTICS,
395 /** Call GMMR0ResetStatistics(). */
396 VMMR0_DO_GMM_RESET_STATISTICS,
397
398 /** Set a GVMM or GMM configuration value. */
399 VMMR0_DO_GCFGM_SET_VALUE,
400 /** Query a GVMM or GMM configuration value. */
401 VMMR0_DO_GCFGM_QUERY_VALUE,
402
403 /** Call PDMR0DriverCallReqHandler. */
404 VMMR0_DO_PDM_DRIVER_CALL_REQ_HANDLER,
405 /** Call PDMR0DeviceCallReqHandler. */
406 VMMR0_DO_PDM_DEVICE_CALL_REQ_HANDLER,
407
408 /** The start of the R0 service operations. */
409 VMMR0_DO_SRV_START,
410 /** Call IntNetR0Open(). */
411 VMMR0_DO_INTNET_OPEN,
412 /** Call IntNetR0IfClose(). */
413 VMMR0_DO_INTNET_IF_CLOSE,
414 /** Call IntNetR0IfGetBufferPtrs(). */
415 VMMR0_DO_INTNET_IF_GET_BUFFER_PTRS,
416 /** Call IntNetR0IfSetPromiscuousMode(). */
417 VMMR0_DO_INTNET_IF_SET_PROMISCUOUS_MODE,
418 /** Call IntNetR0IfSetMacAddress(). */
419 VMMR0_DO_INTNET_IF_SET_MAC_ADDRESS,
420 /** Call IntNetR0IfSetActive(). */
421 VMMR0_DO_INTNET_IF_SET_ACTIVE,
422 /** Call IntNetR0IfSend(). */
423 VMMR0_DO_INTNET_IF_SEND,
424 /** Call IntNetR0IfWait(). */
425 VMMR0_DO_INTNET_IF_WAIT,
426 /** Call IntNetR0IfAbortWait(). */
427 VMMR0_DO_INTNET_IF_ABORT_WAIT,
428
429 /** Forward call to the PCI driver */
430 VMMR0_DO_PCIRAW_REQ,
431
432 /** The end of the R0 service operations. */
433 VMMR0_DO_SRV_END,
434
435 /** Official call we use for testing Ring-0 APIs. */
436 VMMR0_DO_TESTS,
437 /** Test the 32->64 bits switcher. */
438 VMMR0_DO_TEST_SWITCHER3264,
439
440 /** The usual 32-bit type blow up. */
441 VMMR0_DO_32BIT_HACK = 0x7fffffff
442} VMMR0OPERATION;
443
444
445/**
446 * Request buffer for VMMR0_DO_GCFGM_SET_VALUE and VMMR0_DO_GCFGM_QUERY_VALUE.
447 * @todo Move got GCFGM.h when it's implemented.
448 */
449typedef struct GCFGMVALUEREQ
450{
451 /** The request header.*/
452 SUPVMMR0REQHDR Hdr;
453 /** The support driver session handle. */
454 PSUPDRVSESSION pSession;
455 /** The value.
456 * This is input for the set request and output for the query. */
457 uint64_t u64Value;
458 /** The variable name.
459 * This is fixed sized just to make things simple for the mock-up. */
460 char szName[48];
461} GCFGMVALUEREQ;
462/** Pointer to a VMMR0_DO_GCFGM_SET_VALUE and VMMR0_DO_GCFGM_QUERY_VALUE request buffer.
463 * @todo Move got GCFGM.h when it's implemented.
464 */
465typedef GCFGMVALUEREQ *PGCFGMVALUEREQ;
466
467VMMR0DECL(int) VMMR0EntryInt(PVM pVM, VMMR0OPERATION enmOperation, void *pvArg);
468VMMR0DECL(void) VMMR0EntryFast(PVM pVM, VMCPUID idCpu, VMMR0OPERATION enmOperation);
469VMMR0DECL(int) VMMR0EntryEx(PVM pVM, VMCPUID idCpu, VMMR0OPERATION enmOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION);
470VMMR0DECL(int) VMMR0TermVM(PVM pVM, PGVM pGVM);
471
472#ifdef LOG_ENABLED
473VMMR0DECL(void) VMMR0LogFlushDisable(PVMCPU pVCpu);
474VMMR0DECL(void) VMMR0LogFlushEnable(PVMCPU pVCpu);
475VMMR0DECL(bool) VMMR0IsLogFlushDisabled(PVMCPU pVCpu);
476#else
477#define VMMR0LogFlushDisable(pVCpu) do { } while(0)
478#define VMMR0LogFlushEnable(pVCpu) do { } while(0)
479#define VMMR0IsLogFlushDisabled(pVCpu) (true)
480#endif
481
482/** @} */
483
484
485#ifdef IN_RC
486/** @defgroup grp_vmm_rc The VMM Raw-Mode Context API
487 * @ingroup grp_vmm
488 * @{
489 */
490VMMRCDECL(int) VMMGCEntry(PVM pVM, unsigned uOperation, unsigned uArg, ...);
491VMMRCDECL(void) VMMGCGuestToHost(PVM pVM, int rc);
492VMMRCDECL(void) VMMGCLogFlushIfFull(PVM pVM);
493/** @} */
494#endif /* IN_RC */
495
496#if defined(IN_RC) || defined(IN_RING0)
497/** @defgroup grp_vmm_rz The VMM Raw-Mode and Ring-0 Context API
498 * @ingroup grp_vmm
499 * @{
500 */
501VMMRZDECL(int) VMMRZCallRing3(PVM pVM, PVMCPU pVCpu, VMMCALLRING3 enmOperation, uint64_t uArg);
502VMMRZDECL(int) VMMRZCallRing3NoCpu(PVM pVM, VMMCALLRING3 enmOperation, uint64_t uArg);
503VMMRZDECL(void) VMMRZCallRing3Disable(PVMCPU pVCpu);
504VMMRZDECL(void) VMMRZCallRing3Enable(PVMCPU pVCpu);
505VMMRZDECL(bool) VMMRZCallRing3IsEnabled(PVMCPU pVCpu);
506/** @} */
507#endif
508
509
510/** @} */
511RT_C_DECLS_END
512
513#endif
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