Changeset 79074 in vbox
- Timestamp:
- Jun 11, 2019 5:27:55 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
r78919 r79074 5433 5433 if (IEM_VMX_IS_NON_ROOT_MODE(pVCpu)) 5434 5434 { 5435 PCVMXVVMCS pVmcs = pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs); 5436 Assert(pVmcs); 5435 5437 switch (iCrReg) 5436 5438 { 5437 5439 /* CR0/CR4 reads are subject to masking when in VMX non-root mode. */ 5438 case 0: crX = CPUMGetGuestVmxMaskedCr0(pVCpu, &pVCpu->cpum.GstCtx ); break;5439 case 4: crX = CPUMGetGuestVmxMaskedCr4(pVCpu, &pVCpu->cpum.GstCtx ); break;5440 case 0: crX = CPUMGetGuestVmxMaskedCr0(pVCpu, &pVCpu->cpum.GstCtx, pVmcs->u64Cr0Mask.u); break; 5441 case 4: crX = CPUMGetGuestVmxMaskedCr4(pVCpu, &pVCpu->cpum.GstCtx, pVmcs->u64Cr4Mask.u); break; 5440 5442 5441 5443 case 3: … … 5472 5474 5473 5475 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 5474 uint64_t const u64GuestCr0 = !IEM_VMX_IS_NON_ROOT_MODE(pVCpu) 5475 ? pVCpu->cpum.GstCtx.cr0 5476 : CPUMGetGuestVmxMaskedCr0(pVCpu, &pVCpu->cpum.GstCtx); 5476 uint64_t u64MaskedCr0; 5477 if (!IEM_VMX_IS_NON_ROOT_MODE(pVCpu)) 5478 u64MaskedCr0 = pVCpu->cpum.GstCtx.cr0; 5479 else 5480 { 5481 PCVMXVVMCS pVmcs = pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs); 5482 Assert(pVmcs); 5483 u64MaskedCr0 = CPUMGetGuestVmxMaskedCr0(pVCpu, &pVCpu->cpum.GstCtx, pVmcs->u64Cr0Mask.u); 5484 } 5485 uint64_t const u64GuestCr0 = u64MaskedCr0; 5477 5486 #else 5478 5487 uint64_t const u64GuestCr0 = pVCpu->cpum.GstCtx.cr0; … … 5518 5527 5519 5528 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 5520 uint64_t const u64GuestCr0 = !IEM_VMX_IS_NON_ROOT_MODE(pVCpu) 5521 ? pVCpu->cpum.GstCtx.cr0 5522 : CPUMGetGuestVmxMaskedCr0(pVCpu, &pVCpu->cpum.GstCtx); 5529 uint64_t u64MaskedCr0; 5530 if (!IEM_VMX_IS_NON_ROOT_MODE(pVCpu)) 5531 u64MaskedCr0 = pVCpu->cpum.GstCtx.cr0; 5532 else 5533 { 5534 PCVMXVVMCS pVmcs = pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs); 5535 Assert(pVmcs); 5536 u64MaskedCr0 = CPUMGetGuestVmxMaskedCr0(pVCpu, &pVCpu->cpum.GstCtx, pVmcs->u64Cr0Mask.u); 5537 } 5538 uint64_t const u64GuestCr0 = u64MaskedCr0; 5523 5539 #else 5524 5540 uint64_t const u64GuestCr0 = pVCpu->cpum.GstCtx.cr0;
Note:
See TracChangeset
for help on using the changeset viewer.