Changeset 76549 in vbox
- Timestamp:
- Dec 31, 2018 4:08:00 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
r76200 r76549 5555 5555 5556 5556 uint64_t const uOldCrX = pVCpu->cpum.GstCtx.cr0; 5557 uint32_t const fValid = X86_CR0_PE | X86_CR0_MP | X86_CR0_EM | X86_CR0_TS 5558 | X86_CR0_ET | X86_CR0_NE | X86_CR0_WP | X86_CR0_AM 5559 | X86_CR0_NW | X86_CR0_CD | X86_CR0_PG; 5557 uint32_t const fValid = CPUMGetGuestCR0ValidMask(); 5560 5558 5561 5559 /* ET is hardcoded on 486 and later. */ … … 5799 5797 uint64_t const uOldCrX = pVCpu->cpum.GstCtx.cr4; 5800 5798 5801 /** @todo Shouldn't this look at the guest CPUID bits to determine 5802 * valid bits? e.g. if guest CPUID doesn't allow X86_CR4_OSXMMEEXCPT, we 5803 * should #GP(0). */ 5804 /* reserved bits */ 5805 uint32_t fValid = X86_CR4_VME | X86_CR4_PVI 5806 | X86_CR4_TSD | X86_CR4_DE 5807 | X86_CR4_PSE | X86_CR4_PAE 5808 | X86_CR4_MCE | X86_CR4_PGE 5809 | X86_CR4_PCE | X86_CR4_OSFXSR 5810 | X86_CR4_OSXMMEEXCPT; 5811 if (IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fVmx) 5812 fValid |= X86_CR4_VMXE; 5813 if (IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fXSaveRstor) 5814 fValid |= X86_CR4_OSXSAVE; 5815 if (IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fPcid) 5816 fValid |= X86_CR4_PCIDE; 5817 if (IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fFsGsBase) 5818 fValid |= X86_CR4_FSGSBASE; 5799 /* Reserved bits. */ 5800 uint32_t const fValid = CPUMGetGuestCR4ValidMask(pVCpu->CTX_SUFF(pVM)); 5819 5801 if (uNewCrX & ~(uint64_t)fValid) 5820 5802 {
Note:
See TracChangeset
for help on using the changeset viewer.