Changeset 9212 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- May 29, 2008 9:38:38 AM (17 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR0
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/DBGFR0.cpp
r8155 r9212 45 45 * @param uDr6 The DR6 register value. 46 46 */ 47 DBGFR0DECL(int) DBGFR0Trap01Handler(PVM pVM, PCPUMCTXCORE pRegFrame, RT UINTREG uDr6)47 DBGFR0DECL(int) DBGFR0Trap01Handler(PVM pVM, PCPUMCTXCORE pRegFrame, RTGCUINTREG uDr6) 48 48 { 49 49 /** @todo Intel docs say that X86_DR6_BS has the highest priority... */ -
trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp
r9188 r9212 681 681 pVMCB->guest.u64RAX = pCtx->eax; 682 682 683 /* vmrun will fail otherwise. */684 pVMCB->guest.u64EFER = MSR_K6_EFER_SVME;683 /* vmrun will fail without MSR_K6_EFER_SVME. */ 684 pVMCB->guest.u64EFER = pCtx->msrEFER | MSR_K6_EFER_SVME; 685 685 686 686 /** TSC offset. */ … … 696 696 } 697 697 698 /** @todo 64 bits stuff (?): 699 * - STAR 700 * - LSTAR 701 * - CSTAR 702 * - SFMASK 703 * - KernelGSBase 704 */ 698 /* Sync the various msrs for 64 bits mode. */ 699 pVMCB->guest.u64STAR = pCtx->msrSTAR; /* legacy syscall eip, cs & ss */ 700 pVMCB->guest.u64LSTAR = pCtx->msrLSTAR; /* 64 bits mode syscall rip */ 701 pVMCB->guest.u64CSTAR = pCtx->msrCSTAR; /* compatibility mode syscall rip */ 702 pVMCB->guest.u64SFMASK = pCtx->msrSFMASK; /* syscall flag mask */ 703 pVMCB->guest.u64KernelGSBase = pCtx->msrKERNELGSBASE; /* swapgs exchange value */ 705 704 706 705 #ifdef DEBUG -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r9188 r9212 273 273 AssertRC(rc); 274 274 275 /* VMX_VMCS_CTRL_ENTRY_CONTROLS276 * Set required bits to one and zero according to the MSR capabilities.277 */278 val = (pVM->hwaccm.s.vmx.msr.vmx_entry & 0xFFFFFFFF);279 if (pVM->hwaccm.s.cpuid.u32AMDFeatureEDX & X86_CPUID_AMD_FEATURE_EDX_LONG_MODE)280 {281 /** @todo 32 bits guest mode only for now. */282 /* val |= VMX_VMCS_CTRL_ENTRY_CONTROLS_IA64_MODE; */283 }284 /* Mask away the bits that the CPU doesn't support */285 /** @todo make sure they don't conflict with the above requirements. */286 val &= (pVM->hwaccm.s.vmx.msr.vmx_entry >> 32ULL);287 /* else Must be zero when AMD64 is not available. */288 rc = VMXWriteVMCS(VMX_VMCS_CTRL_ENTRY_CONTROLS, val);289 AssertRC(rc);290 291 275 /* VMX_VMCS_CTRL_EXIT_CONTROLS 292 276 * Set required bits to one and zero according to the MSR capabilities. … … 958 942 STAM_COUNTER_INC(&pVM->hwaccm.s.StatTSCIntercept); 959 943 } 944 945 /* VMX_VMCS_CTRL_ENTRY_CONTROLS 946 * Set required bits to one and zero according to the MSR capabilities. 947 */ 948 val = (pVM->hwaccm.s.vmx.msr.vmx_entry & 0xFFFFFFFF); 949 950 /* 64 bits guest mode? */ 951 if (pCtx->msrEFER & MSR_K6_EFER_LMA) 952 val |= VMX_VMCS_CTRL_ENTRY_CONTROLS_IA64_MODE; 953 954 /* Mask away the bits that the CPU doesn't support */ 955 /** @todo make sure they don't conflict with the above requirements. */ 956 val &= (pVM->hwaccm.s.vmx.msr.vmx_entry >> 32ULL); 957 /* else Must be zero when AMD64 is not available. */ 958 rc = VMXWriteVMCS(VMX_VMCS_CTRL_ENTRY_CONTROLS, val); 959 AssertRC(rc); 960 960 961 961 /* Done. */
Note:
See TracChangeset
for help on using the changeset viewer.