VirtualBox

Changeset 48649 in vbox for trunk


Ignore:
Timestamp:
Sep 24, 2013 9:05:56 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
89247
Message:

VMM/HMVMXR0: VMCS size is bits 44:32 not 43:32. Assert what the Intel spec. claims as well.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/hm_vmx.h

    r48543 r48649  
    115115 *  for storing guest MSRs. */
    116116#define VMX_UFC_INSUFFICIENT_GUEST_MSR_STORAGE                  6
     117/** Invalid VMCS size. */
     118#define VMX_UFC_INVALID_VMCS_SIZE                               7
    117119/** @} */
    118120
     
    10791081#define MSR_IA32_VMX_BASIC_INFO_VMCS_ID(a)                      ((a) & 0x7FFFFFFF)
    10801082/** Size of the VMCS. */
    1081 #define MSR_IA32_VMX_BASIC_INFO_VMCS_SIZE(a)                    (((a) >> 32) & 0xFFF)
     1083#define MSR_IA32_VMX_BASIC_INFO_VMCS_SIZE(a)                    (((a) >> 32) & 0x1FFF)
    10821084/** Width of physical address used for the VMCS.
    10831085 *  0 -> limited to the available amount of physical ram
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r48648 r48649  
    945945        AssertPtr(pVCpu);
    946946
     947        /* The VMCS size cannot be more than 4096 bytes. See Intel spec. Appendix A.1 "Basic VMX Information". */
     948        AssertReturnStmt(MSR_IA32_VMX_BASIC_INFO_VMCS_SIZE(pVM->hm.s.vmx.Msrs.u64BasicInfo) <= PAGE_SIZE,
     949                         pVCpu->hm.s.u32HMError = VMX_UFC_INVALID_VMCS_SIZE,
     950                         VERR_HM_UNSUPPORTED_CPU_FEATURE_COMBO);
     951
    947952        /* Allocate the VM control structure (VMCS). */
    948         AssertReturn(MSR_IA32_VMX_BASIC_INFO_VMCS_SIZE(pVM->hm.s.vmx.Msrs.u64BasicInfo) <= PAGE_SIZE, VERR_INTERNAL_ERROR);
    949953        rc = hmR0VmxPageAllocZ(&pVCpu->hm.s.vmx.hMemObjVmcs, &pVCpu->hm.s.vmx.pvVmcs, &pVCpu->hm.s.vmx.HCPhysVmcs);
    950954        if (RT_FAILURE(rc))
Note: See TracChangeset for help on using the changeset viewer.

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