Changeset 80192 in vbox
- Timestamp:
- Aug 8, 2019 4:25:31 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r80171 r80192 7160 7160 static void hmR0VmxImportGuestRFlags(PVMCPU pVCpu, PCVMXVMCSINFO pVmcsInfo) 7161 7161 { 7162 RTHCUINTREG HCRegVal;7163 7162 PCPUMCTX pCtx = &pVCpu->cpum.GstCtx; 7164 7163 if (pCtx->fExtrn & CPUMCTX_EXTRN_RFLAGS) 7165 7164 { 7166 int rc = VMXReadVmcsNw(VMX_VMCS_GUEST_RFLAGS, &HCRegVal); 7165 uint64_t u64Val; 7166 int rc = VMXReadVmcsNw(VMX_VMCS_GUEST_RFLAGS, &u64Val); 7167 7167 AssertRC(rc); 7168 7168 7169 pCtx->rflags.u64 = HCRegVal;7169 pCtx->rflags.u64 = u64Val; 7170 7170 if (pVmcsInfo->RealMode.fRealOnV86Active) 7171 7171 { … … 7231 7231 static int hmR0VmxImportGuestState(PVMCPU pVCpu, PVMXVMCSINFO pVmcsInfo, uint64_t fWhat) 7232 7232 { 7233 int rc = VINF_SUCCESS; 7234 PVM pVM = pVCpu->CTX_SUFF(pVM); 7235 PCPUMCTX pCtx = &pVCpu->cpum.GstCtx; 7236 uint32_t u32Val; 7237 RTHCUINTREG HCRegVal; 7233 int rc = VINF_SUCCESS; 7234 PVM pVM = pVCpu->CTX_SUFF(pVM); 7235 PCPUMCTX pCtx = &pVCpu->cpum.GstCtx; 7236 uint32_t u32Val; 7238 7237 7239 7238 /* … … 7275 7274 if (fWhat & CPUMCTX_EXTRN_RSP) 7276 7275 { 7277 rc = VMXReadVmcsNw(VMX_VMCS_GUEST_RSP, & HCRegVal);7276 rc = VMXReadVmcsNw(VMX_VMCS_GUEST_RSP, &pCtx->rsp); 7278 7277 AssertRC(rc); 7279 pCtx->rsp = HCRegVal;7280 7278 } 7281 7279 … … 7330 7328 if (fWhat & CPUMCTX_EXTRN_GDTR) 7331 7329 { 7332 rc = VMXReadVmcsNw(VMX_VMCS_GUEST_GDTR_BASE, &HCRegVal); AssertRC(rc); 7333 rc = VMXReadVmcs32(VMX_VMCS32_GUEST_GDTR_LIMIT, &u32Val); AssertRC(rc); 7334 pCtx->gdtr.pGdt = HCRegVal; 7330 rc = VMXReadVmcsNw(VMX_VMCS_GUEST_GDTR_BASE, &pCtx->gdtr.pGdt); AssertRC(rc); 7331 rc = VMXReadVmcs32(VMX_VMCS32_GUEST_GDTR_LIMIT, &u32Val); AssertRC(rc); 7335 7332 pCtx->gdtr.cbGdt = u32Val; 7336 7333 } … … 7339 7336 if (fWhat & CPUMCTX_EXTRN_IDTR) 7340 7337 { 7341 rc = VMXReadVmcsNw(VMX_VMCS_GUEST_IDTR_BASE, &HCRegVal); AssertRC(rc); 7342 rc = VMXReadVmcs32(VMX_VMCS32_GUEST_IDTR_LIMIT, &u32Val); AssertRC(rc); 7343 pCtx->idtr.pIdt = HCRegVal; 7338 rc = VMXReadVmcsNw(VMX_VMCS_GUEST_IDTR_BASE, &pCtx->idtr.pIdt); AssertRC(rc); 7339 rc = VMXReadVmcs32(VMX_VMCS32_GUEST_IDTR_LIMIT, &u32Val); AssertRC(rc); 7344 7340 pCtx->idtr.cbIdt = u32Val; 7345 7341 } … … 7358 7354 { 7359 7355 if (!pVCpu->hm.s.fUsingHyperDR7) 7360 { 7361 /* Upper 32-bits are always zero. See Intel spec. 2.7.3 "Loading and Storing Debug Registers". */ 7362 rc = VMXReadVmcsNw(VMX_VMCS_GUEST_DR7, &HCRegVal); AssertRC(rc); 7363 pCtx->dr[7] = HCRegVal; 7364 } 7356 rc = VMXReadVmcsNw(VMX_VMCS_GUEST_DR7, &pCtx->dr[7]); AssertRC(rc); 7365 7357 } 7366 7358 7367 7359 if (fWhat & CPUMCTX_EXTRN_SYSENTER_MSRS) 7368 7360 { 7369 rc = VMXReadVmcsNw(VMX_VMCS_GUEST_SYSENTER_EIP, &HCRegVal); AssertRC(rc); 7370 pCtx->SysEnter.eip = HCRegVal; 7371 rc = VMXReadVmcsNw(VMX_VMCS_GUEST_SYSENTER_ESP, &HCRegVal); AssertRC(rc); 7372 pCtx->SysEnter.esp = HCRegVal; 7373 rc = VMXReadVmcs32(VMX_VMCS32_GUEST_SYSENTER_CS, &u32Val); AssertRC(rc); 7361 rc = VMXReadVmcsNw(VMX_VMCS_GUEST_SYSENTER_EIP, &pCtx->SysEnter.eip); AssertRC(rc); 7362 rc = VMXReadVmcsNw(VMX_VMCS_GUEST_SYSENTER_ESP, &pCtx->SysEnter.esp); AssertRC(rc); 7363 rc = VMXReadVmcs32(VMX_VMCS32_GUEST_SYSENTER_CS, &u32Val); AssertRC(rc); 7374 7364 pCtx->SysEnter.cs = u32Val; 7375 7365 } … … 7424 7414 if (fWhat & CPUMCTX_EXTRN_CR0) 7425 7415 { 7426 RTHCUINTREG HCRegShadow; 7427 rc = VMXReadVmcsNw(VMX_VMCS_GUEST_CR0, &HCRegVal); AssertRC(rc); 7428 rc = VMXReadVmcsNw(VMX_VMCS_CTRL_CR0_READ_SHADOW, &HCRegShadow); AssertRC(rc); 7429 HCRegVal = (HCRegVal & ~pVmcsInfo->u64Cr0Mask) 7430 | (HCRegShadow & pVmcsInfo->u64Cr0Mask); 7416 uint64_t u64Cr0; 7417 uint64_t u64Shadow; 7418 rc = VMXReadVmcsNw(VMX_VMCS_GUEST_CR0, &u64Cr0); AssertRC(rc); 7419 rc = VMXReadVmcsNw(VMX_VMCS_CTRL_CR0_READ_SHADOW, &u64Shadow); AssertRC(rc); 7420 u64Cr0 = (u64Cr0 & ~pVmcsInfo->u64Cr0Mask) 7421 | (u64Shadow & pVmcsInfo->u64Cr0Mask); 7431 7422 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 7432 7423 /* … … 7436 7427 if (CPUMIsGuestInVmxNonRootMode(pCtx)) 7437 7428 { 7438 HCRegVal|= pCtx->hwvirt.vmx.Msrs.u64Cr0Fixed0;7439 HCRegVal&= pCtx->hwvirt.vmx.Msrs.u64Cr0Fixed1;7429 u64Cr0 |= pCtx->hwvirt.vmx.Msrs.u64Cr0Fixed0; 7430 u64Cr0 &= pCtx->hwvirt.vmx.Msrs.u64Cr0Fixed1; 7440 7431 } 7441 7432 #endif 7442 7433 VMMRZCallRing3Disable(pVCpu); /* May call into PGM which has Log statements. */ 7443 CPUMSetGuestCR0(pVCpu, HCRegVal);7434 CPUMSetGuestCR0(pVCpu, u64Cr0); 7444 7435 VMMRZCallRing3Enable(pVCpu); 7445 7436 } … … 7447 7438 if (fWhat & CPUMCTX_EXTRN_CR4) 7448 7439 { 7449 RTHCUINTREG HCRegShadow; 7450 rc = VMXReadVmcsNw(VMX_VMCS_GUEST_CR4, &HCRegVal); AssertRC(rc); 7451 rc |= VMXReadVmcsNw(VMX_VMCS_CTRL_CR4_READ_SHADOW, &HCRegShadow); AssertRC(rc); 7452 HCRegVal = (HCRegVal & ~pVmcsInfo->u64Cr4Mask) 7453 | (HCRegShadow & pVmcsInfo->u64Cr4Mask); 7440 uint64_t u64Cr4; 7441 uint64_t u64Shadow; 7442 rc = VMXReadVmcsNw(VMX_VMCS_GUEST_CR4, &u64Cr4); AssertRC(rc); 7443 rc |= VMXReadVmcsNw(VMX_VMCS_CTRL_CR4_READ_SHADOW, &u64Shadow); AssertRC(rc); 7444 u64Cr4 = (u64Cr4 & ~pVmcsInfo->u64Cr4Mask) 7445 | (u64Shadow & pVmcsInfo->u64Cr4Mask); 7454 7446 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 7455 7447 /* … … 7459 7451 if (CPUMIsGuestInVmxNonRootMode(pCtx)) 7460 7452 { 7461 HCRegVal|= pCtx->hwvirt.vmx.Msrs.u64Cr4Fixed0;7462 HCRegVal&= pCtx->hwvirt.vmx.Msrs.u64Cr4Fixed1;7453 u64Cr4 |= pCtx->hwvirt.vmx.Msrs.u64Cr4Fixed0; 7454 u64Cr4 &= pCtx->hwvirt.vmx.Msrs.u64Cr4Fixed1; 7463 7455 } 7464 7456 #endif 7465 pCtx->cr4 = HCRegVal;7457 pCtx->cr4 = u64Cr4; 7466 7458 } 7467 7459 … … 7473 7465 && CPUMIsGuestPagingEnabledEx(pCtx))) 7474 7466 { 7475 rc = VMXReadVmcsNw(VMX_VMCS_GUEST_CR3, &HCRegVal); AssertRC(rc); 7476 if (pCtx->cr3 != HCRegVal) 7467 uint64_t u64Cr3; 7468 rc = VMXReadVmcsNw(VMX_VMCS_GUEST_CR3, &u64Cr3); AssertRC(rc); 7469 if (pCtx->cr3 != u64Cr3) 7477 7470 { 7478 pCtx->cr3 = HCRegVal;7471 pCtx->cr3 = u64Cr3; 7479 7472 VMCPU_FF_SET(pVCpu, VMCPU_FF_HM_UPDATE_CR3); 7480 7473 } … … 9165 9158 */ 9166 9159 /** @todo Why do we need to OR and AND the fixed-0 and fixed-1 bits below? */ 9167 uint 32_t fSetCr0 = (uint32_t)(pVM->hm.s.vmx.Msrs.u64Cr0Fixed0 & pVM->hm.s.vmx.Msrs.u64Cr0Fixed1);9168 uint 32_t const fZapCr0 = (uint32_t)(pVM->hm.s.vmx.Msrs.u64Cr0Fixed0 | pVM->hm.s.vmx.Msrs.u64Cr0Fixed1);9160 uint64_t fSetCr0 = (pVM->hm.s.vmx.Msrs.u64Cr0Fixed0 & pVM->hm.s.vmx.Msrs.u64Cr0Fixed1); 9161 uint64_t const fZapCr0 = (pVM->hm.s.vmx.Msrs.u64Cr0Fixed0 | pVM->hm.s.vmx.Msrs.u64Cr0Fixed1); 9169 9162 /* Exceptions for unrestricted guest execution for fixed CR0 bits (PE, PG). 9170 9163 See Intel spec. 26.3.1 "Checks on Guest Control Registers, Debug Registers and MSRs." */ 9171 9164 if (fUnrestrictedGuest) 9172 fSetCr0 &= ~( X86_CR0_PE | X86_CR0_PG);9173 9174 uint 32_t u32GuestCr0;9175 rc = VMXReadVmcs 32(VMX_VMCS_GUEST_CR0, &u32GuestCr0);9176 AssertRC Break(rc);9177 HMVMX_CHECK_BREAK((u 32GuestCr0 & fSetCr0) == fSetCr0, VMX_IGS_CR0_FIXED1);9178 HMVMX_CHECK_BREAK(!(u 32GuestCr0 & ~fZapCr0), VMX_IGS_CR0_FIXED0);9165 fSetCr0 &= ~(uint64_t)(X86_CR0_PE | X86_CR0_PG); 9166 9167 uint64_t u64GuestCr0; 9168 rc = VMXReadVmcsNw(VMX_VMCS_GUEST_CR0, &u64GuestCr0); 9169 AssertRC(rc); 9170 HMVMX_CHECK_BREAK((u64GuestCr0 & fSetCr0) == fSetCr0, VMX_IGS_CR0_FIXED1); 9171 HMVMX_CHECK_BREAK(!(u64GuestCr0 & ~fZapCr0), VMX_IGS_CR0_FIXED0); 9179 9172 if ( !fUnrestrictedGuest 9180 && (u 32GuestCr0 & X86_CR0_PG)9181 && !(u 32GuestCr0 & X86_CR0_PE))9173 && (u64GuestCr0 & X86_CR0_PG) 9174 && !(u64GuestCr0 & X86_CR0_PE)) 9182 9175 { 9183 9176 HMVMX_ERROR_BREAK(VMX_IGS_CR0_PG_PE_COMBO); … … 9191 9184 uint64_t const fZapCr4 = (pVM->hm.s.vmx.Msrs.u64Cr4Fixed0 | pVM->hm.s.vmx.Msrs.u64Cr4Fixed1); 9192 9185 9193 uint 32_t u32GuestCr4;9194 rc = VMXReadVmcs 32(VMX_VMCS_GUEST_CR4, &u32GuestCr4);9195 AssertRC Break(rc);9196 HMVMX_CHECK_BREAK((u 32GuestCr4 & fSetCr4) == fSetCr4, VMX_IGS_CR4_FIXED1);9197 HMVMX_CHECK_BREAK(!(u 32GuestCr4 & ~fZapCr4), VMX_IGS_CR4_FIXED0);9186 uint64_t u64GuestCr4; 9187 rc = VMXReadVmcsNw(VMX_VMCS_GUEST_CR4, &u64GuestCr4); 9188 AssertRC(rc); 9189 HMVMX_CHECK_BREAK((u64GuestCr4 & fSetCr4) == fSetCr4, VMX_IGS_CR4_FIXED1); 9190 HMVMX_CHECK_BREAK(!(u64GuestCr4 & ~fZapCr4), VMX_IGS_CR4_FIXED0); 9198 9191 9199 9192 /* … … 9202 9195 uint64_t u64Val; 9203 9196 rc = VMXReadVmcs64(VMX_VMCS64_GUEST_DEBUGCTL_FULL, &u64Val); 9204 AssertRC Break(rc);9197 AssertRC(rc); 9205 9198 if ( (pVmcsInfo->u32EntryCtls & VMX_ENTRY_CTLS_LOAD_DEBUG) 9206 9199 && (u64Val & 0xfffffe3c)) /* Bits 31:9, bits 5:2 MBZ. */ … … 9212 9205 #ifdef VBOX_STRICT 9213 9206 rc = VMXReadVmcs32(VMX_VMCS32_CTRL_ENTRY, &u32Val); 9214 AssertRC Break(rc);9207 AssertRC(rc); 9215 9208 Assert(u32Val == pVmcsInfo->u32EntryCtls); 9216 9209 #endif … … 9221 9214 */ 9222 9215 rc = VMXReadVmcsNw(VMX_VMCS_GUEST_RIP, &u64Val); 9223 AssertRC Break(rc);9216 AssertRC(rc); 9224 9217 /* pCtx->rip can be different than the one in the VMCS (e.g. run guest code and VM-exits that don't update it). */ 9225 9218 if ( !fLongModeGuest … … 9235 9228 /* Flags in pCtx can be different (real-on-v86 for instance). We are only concerned about the VMCS contents here. */ 9236 9229 rc = VMXReadVmcsNw(VMX_VMCS_GUEST_RFLAGS, &u64Val); 9237 AssertRC Break(rc);9230 AssertRC(rc); 9238 9231 HMVMX_CHECK_BREAK(!(u64Val & UINT64_C(0xffffffffffc08028)), /* Bit 63:22, Bit 15, 5, 3 MBZ. */ 9239 9232 VMX_IGS_RFLAGS_RESERVED); … … 9243 9236 if ( fLongModeGuest 9244 9237 || ( fUnrestrictedGuest 9245 && !(u 32GuestCr0 & X86_CR0_PE)))9238 && !(u64GuestCr0 & X86_CR0_PE))) 9246 9239 { 9247 9240 HMVMX_CHECK_BREAK(!(u32Eflags & X86_EFL_VM), VMX_IGS_RFLAGS_VM_INVALID); … … 9250 9243 uint32_t u32EntryInfo; 9251 9244 rc = VMXReadVmcs32(VMX_VMCS32_CTRL_ENTRY_INTERRUPTION_INFO, &u32EntryInfo); 9252 AssertRC Break(rc);9245 AssertRC(rc); 9253 9246 if (VMX_ENTRY_INT_INFO_IS_EXT_INT(u32EntryInfo)) 9254 9247 HMVMX_CHECK_BREAK(u32Eflags & X86_EFL_IF, VMX_IGS_RFLAGS_IF_INVALID); … … 9259 9252 if (fLongModeGuest) 9260 9253 { 9261 HMVMX_CHECK_BREAK(u 32GuestCr0 & X86_CR0_PG,VMX_IGS_CR0_PG_LONGMODE);9262 HMVMX_CHECK_BREAK(u 32GuestCr4 & X86_CR4_PAE, VMX_IGS_CR4_PAE_LONGMODE);9254 HMVMX_CHECK_BREAK(u64GuestCr0 & X86_CR0_PG, VMX_IGS_CR0_PG_LONGMODE); 9255 HMVMX_CHECK_BREAK(u64GuestCr4 & X86_CR4_PAE, VMX_IGS_CR4_PAE_LONGMODE); 9263 9256 } 9264 9257 9265 9258 if ( !fLongModeGuest 9266 && (u 32GuestCr4 & X86_CR4_PCIDE))9259 && (u64GuestCr4 & X86_CR4_PCIDE)) 9267 9260 { 9268 9261 HMVMX_ERROR_BREAK(VMX_IGS_CR4_PCIDE); … … 9279 9272 9280 9273 rc = VMXReadVmcsNw(VMX_VMCS_HOST_SYSENTER_ESP, &u64Val); 9281 AssertRC Break(rc);9274 AssertRC(rc); 9282 9275 HMVMX_CHECK_BREAK(X86_IS_CANONICAL(u64Val), VMX_IGS_SYSENTER_ESP_NOT_CANONICAL); 9283 9276 9284 9277 rc = VMXReadVmcsNw(VMX_VMCS_HOST_SYSENTER_EIP, &u64Val); 9285 AssertRC Break(rc);9278 AssertRC(rc); 9286 9279 HMVMX_CHECK_BREAK(X86_IS_CANONICAL(u64Val), VMX_IGS_SYSENTER_EIP_NOT_CANONICAL); 9287 9280 … … 9292 9285 { 9293 9286 rc = VMXReadVmcs64(VMX_VMCS64_GUEST_PERF_GLOBAL_CTRL_FULL, &u64Val); 9294 AssertRC Break(rc);9287 AssertRC(rc); 9295 9288 HMVMX_CHECK_BREAK(!(u64Val & UINT64_C(0xfffffff8fffffffc)), 9296 9289 VMX_IGS_PERF_GLOBAL_MSR_RESERVED); /* Bits 63:35, bits 31:2 MBZ. */ … … 9303 9296 { 9304 9297 rc = VMXReadVmcs64(VMX_VMCS64_GUEST_PAT_FULL, &u64Val); 9305 AssertRC Break(rc);9298 AssertRC(rc); 9306 9299 HMVMX_CHECK_BREAK(!(u64Val & UINT64_C(0x707070707070707)), VMX_IGS_PAT_MSR_RESERVED); 9307 9300 for (unsigned i = 0; i < 8; i++) … … 9328 9321 Assert(pVM->hm.s.vmx.fSupportsVmcsEfer); 9329 9322 rc = VMXReadVmcs64(VMX_VMCS64_GUEST_EFER_FULL, &u64Val); 9330 AssertRC Break(rc);9323 AssertRC(rc); 9331 9324 HMVMX_CHECK_BREAK(!(u64Val & UINT64_C(0xfffffffffffff2fe)), 9332 9325 VMX_IGS_EFER_MSR_RESERVED); /* Bits 63:12, bit 9, bits 7:1 MBZ. */ … … 9337 9330 * iemVmxVmentryCheckGuestState(). */ 9338 9331 HMVMX_CHECK_BREAK( fUnrestrictedGuest 9339 || !(u 32GuestCr0 & X86_CR0_PG)9332 || !(u64GuestCr0 & X86_CR0_PG) 9340 9333 || RT_BOOL(u64Val & MSR_K6_EFER_LMA) == RT_BOOL(u64Val & MSR_K6_EFER_LME), 9341 9334 VMX_IGS_EFER_LMA_LME_MISMATCH); … … 9553 9546 */ 9554 9547 rc = VMXReadVmcsNw(VMX_VMCS_GUEST_GDTR_BASE, &u64Val); 9555 AssertRC Break(rc);9548 AssertRC(rc); 9556 9549 HMVMX_CHECK_BREAK(X86_IS_CANONICAL(u64Val), VMX_IGS_GDTR_BASE_NOT_CANONICAL); 9557 9550 9558 9551 rc = VMXReadVmcsNw(VMX_VMCS_GUEST_IDTR_BASE, &u64Val); 9559 AssertRC Break(rc);9552 AssertRC(rc); 9560 9553 HMVMX_CHECK_BREAK(X86_IS_CANONICAL(u64Val), VMX_IGS_IDTR_BASE_NOT_CANONICAL); 9561 9554 9562 9555 rc = VMXReadVmcs32(VMX_VMCS32_GUEST_GDTR_LIMIT, &u32Val); 9563 AssertRC Break(rc);9556 AssertRC(rc); 9564 9557 HMVMX_CHECK_BREAK(!(u32Val & 0xffff0000), VMX_IGS_GDTR_LIMIT_INVALID); /* Bits 31:16 MBZ. */ 9565 9558 9566 9559 rc = VMXReadVmcs32(VMX_VMCS32_GUEST_IDTR_LIMIT, &u32Val); 9567 AssertRC Break(rc);9560 AssertRC(rc); 9568 9561 HMVMX_CHECK_BREAK(!(u32Val & 0xffff0000), VMX_IGS_IDTR_LIMIT_INVALID); /* Bits 31:16 MBZ. */ 9569 9562 … … 9574 9567 uint32_t u32ActivityState; 9575 9568 rc = VMXReadVmcs32(VMX_VMCS32_GUEST_ACTIVITY_STATE, &u32ActivityState); 9576 AssertRC Break(rc);9569 AssertRC(rc); 9577 9570 HMVMX_CHECK_BREAK( !u32ActivityState 9578 9571 || (u32ActivityState & RT_BF_GET(pVM->hm.s.vmx.Msrs.u64Misc, VMX_BF_MISC_ACTIVITY_STATES)), … … 9582 9575 uint32_t u32IntrState; 9583 9576 rc = VMXReadVmcs32(VMX_VMCS32_GUEST_INT_STATE, &u32IntrState); 9584 AssertRC Break(rc);9577 AssertRC(rc); 9585 9578 if ( u32IntrState == VMX_VMCS_GUEST_INT_STATE_BLOCK_MOVSS 9586 9579 || u32IntrState == VMX_VMCS_GUEST_INT_STATE_BLOCK_STI) … … 9631 9624 /* Pending debug exceptions. */ 9632 9625 rc = VMXReadVmcs64(VMX_VMCS_GUEST_PENDING_DEBUG_XCPTS, &u64Val); 9633 AssertRC Break(rc);9626 AssertRC(rc); 9634 9627 /* Bits 63:15, Bit 13, Bits 11:4 MBZ. */ 9635 9628 HMVMX_CHECK_BREAK(!(u64Val & UINT64_C(0xffffffffffffaff0)), VMX_IGS_LONGMODE_PENDING_DEBUG_RESERVED); … … 9656 9649 /* VMCS link pointer. */ 9657 9650 rc = VMXReadVmcs64(VMX_VMCS64_GUEST_VMCS_LINK_PTR_FULL, &u64Val); 9658 AssertRC Break(rc);9651 AssertRC(rc); 9659 9652 if (u64Val != UINT64_C(0xffffffffffffffff)) 9660 9653 { … … 9679 9672 { 9680 9673 rc = VMXReadVmcs64(VMX_VMCS64_GUEST_PDPTE0_FULL, &u64Val); 9681 AssertRC Break(rc);9674 AssertRC(rc); 9682 9675 HMVMX_CHECK_BREAK(!(u64Val & X86_PDPE_PAE_MBZ_MASK), VMX_IGS_PAE_PDPTE_RESERVED); 9683 9676 9684 9677 rc = VMXReadVmcs64(VMX_VMCS64_GUEST_PDPTE1_FULL, &u64Val); 9685 AssertRC Break(rc);9678 AssertRC(rc); 9686 9679 HMVMX_CHECK_BREAK(!(u64Val & X86_PDPE_PAE_MBZ_MASK), VMX_IGS_PAE_PDPTE_RESERVED); 9687 9680 9688 9681 rc = VMXReadVmcs64(VMX_VMCS64_GUEST_PDPTE2_FULL, &u64Val); 9689 AssertRC Break(rc);9682 AssertRC(rc); 9690 9683 HMVMX_CHECK_BREAK(!(u64Val & X86_PDPE_PAE_MBZ_MASK), VMX_IGS_PAE_PDPTE_RESERVED); 9691 9684 9692 9685 rc = VMXReadVmcs64(VMX_VMCS64_GUEST_PDPTE3_FULL, &u64Val); 9693 AssertRC Break(rc);9686 AssertRC(rc); 9694 9687 HMVMX_CHECK_BREAK(!(u64Val & X86_PDPE_PAE_MBZ_MASK), VMX_IGS_PAE_PDPTE_RESERVED); 9695 9688 } … … 14518 14511 14519 14512 #ifdef VBOX_STRICT 14520 uint32_t fIntrState; 14521 RTHCUINTREG uHCReg; 14522 uint64_t u64Val; 14523 uint32_t u32Val; 14513 uint32_t fIntrState; 14514 uint64_t u64Val; 14524 14515 hmR0VmxReadEntryIntInfoVmcs(pVmxTransient); 14525 14516 hmR0VmxReadEntryXcptErrorCodeVmcs(pVmxTransient); 14526 14517 hmR0VmxReadEntryInstrLenVmcs(pVmxTransient); 14527 rc = VMXReadVmcs32(VMX_VMCS32_GUEST_INT_STATE, &fIntrState);14528 AssertRC(rc);14529 14518 14530 14519 Log4(("uInvalidReason %u\n", uInvalidReason)); … … 14532 14521 Log4(("VMX_VMCS32_CTRL_ENTRY_EXCEPTION_ERRCODE %#RX32\n", pVmxTransient->uEntryXcptErrorCode)); 14533 14522 Log4(("VMX_VMCS32_CTRL_ENTRY_INSTR_LENGTH %#RX32\n", pVmxTransient->cbEntryInstr)); 14523 14524 rc = VMXReadVmcs32(VMX_VMCS32_GUEST_INT_STATE, &fIntrState); AssertRC(rc); 14534 14525 Log4(("VMX_VMCS32_GUEST_INT_STATE %#RX32\n", fIntrState)); 14535 14536 rc = VMXReadVmcs32(VMX_VMCS_GUEST_CR0, &u32Val); AssertRC(rc); 14537 Log4(("VMX_VMCS_GUEST_CR0 %#RX32\n", u32Val)); 14538 rc = VMXReadVmcsNw(VMX_VMCS_CTRL_CR0_MASK, &uHCReg); AssertRC(rc); 14539 Log4(("VMX_VMCS_CTRL_CR0_MASK %#RHr\n", uHCReg)); 14540 rc = VMXReadVmcsNw(VMX_VMCS_CTRL_CR0_READ_SHADOW, &uHCReg); AssertRC(rc); 14541 Log4(("VMX_VMCS_CTRL_CR4_READ_SHADOW %#RHr\n", uHCReg)); 14542 rc = VMXReadVmcsNw(VMX_VMCS_CTRL_CR4_MASK, &uHCReg); AssertRC(rc); 14543 Log4(("VMX_VMCS_CTRL_CR4_MASK %#RHr\n", uHCReg)); 14544 rc = VMXReadVmcsNw(VMX_VMCS_CTRL_CR4_READ_SHADOW, &uHCReg); AssertRC(rc); 14545 Log4(("VMX_VMCS_CTRL_CR4_READ_SHADOW %#RHr\n", uHCReg)); 14526 rc = VMXReadVmcsNw(VMX_VMCS_GUEST_CR0, &u64Val); AssertRC(rc); 14527 Log4(("VMX_VMCS_GUEST_CR0 %#RX64\n", u64Val)); 14528 rc = VMXReadVmcsNw(VMX_VMCS_CTRL_CR0_MASK, &u64Val); AssertRC(rc); 14529 Log4(("VMX_VMCS_CTRL_CR0_MASK %#RX64\n", u64Val)); 14530 rc = VMXReadVmcsNw(VMX_VMCS_CTRL_CR0_READ_SHADOW, &u64Val); AssertRC(rc); 14531 Log4(("VMX_VMCS_CTRL_CR4_READ_SHADOW %#RX64\n", u64Val)); 14532 rc = VMXReadVmcsNw(VMX_VMCS_CTRL_CR4_MASK, &u64Val); AssertRC(rc); 14533 Log4(("VMX_VMCS_CTRL_CR4_MASK %#RX64\n", u64Val)); 14534 rc = VMXReadVmcsNw(VMX_VMCS_CTRL_CR4_READ_SHADOW, &u64Val); AssertRC(rc); 14535 Log4(("VMX_VMCS_CTRL_CR4_READ_SHADOW %#RX64\n", u64Val)); 14546 14536 if (pVCpu->CTX_SUFF(pVM)->hm.s.fNestedPaging) 14547 14537 { … … 14549 14539 Log4(("VMX_VMCS64_CTRL_EPTP_FULL %#RX64\n", u64Val)); 14550 14540 } 14551 14552 14541 hmR0DumpRegs(pVCpu); 14553 14542 #endif
Note:
See TracChangeset
for help on using the changeset viewer.