gvmm.h revision ec1eca74badc326cb04c0d139286e5a2ce99da63
5b281ba489ca18f0380d7efc7a5108b606cce449vboxsync * GVMM - The Global VM Manager.
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * Copyright (C) 2007 InnoTek Systemberatung GmbH
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync * available from http://www.virtualbox.org. This file is free software;
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync * you can redistribute it and/or modify it under the terms of the GNU
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync * General Public License as published by the Free Software Foundation,
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync * distribution. VirtualBox OSE is distributed in the hope that it will
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync * be useful, but WITHOUT ANY WARRANTY of any kind.
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync/** @defgroup grp_GVMM GVMM - The Global VM Manager.
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync/** @def IN_GVMM_R0
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync * Used to indicate whether we're inside the same link module as the ring 0
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync * part of the Global VM Manager or not.
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync/** @def GVMMR0DECL
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync * Ring 0 VM export or import declaration.
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync * @param type The return type of the function declaration.
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync/** @def NIL_GVM_HANDLE
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync * The nil GVM VM handle value (VM::hSelf).
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync * The scheduler statistics
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync /** The number of calls to GVMMR0SchedHalt. */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync /** The number of times we did go to sleep in GVMMR0SchedHalt. */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync /** The number of times we timed out in GVMMR0SchedHalt. */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync /** The number of times we didn't go to sleep in GVMMR0SchedHalt. */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync /** The number of wake ups done during GVMMR0SchedHalt. */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync /** The number of calls to GVMMR0WakeUp. */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync /** The number of times the EMT thread wasn't actually halted when GVMMR0WakeUp was called. */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync /** The number of wake ups done during GVMMR0WakeUp (not counting the explicit one). */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync /** The number of calls to GVMMR0SchedPoll. */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync /** The number of times the EMT has halted in a GVMMR0SchedPoll call. */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync /** The number of wake ups done during GVMMR0SchedPoll. */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync/** Pointer to the GVMM scheduler statistics. */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync * The GMM statistics.
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsynctypedef struct GVMMSTATS
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync /** The VM statistics if a VM was specified. */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync /** The sum statistics of all VMs accessible to the caller. */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync /** The number of VMs accessible to the caller. */
89dfdbb56cf9dddad3c7685b41bda1e4e4c1d6f9vboxsync /** Alignment padding. */
89dfdbb56cf9dddad3c7685b41bda1e4e4c1d6f9vboxsync/** Pointer to the GVMM statistics. */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync/** Const pointer to the GVMM statistics. */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsyncGVMMR0DECL(int) GVMMR0CreateVM(PSUPDRVSESSION pSession, PVM *ppVM);
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsyncGVMMR0DECL(int) GVMMR0DisassociateEMTFromVM(PVM pVM);
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsyncGVMMR0DECL(int) GVMMR0ByVMAndEMT(PVM pVM, PGVM *ppGVM);
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsyncGVMMR0DECL(PVM) GVMMR0GetVMByEMT(RTNATIVETHREAD hEMT);
89dfdbb56cf9dddad3c7685b41bda1e4e4c1d6f9vboxsyncGVMMR0DECL(int) GVMMR0SchedHalt(PVM pVM, uint64_t u64ExpireGipTime);
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsyncGVMMR0DECL(int) GVMMR0SchedPoll(PVM pVM, bool fYield);
89dfdbb56cf9dddad3c7685b41bda1e4e4c1d6f9vboxsyncGVMMR0DECL(int) GVMMR0QueryStatistics(PGVMMSTATS pStats, PSUPDRVSESSION pSession, PVM pVM);
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsyncGVMMR0DECL(int) GVMMR0ResetStatistics(PCGVMMSTATS pStats, PSUPDRVSESSION pSession, PVM pVM);
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync * Request packet for calling GVMMR0CreateVM.
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync /** The request header. */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync /** The support driver session. (IN) */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync /** Pointer to the ring-3 mapping of the shared VM structure on return. (OUT) */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync /** Pointer to the ring-0 mapping of the shared VM structure on return. (OUT) */
89dfdbb56cf9dddad3c7685b41bda1e4e4c1d6f9vboxsync/** Pointer to a GVMMR0CreateVM request packet. */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsyncGVMMR0DECL(int) GVMMR0CreateVMReq(PGVMMCREATEVMREQ pReq);
89dfdbb56cf9dddad3c7685b41bda1e4e4c1d6f9vboxsync * Request buffer for GVMMR0QueryStatisticsReq / VMMR0_DO_GVMM_QUERY_STATISTICS.
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync * @see GVMMR0QueryStatistics.
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync /** The header. */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync /** The support driver session. */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync /** The statistics. */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync/** Pointer to a GVMMR0QueryStatisticsReq / VMMR0_DO_GVMM_QUERY_STATISTICS request buffer. */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsynctypedef GVMMQUERYSTATISTICSSREQ *PGVMMQUERYSTATISTICSSREQ;
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsyncGVMMR0DECL(int) GVMMR0QueryStatisticsReq(PVM pVM, PGVMMQUERYSTATISTICSSREQ pReq);
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync * Request buffer for GVMMR0ResetStatisticsReq / VMMR0_DO_GVMM_RESET_STATISTICS.
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync * @see GVMMR0ResetStatistics.
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync /** The header. */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync /** The support driver session. */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync /** The statistics to reset.
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync * Any non-zero entry will be reset (if permitted). */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsync/** Pointer to a GVMMR0ResetStatisticsReq / VMMR0_DO_GVMM_RESET_STATISTICS request buffer. */
9e5c26690d45216629b5f588aced8fcfb68c23b6vboxsynctypedef GVMMRESETSTATISTICSSREQ *PGVMMRESETSTATISTICSSREQ;