Changeset 48308 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Sep 5, 2013 1:52:30 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r48203 r48308 675 675 HyperCR0 &= ~X86_CR0_EM; 676 676 HyperCR0 |= cr0 & X86_CR0_EM; 677 Log(("CPUM New HyperCR0=%#x\n", HyperCR0));677 Log(("CPUM: New HyperCR0=%#x\n", HyperCR0)); 678 678 ASMSetCR0(HyperCR0); 679 679 } … … 699 699 HyperCR0 &= ~(X86_CR0_TS | X86_CR0_EM | X86_CR0_MP); 700 700 HyperCR0 |= cr0 & (X86_CR0_TS | X86_CR0_EM | X86_CR0_MP); 701 Log(("CPUM New HyperCR0=%#x\n", HyperCR0));701 Log(("CPUM: New HyperCR0=%#x\n", HyperCR0)); 702 702 ASMSetCR0(HyperCR0); 703 703 } … … 1150 1150 if (CPUMGetGuestCpuVendor(pVCpu->CTX_SUFF(pVM)) != CPUMCPUVENDOR_INTEL) 1151 1151 { 1152 Log((" MSR %#x is Intel, the virtual CPU isn't an Intel one -> #GP\n", idMsr));1152 Log(("CPUM: MSR %#x is Intel, the virtual CPU isn't an Intel one -> #GP\n", idMsr)); 1153 1153 rc = VERR_CPUM_RAISE_GP_0; 1154 1154 break; … … 1194 1194 if (CPUMGetGuestCpuVendor(pVCpu->CTX_SUFF(pVM)) != CPUMCPUVENDOR_AMD) 1195 1195 { 1196 Log((" MSR %#x is AMD, the virtual CPU isn't an Intel one -> #GP\n", idMsr));1196 Log(("CPUM: MSR %#x is AMD, the virtual CPU isn't an Intel one -> #GP\n", idMsr)); 1197 1197 return VERR_CPUM_RAISE_GP_0; 1198 1198 } … … 1299 1299 && (uValue & 0xff) != 6) ) 1300 1300 { 1301 Log((" MSR_IA32_MTRR_DEF_TYPE: #GP(0) - writing reserved value (%#llx)\n", uValue));1301 Log(("CPUM: MSR_IA32_MTRR_DEF_TYPE: #GP(0) - writing reserved value (%#llx)\n", uValue)); 1302 1302 return VERR_CPUM_RAISE_GP_0; 1303 1303 } … … 1382 1382 && (pVCpu->cpum.s.Guest.cr0 & X86_CR0_PG)) 1383 1383 { 1384 Log((" Illegal MSR_K6_EFER_LME change: paging is enabled!!\n"));1384 Log(("CPUM: Illegal MSR_K6_EFER_LME change: paging is enabled!!\n")); 1385 1385 return VERR_CPUM_RAISE_GP_0; 1386 1386 } … … 1457 1457 if (CPUMGetGuestCpuVendor(pVCpu->CTX_SUFF(pVM)) != CPUMCPUVENDOR_INTEL) 1458 1458 { 1459 Log((" MSR %#x is Intel, the virtual CPU isn't an Intel one -> #GP\n", idMsr));1459 Log(("CPUM: MSR %#x is Intel, the virtual CPU isn't an Intel one -> #GP\n", idMsr)); 1460 1460 return VERR_CPUM_RAISE_GP_0; 1461 1461 } … … 1471 1471 if (CPUMGetGuestCpuVendor(pVCpu->CTX_SUFF(pVM)) != CPUMCPUVENDOR_AMD) 1472 1472 { 1473 Log((" MSR %#x is AMD, the virtual CPU isn't an Intel one -> #GP\n", idMsr));1473 Log(("CPUM: MSR %#x is AMD, the virtual CPU isn't an Intel one -> #GP\n", idMsr)); 1474 1474 return VERR_CPUM_RAISE_GP_0; 1475 1475 } … … 1922 1922 && pVM->cpum.s.enmGuestCpuVendor == CPUMCPUVENDOR_AMD) 1923 1923 pVM->cpum.s.aGuestCpuIdExt[1].edx |= X86_CPUID_AMD_FEATURE_EDX_APIC; 1924 LogRel(("CPUM SetGuestCpuIdFeature: Enabled APIC\n"));1924 LogRel(("CPUM: SetGuestCpuIdFeature: Enabled APIC\n")); 1925 1925 break; 1926 1926 … … 1931 1931 if (pVM->cpum.s.aGuestCpuIdStd[0].eax >= 1) 1932 1932 pVM->cpum.s.aGuestCpuIdStd[1].ecx |= X86_CPUID_FEATURE_ECX_X2APIC; 1933 LogRel(("CPUM SetGuestCpuIdFeature: Enabled x2APIC\n"));1933 LogRel(("CPUM: SetGuestCpuIdFeature: Enabled x2APIC\n")); 1934 1934 break; 1935 1935 … … 1948 1948 if (pVM->cpum.s.aGuestCpuIdStd[0].eax >= 1) 1949 1949 pVM->cpum.s.aGuestCpuIdStd[1].edx |= X86_CPUID_FEATURE_EDX_SEP; 1950 LogRel(("CPUM SetGuestCpuIdFeature: Enabled sysenter/exit\n"));1950 LogRel(("CPUM: SetGuestCpuIdFeature: Enabled sysenter/exit\n")); 1951 1951 break; 1952 1952 } … … 1970 1970 #endif 1971 1971 { 1972 LogRel((" WARNING: Can't turn on SYSCALL/SYSRET when the host doesn't support it!!\n"));1972 LogRel(("CPUM: WARNING! Can't turn on SYSCALL/SYSRET when the host doesn't support it!\n")); 1973 1973 return; 1974 1974 } … … 1976 1976 /* Valid for both Intel and AMD CPUs, although only in 64 bits mode for Intel. */ 1977 1977 pVM->cpum.s.aGuestCpuIdExt[1].edx |= X86_CPUID_EXT_FEATURE_EDX_SYSCALL; 1978 LogRel(("CPUM SetGuestCpuIdFeature: Enabled syscall/ret\n"));1978 LogRel(("CPUM: SetGuestCpuIdFeature: Enabled syscall/ret\n")); 1979 1979 break; 1980 1980 } … … 1988 1988 if (!(ASMCpuId_EDX(1) & X86_CPUID_FEATURE_EDX_PAE)) 1989 1989 { 1990 LogRel((" WARNING: Can't turn on PAE when the host doesn't support it!!\n"));1990 LogRel(("CPUM: WARNING! Can't turn on PAE when the host doesn't support it!\n")); 1991 1991 return; 1992 1992 } … … 1997 1997 && pVM->cpum.s.enmGuestCpuVendor == CPUMCPUVENDOR_AMD) 1998 1998 pVM->cpum.s.aGuestCpuIdExt[1].edx |= X86_CPUID_AMD_FEATURE_EDX_PAE; 1999 LogRel(("CPUM SetGuestCpuIdFeature: Enabled PAE\n"));1999 LogRel(("CPUM: SetGuestCpuIdFeature: Enabled PAE\n")); 2000 2000 break; 2001 2001 } … … 2010 2010 || !(ASMCpuId_EDX(0x80000001) & X86_CPUID_EXT_FEATURE_EDX_LONG_MODE)) 2011 2011 { 2012 LogRel((" WARNING: Can't turn on LONG MODE when the host doesn't support it!!\n"));2012 LogRel(("CPUM: WARNING! Can't turn on LONG MODE when the host doesn't support it!\n")); 2013 2013 return; 2014 2014 } … … 2016 2016 /* Valid for both Intel and AMD. */ 2017 2017 pVM->cpum.s.aGuestCpuIdExt[1].edx |= X86_CPUID_EXT_FEATURE_EDX_LONG_MODE; 2018 LogRel(("CPUM SetGuestCpuIdFeature: Enabled LONG MODE\n"));2018 LogRel(("CPUM: SetGuestCpuIdFeature: Enabled LONG MODE\n")); 2019 2019 break; 2020 2020 } … … 2029 2029 || !(ASMCpuId_EDX(0x80000001) & X86_CPUID_EXT_FEATURE_EDX_NX)) 2030 2030 { 2031 LogRel((" WARNING: Can't turn on NX/XD when the host doesn't support it!!\n"));2031 LogRel(("CPUM: WARNING! Can't turn on NX/XD when the host doesn't support it!\n")); 2032 2032 return; 2033 2033 } … … 2035 2035 /* Valid for both Intel and AMD. */ 2036 2036 pVM->cpum.s.aGuestCpuIdExt[1].edx |= X86_CPUID_EXT_FEATURE_EDX_NX; 2037 LogRel(("CPUM SetGuestCpuIdFeature: Enabled NX\n"));2037 LogRel(("CPUM: SetGuestCpuIdFeature: Enabled NX\n")); 2038 2038 break; 2039 2039 } … … 2048 2048 || !(ASMCpuId_ECX(0x80000001) & X86_CPUID_EXT_FEATURE_ECX_LAHF_SAHF)) 2049 2049 { 2050 LogRel((" WARNING: Can't turn on LAHF/SAHF when the host doesn't support it!!\n"));2050 LogRel(("CPUM: WARNING! Can't turn on LAHF/SAHF when the host doesn't support it!\n")); 2051 2051 return; 2052 2052 } … … 2054 2054 /* Valid for both Intel and AMD. */ 2055 2055 pVM->cpum.s.aGuestCpuIdExt[1].ecx |= X86_CPUID_EXT_FEATURE_ECX_LAHF_SAHF; 2056 LogRel(("CPUM SetGuestCpuIdFeature: Enabled LAHF/SAHF\n"));2056 LogRel(("CPUM: SetGuestCpuIdFeature: Enabled LAHF/SAHF\n")); 2057 2057 break; 2058 2058 } … … 2065 2065 && pVM->cpum.s.enmGuestCpuVendor == CPUMCPUVENDOR_AMD) 2066 2066 pVM->cpum.s.aGuestCpuIdExt[1].edx |= X86_CPUID_AMD_FEATURE_EDX_PAT; 2067 LogRel(("CPUM SetGuestCpuIdFeature: Enabled PAT\n"));2067 LogRel(("CPUM: SetGuestCpuIdFeature: Enabled PAT\n")); 2068 2068 break; 2069 2069 } … … 2080 2080 { 2081 2081 if (!pVM->cpum.s.u8PortableCpuIdLevel) 2082 LogRel((" WARNING: Can't turn on RDTSCP when the host doesn't support it!!\n"));2082 LogRel(("CPUM: WARNING! Can't turn on RDTSCP when the host doesn't support it!\n")); 2083 2083 return; 2084 2084 } … … 2086 2086 /* Valid for both Intel and AMD. */ 2087 2087 pVM->cpum.s.aGuestCpuIdExt[1].edx |= X86_CPUID_EXT_FEATURE_EDX_RDTSCP; 2088 LogRel(("CPUM SetGuestCpuIdFeature: Enabled RDTSCP.\n"));2088 LogRel(("CPUM: SetGuestCpuIdFeature: Enabled RDTSCP.\n")); 2089 2089 break; 2090 2090 } … … 2096 2096 if (pVM->cpum.s.aGuestCpuIdStd[0].eax >= 1) 2097 2097 pVM->cpum.s.aGuestCpuIdStd[1].ecx |= X86_CPUID_FEATURE_ECX_HVP; 2098 LogRel(("CPUM SetGuestCpuIdFeature: Enabled Hypervisor Present bit\n"));2098 LogRel(("CPUM: SetGuestCpuIdFeature: Enabled Hypervisor Present bit\n")); 2099 2099 break; 2100 2100 … … 2182 2182 && pVM->cpum.s.enmGuestCpuVendor == CPUMCPUVENDOR_AMD) 2183 2183 pVM->cpum.s.aGuestCpuIdExt[1].edx &= ~X86_CPUID_AMD_FEATURE_EDX_APIC; 2184 Log(("CPUM ClearGuestCpuIdFeature: Disabled APIC\n"));2184 Log(("CPUM: ClearGuestCpuIdFeature: Disabled APIC\n")); 2185 2185 break; 2186 2186 … … 2191 2191 if (pVM->cpum.s.aGuestCpuIdStd[0].eax >= 1) 2192 2192 pVM->cpum.s.aGuestCpuIdStd[1].ecx &= ~X86_CPUID_FEATURE_ECX_X2APIC; 2193 Log(("CPUM ClearGuestCpuIdFeature: Disabled x2APIC\n"));2193 Log(("CPUM: ClearGuestCpuIdFeature: Disabled x2APIC\n")); 2194 2194 break; 2195 2195 … … 2201 2201 && pVM->cpum.s.enmGuestCpuVendor == CPUMCPUVENDOR_AMD) 2202 2202 pVM->cpum.s.aGuestCpuIdExt[1].edx &= ~X86_CPUID_AMD_FEATURE_EDX_PAE; 2203 Log(("CPUM ClearGuestCpuIdFeature: Disabled PAE!\n"));2203 Log(("CPUM: ClearGuestCpuIdFeature: Disabled PAE!\n")); 2204 2204 break; 2205 2205 } … … 2212 2212 && pVM->cpum.s.enmGuestCpuVendor == CPUMCPUVENDOR_AMD) 2213 2213 pVM->cpum.s.aGuestCpuIdExt[1].edx &= ~X86_CPUID_AMD_FEATURE_EDX_PAT; 2214 Log(("CPUM ClearGuestCpuIdFeature: Disabled PAT!\n"));2214 Log(("CPUM: ClearGuestCpuIdFeature: Disabled PAT!\n")); 2215 2215 break; 2216 2216 } … … 2234 2234 if (pVM->cpum.s.aGuestCpuIdExt[0].eax >= 0x80000001) 2235 2235 pVM->cpum.s.aGuestCpuIdExt[1].edx &= ~X86_CPUID_EXT_FEATURE_EDX_RDTSCP; 2236 Log(("CPUM ClearGuestCpuIdFeature: Disabled RDTSCP!\n"));2236 Log(("CPUM: ClearGuestCpuIdFeature: Disabled RDTSCP!\n")); 2237 2237 break; 2238 2238 }
Note:
See TracChangeset
for help on using the changeset viewer.