VMMAll.cpp revision e5df2db7934a997e0e390ccb0172bfd96cc10c95
248c89033c87fed7229aa29bbbc4f4698fb13687vboxsync * VMM All Contexts.
248c89033c87fed7229aa29bbbc4f4698fb13687vboxsync * Copyright (C) 2006-2007 Sun Microsystems, Inc.
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync * available from http://www.virtualbox.org. This file is free software;
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync * you can redistribute it and/or modify it under the terms of the GNU
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync * General Public License (GPL) as published by the Free Software
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync * additional information or have any questions.
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync/*******************************************************************************
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync* Header Files *
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync*******************************************************************************/
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync * Gets the bottom of the hypervisor stack - RC Ptr.
c10a6f0c7041e4d1ee50ad38425aab9d43c55522vboxsync * (The returned address is not actually writable, only after it's decremented
c10a6f0c7041e4d1ee50ad38425aab9d43c55522vboxsync * by a push/ret/whatever does it become writable.)
c10a6f0c7041e4d1ee50ad38425aab9d43c55522vboxsync * @returns bottom of the stack.
c10a6f0c7041e4d1ee50ad38425aab9d43c55522vboxsync * @param pVM The VM handle.
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync * Gets the current virtual CPU ID.
c89333d3e41e439ed9e74768000edc399d3e72e6vboxsync * @returns The CPU ID.
c89333d3e41e439ed9e74768000edc399d3e72e6vboxsync * @param pVM Pointer to the shared VM handle.
5050fc8de0b121eab1b738d7c1007cde4903284dvboxsync * @thread EMT
c89333d3e41e439ed9e74768000edc399d3e72e6vboxsync /* Only emulation thread(s) allowed to ask for CPU id */
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync /* Only emulation thread(s) allowed to ask for CPU id */
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync /* There is only one CPU if we're in GC. */
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync#else /* IN_RING0 */
750df3fe104e01cadbc3d5bd20243055d283d4e5vboxsync#endif /* IN_RING0 */
750df3fe104e01cadbc3d5bd20243055d283d4e5vboxsync * Returns the VMCPU of the current EMT thread.
750df3fe104e01cadbc3d5bd20243055d283d4e5vboxsync * @returns The VMCPU pointer.
750df3fe104e01cadbc3d5bd20243055d283d4e5vboxsync * @param pVM The VM to operate on.
750df3fe104e01cadbc3d5bd20243055d283d4e5vboxsync /* Only emulation thread(s) allowed to ask for CPU id */
750df3fe104e01cadbc3d5bd20243055d283d4e5vboxsync /* Only emulation thread(s) allowed to ask for CPU id */
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync /* There is only one CPU if we're in GC. */
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync#else /* IN_RING0 */
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync#endif /* IN_RING0 */
ffb50166c9adb4ae583b914d405197035cf890advboxsync * Returns the VMCPU of the specified virtual CPU.
ffb50166c9adb4ae583b914d405197035cf890advboxsync * @returns The VMCPU pointer.
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync * @param pVM The VM to operate on.
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync * Gets the VBOX_SVN_REV.
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync * This is just to avoid having to compile a bunch of big files
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync * and requires less Makefile mess.
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync * @returns VBOX_SVN_REV.
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync * Queries the current switcher
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync * @returns active switcher
553a2f0d8ef91a6dad8de4eef206ff093af53a5dvboxsync * @param pVM VM handle.