VirtualBox

Changeset 20222 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Jun 3, 2009 9:04:49 AM (16 years ago)
Author:
vboxsync
Message:

Multi-core changes.
Return correct error in 64 bits guest smp on 32 host case.

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/CPUM.cpp

    r20158 r20222  
    387387    pCPUM->aGuestCpuIdStd[1].ebx &= 0x0000ffff;
    388388#ifdef VBOX_WITH_MULTI_CORE
    389     /* Set the Maximum number of addressable IDs for logical processors in this physical package (bits 16-23) */
    390     pCPUM->aGuestCpuIdStd[1].ebx |= ((pVM->cCPUs - 1) << 16);
    391 
    392389    if (pVM->cCPUs > 1)
     390    {
     391        /* Set the Maximum number of addressable IDs for logical processors in this physical package (bits 16-23) */
     392        pCPUM->aGuestCpuIdStd[1].ebx |= ((pVM->cCPUs - 1) << 16);
    393393        pCPUM->aGuestCpuIdStd[1].edx |= X86_CPUID_FEATURE_EDX_HTT;  /* necessary for hyper-threading *or* multi-core CPUs */
     394    }
    394395#endif
    395396
     
    421422    pCPUM->aGuestCpuIdStd[4].eax = pCPUM->aGuestCpuIdStd[4].ebx = 0;
    422423#ifdef VBOX_WITH_MULTI_CORE
    423     if (pVM->cpum.s.enmCPUVendor == CPUMCPUVENDOR_INTEL)
     424    if (    pVM->cCPUs > 1
     425        &&  pVM->cpum.s.enmCPUVendor == CPUMCPUVENDOR_INTEL)
    424426    {
    425427        AssertReturn(pVM->cCPUs <= 64, VERR_TOO_MANY_CPUS);
     
    507509        pCPUM->aGuestCpuIdExt[8].ecx = 0;
    508510#ifdef VBOX_WITH_MULTI_CORE
    509         if (pVM->cpum.s.enmCPUVendor == CPUMCPUVENDOR_AMD)
     511        if (    pVM->cCPUs > 1
     512            &&  pVM->cpum.s.enmCPUVendor == CPUMCPUVENDOR_AMD)
    510513        {
    511514            /* Legacy method to determine the number of cores. */
  • trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp

    r20142 r20222  
    25182518    RTHCUINTREG     uOldEFlags;
    25192519
    2520     /* @todo This code is not guest SMP safe (hyper stack) */
    2521     AssertReturn(pVM->cCPUs == 1, VERR_ACCESS_DENIED);
     2520    /* @todo This code is not guest SMP safe (hyper stack and switchers) */
     2521    AssertReturn(pVM->cCPUs == 1, VERR_TOO_MANY_CPUS);
    25222522    Assert(pfnHandler);
    25232523
  • trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp

    r20142 r20222  
    41374137    RTHCPHYS        pPageCpuPhys;
    41384138
    4139     /* @todo This code is not guest SMP safe (hyper stack) */
    4140     AssertReturn(pVM->cCPUs == 1, VERR_ACCESS_DENIED);
     4139    /* @todo This code is not guest SMP safe (hyper stack and switchers) */
     4140    AssertReturn(pVM->cCPUs == 1, VERR_TOO_MANY_CPUS);
    41414141    AssertReturn(pVM->hwaccm.s.pfnHost32ToGuest64R0, VERR_INTERNAL_ERROR);
    41424142    Assert(pVCpu->hwaccm.s.vmx.VMCSCache.Write.cValidEntries <= RT_ELEMENTS(pVCpu->hwaccm.s.vmx.VMCSCache.Write.aField));
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