Changeset 24368 in vbox
- Timestamp:
- Nov 5, 2009 8:15:02 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWACCMR0.cpp
r24032 r24368 556 556 /* Turn on SVM in the EFER MSR. */ 557 557 val = ASMRdMsr(MSR_K6_EFER); 558 if (!(val & MSR_K6_EFER_SVME))559 ASMWrMsr(MSR_K6_EFER, val | MSR_K6_EFER_SVME);560 561 /* Paranoia. */562 val = ASMRdMsr(MSR_K6_EFER);563 558 if (val & MSR_K6_EFER_SVME) 564 559 { 565 /* Restore previous value. */ 566 ASMWrMsr(MSR_K6_EFER, val & ~MSR_K6_EFER_SVME); 567 paRc[idCpu] = VINF_SUCCESS; 560 paRc[idCpu] = VERR_SVM_IN_USE; 568 561 } 569 562 else 570 paRc[idCpu] = VERR_SVM_ILLEGAL_EFER_MSR; 563 { 564 ASMWrMsr(MSR_K6_EFER, val | MSR_K6_EFER_SVME); 565 566 /* Paranoia. */ 567 val = ASMRdMsr(MSR_K6_EFER); 568 if (val & MSR_K6_EFER_SVME) 569 { 570 /* Restore previous value. */ 571 ASMWrMsr(MSR_K6_EFER, val & ~MSR_K6_EFER_SVME); 572 paRc[idCpu] = VINF_SUCCESS; 573 } 574 else 575 paRc[idCpu] = VERR_SVM_ILLEGAL_EFER_MSR; 576 } 571 577 } 572 578 else 573 paRc[idCpu] = HWACCMR0Globals.lLastError =VERR_SVM_DISABLED;579 paRc[idCpu] = VERR_SVM_DISABLED; 574 580 } 575 581 else
Note:
See TracChangeset
for help on using the changeset viewer.