Changeset 45618 in vbox for trunk/src/VBox/Main
- Timestamp:
- Apr 18, 2013 6:41:07 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 85118
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r45554 r45618 899 899 } 900 900 901 BOOL fH WVirtExEnabled;902 hrc = pMachine->GetHWVirtExProperty(HWVirtExPropertyType_Enabled, &fH WVirtExEnabled); H();903 if (cCpus > 1 && !fH WVirtExEnabled)904 { 905 LogRel(("Forced fH WVirtExEnabled to TRUE by SMP guest.\n"));906 fH WVirtExEnabled = TRUE;907 } 908 if (!fH WVirtExEnabled && fIsGuest64Bit)901 BOOL fHMEnabled; 902 hrc = pMachine->GetHWVirtExProperty(HWVirtExPropertyType_Enabled, &fHMEnabled); H(); 903 if (cCpus > 1 && !fHMEnabled) 904 { 905 LogRel(("Forced fHMEnabled to TRUE by SMP guest.\n")); 906 fHMEnabled = TRUE; 907 } 908 if (!fHMEnabled && fIsGuest64Bit) 909 909 { 910 910 LogRel(("WARNING! 64-bit guest type selected on host without hardware virtualization (VT-x or AMD-V).\n")); … … 912 912 } 913 913 914 BOOL fH wVirtExtForced;914 BOOL fHMForced; 915 915 #ifdef VBOX_WITH_RAW_MODE 916 916 /* - With more than 4GB PGM will use different RAMRANGE sizes for raw … … 918 918 - With more than one virtual CPU, raw-mode isn't a fallback option. 919 919 - With a 64-bit guest, raw-mode isn't a fallback option either. */ 920 fH wVirtExtForced = fHWVirtExEnabled921 922 923 920 fHMForced = fHMEnabled 921 && ( cbRam + cbRamHole > _4G 922 || cCpus > 1 923 || fIsGuest64Bit); 924 924 # ifdef RT_OS_DARWIN 925 fH wVirtExtForced = fHWVirtExEnabled;925 fHMForced = fHMEnabled; 926 926 # endif 927 if (fH wVirtExtForced)927 if (fHMForced) 928 928 { 929 929 if (cbRam + cbRamHole > _4G) 930 LogRel(("fH wVirtExtForced=TRUE - Lots of RAM\n"));930 LogRel(("fHMForced=TRUE - Lots of RAM\n")); 931 931 if (cCpus > 1) 932 LogRel(("fH wVirtExtForced=TRUE - SMP\n"));932 LogRel(("fHMForced=TRUE - SMP\n")); 933 933 if (fIsGuest64Bit) 934 LogRel(("fH wVirtExtForced=TRUE - 64-bit guest\n"));934 LogRel(("fHMForced=TRUE - 64-bit guest\n")); 935 935 # ifdef RT_OS_DARWIN 936 LogRel(("fH wVirtExtForced=TRUE - Darwin host\n"));936 LogRel(("fHMForced=TRUE - Darwin host\n")); 937 937 # endif 938 938 } 939 939 #else /* !VBOX_WITH_RAW_MODE */ 940 fH WVirtExEnabled = fHwVirtExtForced = TRUE;941 LogRel(("fH wVirtExtForced=TRUE - No raw-mode support in this build!\n"));940 fHMEnabled = fHMForced = TRUE; 941 LogRel(("fHMForced=TRUE - No raw-mode support in this build!\n")); 942 942 #endif /* !VBOX_WITH_RAW_MODE */ 943 if (!fH wVirtExtForced) /* No need to query if already forced above. */944 { 945 hrc = pMachine->GetHWVirtExProperty(HWVirtExPropertyType_Force, &fH wVirtExtForced); H();946 if (fH wVirtExtForced)947 LogRel(("fH wVirtExtForced=TRUE - HWVirtExPropertyType_Force\n"));948 } 949 InsertConfigInteger(pRoot, "H wVirtExtForced", fHwVirtExtForced);950 951 /* /H WVirtExt/xzy */952 PCFGMNODE pH WVirtExt;953 InsertConfigNode(pRoot, "H WVirtExt", &pHWVirtExt);954 InsertConfigInteger(p HWVirtExt, "Enabled", fHWVirtExEnabled);955 if (fH WVirtExEnabled)943 if (!fHMForced) /* No need to query if already forced above. */ 944 { 945 hrc = pMachine->GetHWVirtExProperty(HWVirtExPropertyType_Force, &fHMForced); H(); 946 if (fHMForced) 947 LogRel(("fHMForced=TRUE - HWVirtExPropertyType_Force\n")); 948 } 949 InsertConfigInteger(pRoot, "HMEnabled", fHMEnabled); 950 951 /* /HM/xzy */ 952 PCFGMNODE pHM; 953 InsertConfigNode(pRoot, "HM", &pHM); 954 InsertConfigInteger(pRoot, "HMForced", fHMForced); 955 if (fHMEnabled) 956 956 { 957 957 /* Indicate whether 64-bit guests are supported or not. */ 958 InsertConfigInteger(pH WVirtExt, "64bitEnabled", fIsGuest64Bit);958 InsertConfigInteger(pHM, "64bitEnabled", fIsGuest64Bit); 959 959 #if ARCH_BITS == 32 /* The recompiler must use VBoxREM64 (32-bit host only). */ 960 960 PCFGMNODE pREM; … … 974 974 * We may want to consider adding more guest OSes (Solaris) later on. 975 975 */ 976 InsertConfigInteger(pH WVirtExt, "TPRPatchingEnabled", 1);976 InsertConfigInteger(pHM, "TPRPatchingEnabled", 1); 977 977 } 978 978 } 979 979 980 980 /* HWVirtEx exclusive mode */ 981 BOOL fH WVirtExExclusive = true;982 hrc = pMachine->GetHWVirtExProperty(HWVirtExPropertyType_Exclusive, &fH WVirtExExclusive); H();983 InsertConfigInteger(pH WVirtExt, "Exclusive", fHWVirtExExclusive);981 BOOL fHMExclusive = true; 982 hrc = pMachine->GetHWVirtExProperty(HWVirtExPropertyType_Exclusive, &fHMExclusive); H(); 983 InsertConfigInteger(pHM, "Exclusive", fHMExclusive); 984 984 985 985 /* Nested paging (VT-x/AMD-V) */ 986 986 BOOL fEnableNestedPaging = false; 987 987 hrc = pMachine->GetHWVirtExProperty(HWVirtExPropertyType_NestedPaging, &fEnableNestedPaging); H(); 988 InsertConfigInteger(pH WVirtExt, "EnableNestedPaging", fEnableNestedPaging);988 InsertConfigInteger(pHM, "EnableNestedPaging", fEnableNestedPaging); 989 989 990 990 /* Large pages; requires nested paging */ 991 991 BOOL fEnableLargePages = false; 992 992 hrc = pMachine->GetHWVirtExProperty(HWVirtExPropertyType_LargePages, &fEnableLargePages); H(); 993 InsertConfigInteger(pH WVirtExt, "EnableLargePages", fEnableLargePages);993 InsertConfigInteger(pHM, "EnableLargePages", fEnableLargePages); 994 994 995 995 /* VPID (VT-x) */ 996 996 BOOL fEnableVPID = false; 997 997 hrc = pMachine->GetHWVirtExProperty(HWVirtExPropertyType_VPID, &fEnableVPID); H(); 998 InsertConfigInteger(pH WVirtExt, "EnableVPID", fEnableVPID);998 InsertConfigInteger(pHM, "EnableVPID", fEnableVPID); 999 999 1000 1000 /* … … 1335 1335 InsertConfigInteger(pCfg, "MonitorCount", cMonitorCount); 1336 1336 #ifdef VBOX_WITH_2X_4GB_ADDR_SPACE 1337 InsertConfigInteger(pCfg, "R0Enabled", fH WVirtExEnabled);1337 InsertConfigInteger(pCfg, "R0Enabled", fHMEnabled); 1338 1338 #endif 1339 1339
Note:
See TracChangeset
for help on using the changeset viewer.