HMVMXR0.h revision 5016ada15ab534bab60250f8d5f177d0a4e41fd8
/* $Id$ */
/** @file
* HM VMX (VT-x) - Internal header file.
*/
/*
* Copyright (C) 2006-2013 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#ifndef ___HMVMXR0_h
#define ___HMVMXR0_h
/** @defgroup grp_vmx_int Internal
* @ingroup grp_vmx
* @internal
* @{
*/
#ifdef IN_RING0
VMMR0DECL(int) VMXR0EnableCpu(PHMGLOBLCPUINFO pCpu, PVM pVM, void *pvPageCpu, RTHCPHYS pPageCpuPhys, bool fEnabledBySystem);
VMMR0DECL(int) VMXR0GlobalInit(void);
VMMR0DECL(void) VMXR0GlobalTerm(void);
DECLASM(int) VMXR0StartVM32(RTHCUINT fResume, PCPUMCTX pCtx, PVMCSCACHE pCache, PVM pVM, PVMCPU pVCpu);
DECLASM(int) VMXR0StartVM64(RTHCUINT fResume, PCPUMCTX pCtx, PVMCSCACHE pCache, PVM pVM, PVMCPU pVCpu);
# if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
DECLASM(int) VMXR0SwitcherStartVM64(RTHCUINT fResume, PCPUMCTX pCtx, PVMCSCACHE pCache, PVM pVM, PVMCPU pVCpu);
VMMR0DECL(int) VMXR0Execute64BitsHandler(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, HM64ON32OP enmOp, uint32_t cbParam,
# endif
/* Cached VMCS accesses -- defined always in the old VT-x code, defined only for 32 hosts on new code. */
#ifdef VMX_USE_CACHED_VMCS_ACCESSES
{
return VINF_SUCCESS;
}
#endif
#ifdef VBOX_WITH_OLD_VTX_CODE
# ifdef VMX_USE_CACHED_VMCS_ACCESSES
# else
# define VMXReadCachedVmcs VMXReadVmcsField
# endif
# define VMXReadVmcs VMXReadVmcsField
#else /* !VBOX_WITH_OLD_VTX_CODE */
# ifdef VBOX_WITH_HYBRID_32BIT_KERNEL
/* Don't use fAllow64BitGuests for VMXReadVmcsGstN() even though it looks right, as it can be forced to 'true'.
HMVMX_IS_64BIT_HOST_MODE() is what we need. */
# define VMXReadVmcsGstN VMXReadVmcsHstN
# define VMXReadVmcsGstNByIdxVal VMXReadVmcsGstN
# define VMXReadVmcsHstN VMXReadVmcs32
# else /* HC_ARCH_BITS == 64 */
# define VMXReadVmcsHstN VMXReadVmcs64
# define VMXReadVmcsGstN VMXReadVmcs64
# define VMXReadVmcsGstNByIdxVal VMXReadVmcs64
# endif
#endif /* !VBOX_WITH_OLD_VTX_CODE */
#endif /* IN_RING0 */
/** @} */
#endif /* ___HMVMXR0_h */