VirtualBox

Changeset 9322 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jun 2, 2008 8:27:44 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
31536
Message:

Adjusted the CFGM design notes a bit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/CFGM.cpp

    r9321 r9322  
    22/** @file
    33 * CFGM - Configuration Manager.
    4  *
    5  * This is the main file of the \ref pg_cfgm "CFGM (Configuration Manager)".
    64 */
    75
    86/*
    9  * Copyright (C) 2006-2007 Sun Microsystems, Inc.
     7 * Copyright (C) 2006-2008 Sun Microsystems, Inc.
    108 *
    119 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2422/** @page pg_cfgm       CFGM - The Configuration Manager
    2523 *
    26  * The configuration manager will load and keep the configuration of a VM
    27  * handy (thru query interface) while the VM is running. The VM properties
    28  * are organized in a tree and individual nodes can be accessed by normal
    29  * path walking.
    30  *
    31  * Exactly how the CFGM obtains the configuration is specific to the build.
    32  * The default for a full build is to query it thru the IMachine interface and
    33  * applies it onto a default setup. It's necessary to have a default in the
    34  * bottom of this because the IMachine interface doesn't provide all the
    35  * required details.
    36  *
    37  * Devices are given their own subtree where they are protected from accessing
    38  * information of any parents. The exported PDM callback interfaces makes sure
    39  * of this.
    40  *
    41  * Validating of the data obtained, except for validation of the primitive type,
    42  * is all up to the user. The CFGM user is concidered in a better position to
    43  * know the validation rules of the individual properties.
     24 * The configuration manager is responsible for storing the configuration
     25 * of the VM at run time. It is organized a bit like file hierarchy,
     26 * except that the values live in a separate name space, i.e. value names
     27 * can include path separators.
     28 *
     29 * The VMM user creates the configuration tree as part of the VMR3Create()
     30 * call via the pfnCFGMConstructor callback argument. If this isn't specified
     31 * a simple default tree is created by cfgmR3CreateDefaultTree(). When used
     32 * in the normal setup, this function is found in Main/ConsoleImpl2.cpp.
     33 * For the VBoxBFE case, see the VBoxBFE.cpp.
     34 *
     35 * Devices, drivers, services and other PDM stuff are given their own subtree
     36 * where they are protected from accessing information of any parents. This is
     37 * is implemented via the CFGMR3SetRestrictedRoot() API.
     38 *
     39 * Validating of the data obtained, except for validation of the primitive
     40 * type, is left the caller. The caller is in a better position to know the
     41 * proper validation rules of the individual properties.
    4442 *
    4543 *
     
    4745 *
    4846 * CFGM supports the following data primitives:
    49  *      - Integers. Representation is signed 64-bit. Boolean, unsigned and
    50  *        small integers are all represented using this primitive.
    51  *      - Zero terminated character strings. As everywhere else
    52  *        strings are UTF-8.
     47 *      - Integers. Representation is unsigned 64-bit. Boolean, unsigned and
     48 *        small integers, and pointers are all represented using this primitive.
     49 *      - Zero terminated character strings. These are of course UTF-8.
    5350 *      - Variable length byte strings. This can be used to get/put binary
    5451 *        objects.
     
    7774*   Internal Functions                                                         *
    7875*******************************************************************************/
    79 static int  cfgmR3CreateDefault(PVM pVM);
     76static int  cfgmR3CreateDefaultTree(PVM pVM);
    8077static void cfgmR3DumpPath(PCFGMNODE pNode, PCDBGFINFOHLP pHlp);
    8178static void cfgmR3Dump(PCFGMNODE pRoot, unsigned iLevel, PCDBGFINFOHLP pHlp);
     
    135132    }
    136133    else
    137         rc = cfgmR3CreateDefault(pVM);
     134        rc = cfgmR3CreateDefaultTree(pVM);
    138135    if (VBOX_SUCCESS(rc))
    139136    {
     
    740737 * @param   pVM     VM handle.
    741738 */
    742 static int cfgmR3CreateDefault(PVM pVM)
     739static int cfgmR3CreateDefaultTree(PVM pVM)
    743740{
    744741    int rc;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette