Changeset 14704 in vbox for trunk/src/VBox
- Timestamp:
- Nov 27, 2008 1:49:48 PM (16 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/HWACCM.cpp
r14563 r14704 778 778 } 779 779 } 780 781 #if (HC_ARCH_BITS == 32) && defined(VBOX_ENABLE_64_BITS_GUESTS) 782 if ( pVM->fHWACCMEnabled 783 && CPUMGetGuestCpuIdFeature(pVM, CPUMCPUIDFEATURE_LONG_MODE)) 784 { 785 rc = VMMR3InitSwitcher3264(pVM); 786 if (VBOX_FAILURE(rc)) 787 { 788 LogRel(("WARNING: Unable to map the VM structure into the intermediate page table; disabling long mode support\n")); 789 CPUMClearGuestCpuIdFeature(pVM, CPUMCPUIDFEATURE_LONG_MODE); 790 CPUMClearGuestCpuIdFeature(pVM, CPUMCPUIDFEATURE_LAHF); 791 } 792 } 793 #endif 780 794 return VINF_SUCCESS; 781 795 } -
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r14411 r14704 1501 1501 } 1502 1502 1503 case CPUMCPUIDFEATURE_LONG_MODE: 1504 { 1505 if (pVM->cpum.s.aGuestCpuIdExt[0].eax >= 0x80000001) 1506 return !!(pVM->cpum.s.aGuestCpuIdExt[1].edx & X86_CPUID_AMD_FEATURE_EDX_LONG_MODE); 1507 break; 1508 } 1509 1503 1510 default: 1504 1511 AssertMsgFailed(("enmFeature=%d\n", enmFeature)); … … 1559 1566 pVM->cpum.s.aGuestCpuIdExt[1].edx &= ~X86_CPUID_AMD_FEATURE_EDX_PAT; 1560 1567 LogRel(("CPUMClearGuestCpuIdFeature: Disabled PAT!\n")); 1568 break; 1569 } 1570 1571 case CPUMCPUIDFEATURE_LONG_MODE: 1572 { 1573 if (pVM->cpum.s.aGuestCpuIdExt[0].eax >= 0x80000001) 1574 pVM->cpum.s.aGuestCpuIdExt[1].edx &= ~X86_CPUID_AMD_FEATURE_EDX_LONG_MODE; 1575 break; 1576 } 1577 1578 case CPUMCPUIDFEATURE_LAHF: 1579 { 1580 if (pVM->cpum.s.aGuestCpuIdExt[0].eax >= 0x80000001) 1581 pVM->cpum.s.aGuestCpuIdExt[1].ecx &= ~X86_CPUID_AMD_FEATURE_ECX_LAHF_SAHF; 1561 1582 break; 1562 1583 } -
trunk/src/VBox/VMM/VMMSwitcher.cpp
r14653 r14704 213 213 } 214 214 215 216 215 /** 217 216 * Relocate the switchers, called by VMMR#Relocate. … … 635 634 break; 636 635 } 637 636 #endif 638 637 /* 639 638 * 64-bit HC pointer to the CPUM instance data (no argument). … … 645 644 break; 646 645 } 647 #endif648 646 649 647 /* … … 954 952 } 955 953 954 /** 955 * Setup the 32->64 world switcher 956 * 957 * @returns VBox status code. 958 * @param pVM VM handle. 959 */ 960 VMMR3DECL(int) VMMR3InitSwitcher3264(PVM pVM) 961 { 962 int rc; 963 964 uint32_t cPages = RT_ALIGN_Z(pVM->cbSelf, PAGE_SIZE) >> PAGE_SHIFT; 965 966 /* Map the entire VM structure into the intermediate page tables as we need to have access 967 * to them in the 32->64 switcher. 968 */ 969 for (unsigned i=0;i<cPages;i++) 970 { 971 rc = PGMR3MapIntermediate(pVM, pVM->pVMR0 + i*PAGE_SIZE, pVM->paVMPagesR3[i].Phys, PAGE_SIZE); 972 if (VBOX_FAILURE(rc)) 973 { 974 Log(("PGMR3MapIntermediate %RHv %RHp failed with %Rrc\n", pVM->pVMR0 + i*PAGE_SIZE, pVM->paVMPagesR3[i].Phys, rc)); 975 break; 976 } 977 } 978 return rc; 979 } 980 956 981 957 982 /**
Note:
See TracChangeset
for help on using the changeset viewer.