VirtualBox

Ignore:
Timestamp:
May 16, 2008 9:59:07 AM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
30910
Message:

ASID based TLB flushing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/HWACCMInternal.h

    r8873 r8876  
    3131#include <VBox/pgm.h>
    3232#include <iprt/memobj.h>
     33#include <iprt/cpuset.h>
     34#include <iprt/mp.h>
    3335
    3436__BEGIN_DECLS
     
    317319    STAMCOUNTER             StatNoFlushTLBWorldSwitch;
    318320    STAMCOUNTER             StatFlushTLBCRxChange;
     321    STAMCOUNTER             StatFlushASID;
    319322
    320323    STAMCOUNTER             StatSwitchGuestIrq;
     
    327330typedef HWACCM *PHWACCM;
    328331
     332static struct
     333{
     334    struct
     335    {
     336        RTR0MEMOBJ  pMemObj;
     337        bool        fVMXConfigured;
     338        bool        fSVMConfigured;
     339    } aCpuInfo[RTCPUSET_MAX_CPUS];
     340
     341    struct
     342    {
     343        /** Set by the ring-0 driver to indicate VMX is supported by the CPU. */
     344        bool                        fSupported;
     345
     346        /** Host CR4 value (set by ring-0 VMX init) */
     347        uint64_t                    hostCR4;
     348
     349        /** VMX MSR values */
     350        struct
     351        {
     352            uint64_t                feature_ctrl;
     353            uint64_t                vmx_basic_info;
     354            uint64_t                vmx_pin_ctls;
     355            uint64_t                vmx_proc_ctls;
     356            uint64_t                vmx_exit;
     357            uint64_t                vmx_entry;
     358            uint64_t                vmx_misc;
     359            uint64_t                vmx_cr0_fixed0;
     360            uint64_t                vmx_cr0_fixed1;
     361            uint64_t                vmx_cr4_fixed0;
     362            uint64_t                vmx_cr4_fixed1;
     363            uint64_t                vmx_vmcs_enum;
     364        } msr;
     365        /* Last instruction error */
     366        uint32_t                    ulLastInstrError;
     367    } vmx;
     368    struct
     369    {
     370        /** Set by the ring-0 driver to indicate SVM is supported by the CPU. */
     371        bool                        fSupported;
     372
     373        /** SVM revision. */
     374        uint32_t                    u32Rev;
     375
     376        /** Maximum ASID allowed. */
     377        uint32_t                    u32MaxASID;
     378
     379        /** SVM feature bits from cpuid 0x8000000a */
     380        uint32_t                    u32Features;
     381    } svm;
     382    /** Saved error from detection */
     383    int32_t         lLastError;
     384
     385    struct
     386    {
     387        uint32_t                    u32AMDFeatureECX;
     388        uint32_t                    u32AMDFeatureEDX;
     389    } cpuid;
     390
     391    HWACCMSTATE     enmHwAccmState;
     392} HWACCMR0GLOBALS;
     393
     394typedef struct
     395{
     396    RTCPUID     idCpu;
     397
     398    RTR0MEMOBJ  pMemObj;
     399    /* Current ASID (AMD-V only) */
     400    uint32_t    uCurrentASID;
     401
     402    bool        fVMXConfigured;
     403    bool        fSVMConfigured;
     404} HWACCM_CPUINFO;
     405typedef HWACCM_CPUINFO *PHWACCM_CPUINFO;
    329406
    330407#ifdef IN_RING0
Note: See TracChangeset for help on using the changeset viewer.

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