VirtualBox

Changeset 74699 in vbox for trunk


Ignore:
Timestamp:
Oct 9, 2018 6:48:48 AM (6 years ago)
Author:
vboxsync
Message:

VMM/IEM: Nested VMX: bugref:9180 Added VMX non-root mode CR0 guest/host masking for SMSW (memory operand).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h

    r74698 r74699  
    53275327    IEM_SVM_CHECK_READ_CR0_INTERCEPT(pVCpu, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
    53285328
     5329    uint64_t u64GuestCr0 = pVCpu->cpum.GstCtx.cr0;
     5330#ifdef VBOX_WITH_NESTED_HWVIRT_VMX
     5331    if (IEM_VMX_IS_NON_ROOT_MODE(pVCpu))
     5332        u64GuestCr0 = iemVmxMaskCr0CR4(pVCpu, 0 /* iCrReg */, u64GuestCr0);
     5333#endif
     5334
    53295335    uint16_t u16Value;
    53305336    if (IEM_GET_TARGET_CPU(pVCpu) > IEMTARGETCPU_386)
    5331         u16Value = (uint16_t)pVCpu->cpum.GstCtx.cr0;
     5337        u16Value = (uint16_t)u64GuestCr0;
    53325338    else if (IEM_GET_TARGET_CPU(pVCpu) >= IEMTARGETCPU_386)
    5333         u16Value = (uint16_t)pVCpu->cpum.GstCtx.cr0 | 0xffe0;
     5339        u16Value = (uint16_t)u64GuestCr0 | 0xffe0;
    53345340    else
    5335         u16Value = (uint16_t)pVCpu->cpum.GstCtx.cr0 | 0xfff0;
     5341        u16Value = (uint16_t)u64GuestCr0 | 0xfff0;
    53365342
    53375343    VBOXSTRICTRC rcStrict = iemMemStoreDataU16(pVCpu, iEffSeg, GCPtrEffDst, u16Value);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette