VirtualBox

source: vbox/trunk/include/VBox/param.h@ 52664

Last change on this file since 52664 was 44528, checked in by vboxsync, 12 years ago

header (C) fixes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.0 KB
RevLine 
[1]1/** @file
[21217]2 * VirtualBox Parameter Definitions. (VMM,+)
[20542]3 *
4 * param.mac is generated from this file by running 'kmk incs' in the root.
[1]5 */
6
7/*
[44528]8 * Copyright (C) 2006-2011 Oracle Corporation
[1]9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
[5999]13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 *
18 * The contents of this file may alternatively be used under the terms
19 * of the Common Development and Distribution License Version 1.0
20 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
21 * VirtualBox OSE distribution, in which case the provisions of the
22 * CDDL are applicable instead of those of the GPL.
23 *
24 * You may elect to license modified versions of this file under the
25 * terms and conditions of either the GPL or the CDDL or both.
[1]26 */
27
[3632]28#ifndef ___VBox_param_h
29#define ___VBox_param_h
[1]30
31#include <iprt/param.h>
[18263]32#include <iprt/cdefs.h>
[1]33
34
35/** @defgroup grp_vbox_param VBox Parameter Definition
36 * @{
37 */
38
[14645]39/** The maximum number of pages that can be allocated and mapped
40 * by various MM, PGM and SUP APIs. */
[28210]41#define VBOX_MAX_ALLOC_PAGE_COUNT (256U * _1M / PAGE_SIZE)
[1]42
[32345]43/** @def VBOX_WITH_PAGE_SHARING
44 * Enables the page sharing code.
45 * @remarks This must match GMMR0Init; currently we only support page fusion on
46 * all 64-bit hosts except Mac OS X */
[37968]47#if ( HC_ARCH_BITS == 64 /* ASM-NOINC */ \
48 && (defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_WINDOWS)) ) /* ASM-NOINC */ \
49 || defined(DOXYGEN_RUNNING) /* ASM-NOINC */
50# define VBOX_WITH_PAGE_SHARING /* ASM-NOINC */
51#endif /* ASM-NOINC */
[14645]52
[32345]53
[1]54/** @defgroup grp_vbox_param_mm Memory Monitor Parameters
55 * @ingroup grp_vbox_param
56 * @{
57 */
58/** Initial address of Hypervisor Memory Area.
59 * MUST BE PAGE TABLE ALIGNED! */
[14645]60#define MM_HYPER_AREA_ADDRESS UINT32_C(0xa0000000)
[1]61
62/** The max size of the hypervisor memory area. */
[18263]63#define MM_HYPER_AREA_MAX_SIZE (40U * _1M) /**< @todo Readjust when floating RAMRANGEs have been implemented. Used to be 20 * _1MB */
[1]64
65/** Maximum number of bytes we can dynamically map into the hypervisor region.
66 * This must be a power of 2 number of pages!
67 */
[18263]68#define MM_HYPER_DYNAMIC_SIZE (16U * PAGE_SIZE)
[1]69
[18263]70/** The minimum guest RAM size in bytes. */
71#define MM_RAM_MIN UINT32_C(0x00400000)
72/** The maximum guest RAM size in bytes. */
[18660]73#if HC_ARCH_BITS == 64
[36944]74# define MM_RAM_MAX UINT64_C(0x20000000000)
[18263]75#else
[36944]76# define MM_RAM_MAX UINT64_C(0x000E0000000)
[18263]77#endif
78/** The minimum guest RAM size in MBs. */
79#define MM_RAM_MIN_IN_MB UINT32_C(4)
80/** The maximum guest RAM size in MBs. */
[18660]81#if HC_ARCH_BITS == 64
[36944]82# define MM_RAM_MAX_IN_MB UINT32_C(2097152)
[18263]83#else
[22594]84# define MM_RAM_MAX_IN_MB UINT32_C(3584)
[18263]85#endif
[17541]86/** The default size of the below 4GB RAM hole. */
87#define MM_RAM_HOLE_SIZE_DEFAULT (512U * _1M)
[18617]88/** @} */
[17541]89
[18617]90
91/** @defgroup grp_vbox_param_pgm Page Manager Parameters
92 * @ingroup grp_vbox_param
93 * @{
94 */
95/** The number of handy pages.
96 * This should be a power of two. */
97#define PGM_HANDY_PAGES 128
98/** The threshold at which allocation of more handy pages is flagged. */
99#define PGM_HANDY_PAGES_SET_FF 32
100/** The threshold at which we will allocate more when in ring-3.
101 * This is must be smaller than both PGM_HANDY_PAGES_SET_FF and
102 * PGM_HANDY_PAGES_MIN. */
103#define PGM_HANDY_PAGES_R3_ALLOC 8
104/** The threshold at which we will allocate more when in ring-0 or raw mode.
105 * The idea is that we should never go below this threshold while in ring-0 or
106 * raw mode because of PGM_HANDY_PAGES_RZ_TO_R3. However, should this happen and
107 * we are actually out of memory, we will have 8 page to get out of whatever
108 * code we're executing.
109 *
110 * This is must be smaller than both PGM_HANDY_PAGES_SET_FF and
111 * PGM_HANDY_PAGES_MIN. */
112#define PGM_HANDY_PAGES_RZ_ALLOC 8
113/** The threshold at which we force return to R3 ASAP.
114 * The idea is that this should be large enough to get out of any code and up to
115 * the main EM loop when we are out of memory.
116 * This must be less or equal to PGM_HANDY_PAGES_MIN. */
117#define PGM_HANDY_PAGES_RZ_TO_R3 24
118/** The minimum number of handy pages (after allocation).
119 * This must be greater or equal to PGM_HANDY_PAGES_SET_FF.
120 * Another name would be PGM_HANDY_PAGES_EXTRA_RESERVATION or _PARANOIA. :-) */
121#define PGM_HANDY_PAGES_MIN 32
[1]122/** @} */
123
124
125/** @defgroup grp_vbox_param_vmm VMM Parameters
126 * @ingroup grp_vbox_param
127 * @{
128 */
129/** VMM stack size. */
[20742]130#ifdef RT_OS_DARWIN
131# define VMM_STACK_SIZE 16384U
132#else
133# define VMM_STACK_SIZE 8192U
134#endif
[19403]135/** Min number of Virtual CPUs. */
136#define VMM_MIN_CPU_COUNT 1
[19397]137/** Max number of Virtual CPUs. */
[39310]138#define VMM_MAX_CPU_COUNT 64
[19403]139
[1]140/** @} */
141
142
[21223]143/** @defgroup grp_vbox_pci PCI Identifiers
144 * @{ */
145/** VirtualBox PCI vendor ID. */
146#define VBOX_PCI_VENDORID (0x80ee)
147
148/** @name VirtualBox graphics card identifiers
149 * @{ */
150#define VBOX_VENDORID VBOX_PCI_VENDORID /**< @todo wonderful choice of name! Please squeeze a _VGA_ or something in there, please. */
151#define VBOX_DEVICEID (0xbeef) /**< @todo ditto. */
152#define VBOX_VESA_VENDORID VBOX_PCI_VENDORID
153#define VBOX_VESA_DEVICEID (0xbeef)
[1]154/** @} */
155
[21223]156/** @name VMMDev PCI card identifiers
157 * @{ */
158#define VMMDEV_VENDORID VBOX_PCI_VENDORID
159#define VMMDEV_DEVICEID (0xcafe)
160/** @} */
161
162/** @} */
163
[28095]164
165/** @defgroup grp_vbox_param_misc Misc
166 * @{ */
167
[28124]168/** The maximum size of a generic segment offload (GSO) frame. This limit is
169 * imposed by the 16-bit frame size in internal networking header. */
[28095]170#define VBOX_MAX_GSO_SIZE 0xfff0
171
[21223]172/** @} */
173
[28095]174
175/** @} */
176
[1]177#endif
178
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