VirtualBox

Changeset 452 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jan 30, 2007 11:35:27 PM (18 years ago)
Author:
vboxsync
Message:

Check CFGM option CSAMEnabled before enabling CSAM.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PATM/CSAM.cpp

    r347 r452  
    3636#include <VBox/selm.h>
    3737#include <VBox/trpm.h>
     38#include <VBox/cfgm.h>
    3839#include <VBox/param.h>
    3940#include <iprt/avl.h>
     
    174175    STAM_REG(pVM, &pVM->csam.s.StatCheckGates,       STAMTYPE_PROFILE, "/PROF/CSAM/CheckGates",       STAMUNIT_TICKS_PER_CALL, "CSAMR3CheckGates overhead.");
    175176
    176 
     177    /*
     178     * Check CFGM option and enable/disable CSAM.
     179     */
     180    bool fEnabled;
     181    rc = CFGMR3QueryBool(CFGMR3GetRoot(pVM), "CSAMEnabled", &fEnabled);
     182    if (VBOX_FAILURE(rc))
    177183#ifdef CSAM_ENABLE
    178     CSAMEnableScanning(pVM);
     184        fEnabled = true;
     185#else
     186        fEnabled = false;
    179187#endif
     188    if (fEnabled)
     189        CSAMEnableScanning(pVM);
    180190
    181191#ifdef VBOX_WITH_DEBUGGER
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