GIMMinimal.cpp revision 38e53feb0f05157234978e9288833973bb0e2bed
/* $Id$ */
/** @file
* GIM - Guest Interface Manager, Minimal implementation.
*/
/*
* Copyright (C) 2014 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.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#define LOG_GROUP LOG_GROUP_GIM
#include "GIMInternal.h"
#include <iprt/asm-amd64-x86.h>
/*******************************************************************************
* Defined Constants And Macros *
*******************************************************************************/
{
/*
* Enable the Hypervisor Present.
*/
if (GIMR3IsOSXGuest(pVM))
{
/*
* Enable MWAIT Extensions for OS X Guests.
*/
/*
* Mac releases really doesn't work on newer CPUs, and partly because OS X
* expects more from systems with newer CPUs (MSRs, power features etc.)
*/
{
{
case GIMOSID_OSX:
case GIMOSID_OSX_64:
break;
case GIMOSID_OSX_106:
case GIMOSID_OSX_106_64:
break;
case GIMOSID_OSX_107:
case GIMOSID_OSX_107_64:
/** @todo Figure out what is required here. */
break;
case GIMOSID_OSX_108:
case GIMOSID_OSX_108_64:
/** @todo Figure out what is required here. */
break;
case GIMOSID_OSX_109:
case GIMOSID_OSX_109_64:
/** @todo Figure out what is required here. */
break;
default: /* shut up gcc */
break;
}
if (uMaxIntelFamilyModelStep != UINT32_MAX)
{
if (RT_SUCCESS(rc))
{
0);
{
/* 8 high family bits, Intel's suggested calculation. */
{
}
LogRel(("GIM: Minimal: CPUID(0).EAX %#x -> %#x (uMaxIntelFamilyModelStep=%#x, uCurIntelFamilyModelStep=%#x\n",
}
if (RT_FAILURE(rc))
{
return rc;
}
}
else
{
return rc;
}
}
}
}
return VINF_SUCCESS;
}
{
}