Changeset 8876 in vbox for trunk/src/VBox/VMM/HWACCMInternal.h
- Timestamp:
- May 16, 2008 9:59:07 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 30910
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/HWACCMInternal.h
r8873 r8876 31 31 #include <VBox/pgm.h> 32 32 #include <iprt/memobj.h> 33 #include <iprt/cpuset.h> 34 #include <iprt/mp.h> 33 35 34 36 __BEGIN_DECLS … … 317 319 STAMCOUNTER StatNoFlushTLBWorldSwitch; 318 320 STAMCOUNTER StatFlushTLBCRxChange; 321 STAMCOUNTER StatFlushASID; 319 322 320 323 STAMCOUNTER StatSwitchGuestIrq; … … 327 330 typedef HWACCM *PHWACCM; 328 331 332 static 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 394 typedef 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; 405 typedef HWACCM_CPUINFO *PHWACCM_CPUINFO; 329 406 330 407 #ifdef IN_RING0
Note:
See TracChangeset
for help on using the changeset viewer.