Changeset 49784 in vbox for trunk/src/VBox/HostDrivers
- Timestamp:
- Dec 5, 2013 10:30:06 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDrv.c
r49728 r49784 3398 3398 SUPR0DECL(int) SUPR0QueryVTCaps(PSUPDRVSESSION pSession, uint32_t *pfCaps) 3399 3399 { 3400 int rc = VERR_UNSUPPORTED_CPU; 3401 RTTHREADPREEMPTSTATE PreemptState = RTTHREADPREEMPTSTATE_INITIALIZER; 3402 3400 3403 /* 3401 3404 * Input validation. … … 3405 3408 3406 3409 *pfCaps = 0; 3407 3408 /** @todo r=ramshankar: Although we're only reading CPUIDs/MSRs here which 3409 * should be identical on all CPUs on the system, it's probably 3410 * cleaner to prevent migration nonetheless? */ 3410 /* We may modify MSRs and re-read them, disable preemption so we make sure we don't migrate CPUs. */ 3411 RTThreadPreemptDisable(&PreemptState); 3411 3412 if (ASMHasCpuId()) 3412 3413 { … … 3485 3486 *pfCaps |= SUPVTCAPS_NESTED_PAGING; 3486 3487 } 3487 return VINF_SUCCESS;3488 3488 } 3489 return rc;3490 3489 } 3491 return VERR_VMX_NO_VMX;3492 }3493 3494 if ( ASMIsAmdCpuEx(uVendorEBX, uVendorECX, uVendorEDX)3495 && ASMIsValidStdRange(uMaxId))3490 else 3491 rc = VERR_VMX_NO_VMX; 3492 } 3493 else if ( ASMIsAmdCpuEx(uVendorEBX, uVendorECX, uVendorEDX) 3494 && ASMIsValidStdRange(uMaxId)) 3496 3495 { 3497 3496 uint32_t fExtFeaturesEcx, uExtMaxId; … … 3517 3516 *pfCaps |= SUPVTCAPS_NESTED_PAGING; 3518 3517 3519 r eturnVINF_SUCCESS;3518 rc = VINF_SUCCESS; 3520 3519 } 3521 return VERR_SVM_DISABLED; 3520 else 3521 rc = VERR_SVM_DISABLED; 3522 3522 } 3523 return VERR_SVM_NO_SVM; 3524 } 3525 } 3526 3527 return VERR_UNSUPPORTED_CPU; 3523 else 3524 rc = VERR_SVM_NO_SVM; 3525 } 3526 } 3527 3528 RTThreadPreemptRestore(&PreemptState); 3529 return rc; 3528 3530 } 3529 3531
Note:
See TracChangeset
for help on using the changeset viewer.