Changeset 93460 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jan 27, 2022 4:50:15 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp
r93115 r93460 799 799 unsigned cVRDEProperties = 0; 800 800 const char *aVRDEProperties[16]; 801 unsigned fRawR0 = ~0U;802 unsigned fRawR3 = ~0U;803 unsigned fPATM = ~0U;804 unsigned fCSAM = ~0U;805 801 unsigned fPaused = 0; 806 802 #ifdef VBOX_WITH_RECORDING … … 828 824 enum eHeadlessOptions 829 825 { 830 OPT_RAW_R0 = 0x100, 831 OPT_NO_RAW_R0, 832 OPT_RAW_R3, 833 OPT_NO_RAW_R3, 834 OPT_PATM, 835 OPT_NO_PATM, 836 OPT_CSAM, 837 OPT_NO_CSAM, 838 OPT_SETTINGSPW, 826 OPT_SETTINGSPW = 0x100, 839 827 OPT_SETTINGSPW_FILE, 840 828 OPT_COMMENT, … … 856 844 { "-vrdeproperty", 'e', RTGETOPT_REQ_STRING }, 857 845 { "--vrdeproperty", 'e', RTGETOPT_REQ_STRING }, 858 { "-rawr0", OPT_RAW_R0, 0 },859 { "--rawr0", OPT_RAW_R0, 0 },860 { "-norawr0", OPT_NO_RAW_R0, 0 },861 { "--norawr0", OPT_NO_RAW_R0, 0 },862 { "-rawr3", OPT_RAW_R3, 0 },863 { "--rawr3", OPT_RAW_R3, 0 },864 { "-norawr3", OPT_NO_RAW_R3, 0 },865 { "--norawr3", OPT_NO_RAW_R3, 0 },866 { "-patm", OPT_PATM, 0 },867 { "--patm", OPT_PATM, 0 },868 { "-nopatm", OPT_NO_PATM, 0 },869 { "--nopatm", OPT_NO_PATM, 0 },870 { "-csam", OPT_CSAM, 0 },871 { "--csam", OPT_CSAM, 0 },872 { "-nocsam", OPT_NO_CSAM, 0 },873 { "--nocsam", OPT_NO_CSAM, 0 },874 846 { "--settingspw", OPT_SETTINGSPW, RTGETOPT_REQ_STRING }, 875 847 { "--settingspwfile", OPT_SETTINGSPW_FILE, RTGETOPT_REQ_STRING }, … … 921 893 RTPrintf("Warning: too many VRDE properties. Ignored: '%s'\n", ValueUnion.psz); 922 894 break; 923 case OPT_RAW_R0:924 fRawR0 = true;925 break;926 case OPT_NO_RAW_R0:927 fRawR0 = false;928 break;929 case OPT_RAW_R3:930 fRawR3 = true;931 break;932 case OPT_NO_RAW_R3:933 fRawR3 = false;934 break;935 case OPT_PATM:936 fPATM = true;937 break;938 case OPT_NO_PATM:939 fPATM = false;940 break;941 case OPT_CSAM:942 fCSAM = true;943 break;944 case OPT_NO_CSAM:945 fCSAM = false;946 break;947 895 case OPT_SETTINGSPW: 948 896 pcszSettingsPw = ValueUnion.psz; … … 1164 1112 #endif /* defined(VBOX_WITH_RECORDING) */ 1165 1113 1114 #if 0 1166 1115 /* get the machine debugger (isn't necessarily available) */ 1167 1116 ComPtr <IMachineDebugger> machineDebugger; 1168 1117 console->COMGETTER(Debugger)(machineDebugger.asOutParam()); 1169 1118 if (machineDebugger) 1170 {1171 1119 Log(("Machine debugger available!\n")); 1172 } 1173 1174 if (fRawR0 != ~0U) 1175 { 1176 if (!machineDebugger) 1177 { 1178 RTPrintf("Error: No debugger object; -%srawr0 cannot be executed!\n", fRawR0 ? "" : "no"); 1179 break; 1180 } 1181 machineDebugger->COMSETTER(RecompileSupervisor)(!fRawR0); 1182 } 1183 if (fRawR3 != ~0U) 1184 { 1185 if (!machineDebugger) 1186 { 1187 RTPrintf("Error: No debugger object; -%srawr3 cannot be executed!\n", fRawR3 ? "" : "no"); 1188 break; 1189 } 1190 machineDebugger->COMSETTER(RecompileUser)(!fRawR3); 1191 } 1192 if (fPATM != ~0U) 1193 { 1194 if (!machineDebugger) 1195 { 1196 RTPrintf("Error: No debugger object; -%spatm cannot be executed!\n", fPATM ? "" : "no"); 1197 break; 1198 } 1199 machineDebugger->COMSETTER(PATMEnabled)(fPATM); 1200 } 1201 if (fCSAM != ~0U) 1202 { 1203 if (!machineDebugger) 1204 { 1205 RTPrintf("Error: No debugger object; -%scsam cannot be executed!\n", fCSAM ? "" : "no"); 1206 break; 1207 } 1208 machineDebugger->COMSETTER(CSAMEnabled)(fCSAM); 1209 } 1120 #endif 1210 1121 1211 1122 /* initialize global references */ -
trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
r93115 r93460 683 683 #endif 684 684 #ifdef VBOXSDL_ADVANCED_OPTIONS 685 " --[no]rawr0 Enable or disable raw ring 3\n" 686 " --[no]rawr3 Enable or disable raw ring 0\n" 687 " --[no]patm Enable or disable PATM\n" 688 " --[no]csam Enable or disable CSAM\n" 689 " --[no]hwvirtex Permit or deny the usage of VT-x/AMD-V\n" 685 " --warpdrive <pct> Sets the warp driver rate in percent (100 = normal)\n" 690 686 #endif 691 687 "\n" … … 705 701 " LCtrl + Alt + F12 Reset statistics counter\n" 706 702 " LCtrl + Alt + F11 Dump statistics to logfile\n" 707 " Alt + F12 Toggle R0 recompiler\n"708 " Alt + F11 Toggle R3 recompiler\n"709 " Alt + F10 Toggle PATM\n"710 " Alt + F9 Toggle CSAM\n"711 703 " Alt + F8 Toggle single step mode\n" 712 704 " LCtrl/RCtrl + F12 Toggle logger\n" … … 910 902 #endif 911 903 #ifdef VBOXSDL_ADVANCED_OPTIONS 912 unsigned fRawR0 = ~0U;913 unsigned fRawR3 = ~0U;914 unsigned fPATM = ~0U;915 unsigned fCSAM = ~0U;916 unsigned fHWVirt = ~0U;917 904 uint32_t u32WarpDrive = 0; 918 905 #endif … … 1347 1334 #endif 1348 1335 #ifdef VBOXSDL_ADVANCED_OPTIONS 1349 else if ( !strcmp(argv[curArg], "--rawr0")1350 || !strcmp(argv[curArg], "-rawr0"))1351 fRawR0 = true;1352 else if ( !strcmp(argv[curArg], "--norawr0")1353 || !strcmp(argv[curArg], "-norawr0"))1354 fRawR0 = false;1355 else if ( !strcmp(argv[curArg], "--rawr3")1356 || !strcmp(argv[curArg], "-rawr3"))1357 fRawR3 = true;1358 else if ( !strcmp(argv[curArg], "--norawr3")1359 || !strcmp(argv[curArg], "-norawr3"))1360 fRawR3 = false;1361 else if ( !strcmp(argv[curArg], "--patm")1362 || !strcmp(argv[curArg], "-patm"))1363 fPATM = true;1364 else if ( !strcmp(argv[curArg], "--nopatm")1365 || !strcmp(argv[curArg], "-nopatm"))1366 fPATM = false;1367 else if ( !strcmp(argv[curArg], "--csam")1368 || !strcmp(argv[curArg], "-csam"))1369 fCSAM = true;1370 else if ( !strcmp(argv[curArg], "--nocsam")1371 || !strcmp(argv[curArg], "-nocsam"))1372 fCSAM = false;1373 else if ( !strcmp(argv[curArg], "--hwvirtex")1374 || !strcmp(argv[curArg], "-hwvirtex"))1375 fHWVirt = true;1376 else if ( !strcmp(argv[curArg], "--nohwvirtex")1377 || !strcmp(argv[curArg], "-nohwvirtex"))1378 fHWVirt = false;1379 1336 else if ( !strcmp(argv[curArg], "--warpdrive") 1380 1337 || !strcmp(argv[curArg], "-warpdrive")) … … 2160 2117 rc = E_FAIL; 2161 2118 #ifdef VBOXSDL_ADVANCED_OPTIONS 2162 if (fRawR0 != ~0U)2163 {2164 if (!gpMachineDebugger)2165 {2166 RTPrintf("Error: No debugger object; -%srawr0 cannot be executed!\n", fRawR0 ? "" : "no");2167 goto leave;2168 }2169 gpMachineDebugger->COMSETTER(RecompileSupervisor)(!fRawR0);2170 }2171 if (fRawR3 != ~0U)2172 {2173 if (!gpMachineDebugger)2174 {2175 RTPrintf("Error: No debugger object; -%srawr3 cannot be executed!\n", fRawR3 ? "" : "no");2176 goto leave;2177 }2178 gpMachineDebugger->COMSETTER(RecompileUser)(!fRawR3);2179 }2180 if (fPATM != ~0U)2181 {2182 if (!gpMachineDebugger)2183 {2184 RTPrintf("Error: No debugger object; -%spatm cannot be executed!\n", fPATM ? "" : "no");2185 goto leave;2186 }2187 gpMachineDebugger->COMSETTER(PATMEnabled)(fPATM);2188 }2189 if (fCSAM != ~0U)2190 {2191 if (!gpMachineDebugger)2192 {2193 RTPrintf("Error: No debugger object; -%scsam cannot be executed!\n", fCSAM ? "" : "no");2194 goto leave;2195 }2196 gpMachineDebugger->COMSETTER(CSAMEnabled)(fCSAM);2197 }2198 if (fHWVirt != ~0U)2199 {2200 gpMachine->SetHWVirtExProperty(HWVirtExPropertyType_Enabled, fHWVirt);2201 }2202 2119 if (u32WarpDrive != 0) 2203 2120 { … … 3780 3697 switch (ev->keysym.sym) 3781 3698 { 3782 // pressing Alt-F12 toggles the supervisor recompiler 3783 case SDLK_F12: 3784 { 3785 BOOL recompileSupervisor; 3786 gpMachineDebugger->COMGETTER(RecompileSupervisor)(&recompileSupervisor); 3787 gpMachineDebugger->COMSETTER(RecompileSupervisor)(!recompileSupervisor); 3788 break; 3789 } 3790 // pressing Alt-F11 toggles the user recompiler 3791 case SDLK_F11: 3792 { 3793 BOOL recompileUser; 3794 gpMachineDebugger->COMGETTER(RecompileUser)(&recompileUser); 3795 gpMachineDebugger->COMSETTER(RecompileUser)(!recompileUser); 3796 break; 3797 } 3798 // pressing Alt-F10 toggles the patch manager 3799 case SDLK_F10: 3800 { 3801 BOOL patmEnabled; 3802 gpMachineDebugger->COMGETTER(PATMEnabled)(&patmEnabled); 3803 gpMachineDebugger->COMSETTER(PATMEnabled)(!patmEnabled); 3804 break; 3805 } 3806 // pressing Alt-F9 toggles CSAM 3807 case SDLK_F9: 3808 { 3809 BOOL csamEnabled; 3810 gpMachineDebugger->COMGETTER(CSAMEnabled)(&csamEnabled); 3811 gpMachineDebugger->COMSETTER(CSAMEnabled)(!csamEnabled); 3812 break; 3813 } 3814 // pressing Alt-F8 toggles singlestepping mode 3699 // pressing Alt-F8 toggles singlestepping mode 3815 3700 case SDLK_F8: 3816 3817 3818 3819 3820 3821 3701 { 3702 BOOL singlestepEnabled; 3703 gpMachineDebugger->COMGETTER(SingleStep)(&singlestepEnabled); 3704 gpMachineDebugger->COMSETTER(SingleStep)(!singlestepEnabled); 3705 break; 3706 } 3822 3707 default: 3823 3708 break; … … 4401 4286 { 4402 4287 // query the machine state 4403 BOOL recompileSupervisor = FALSE;4404 BOOL recompileUser = FALSE;4405 BOOL patmEnabled = FALSE;4406 BOOL csamEnabled = FALSE;4407 4288 BOOL singlestepEnabled = FALSE; 4408 4289 BOOL logEnabled = FALSE; 4409 BOOL hwVirtEnabled = FALSE;4290 VMExecutionEngine_T enmExecEngine = VMExecutionEngine_NotSet; 4410 4291 ULONG virtualTimeRate = 100; 4411 gpMachineDebugger->COMGETTER(RecompileSupervisor)(&recompileSupervisor);4412 gpMachineDebugger->COMGETTER(RecompileUser)(&recompileUser);4413 gpMachineDebugger->COMGETTER(PATMEnabled)(&patmEnabled);4414 gpMachineDebugger->COMGETTER(CSAMEnabled)(&csamEnabled);4415 4292 gpMachineDebugger->COMGETTER(LogEnabled)(&logEnabled); 4416 4293 gpMachineDebugger->COMGETTER(SingleStep)(&singlestepEnabled); 4417 gpMachineDebugger->COMGETTER( HWVirtExEnabled)(&hwVirtEnabled);4294 gpMachineDebugger->COMGETTER(ExecutionEngine)(&enmExecEngine); 4418 4295 gpMachineDebugger->COMGETTER(VirtualTimeRate)(&virtualTimeRate); 4419 4296 RTStrPrintf(szTitle + strlen(szTitle), sizeof(szTitle) - strlen(szTitle), 4420 " [STEP=%d CS=%d PAT=%d RR0=%d RR3=%d LOG=%d HWVirt=%d", 4421 singlestepEnabled == TRUE, csamEnabled == TRUE, patmEnabled == TRUE, 4422 recompileSupervisor == FALSE, recompileUser == FALSE, 4423 logEnabled == TRUE, hwVirtEnabled == TRUE); 4297 " [STEP=%d LOG=%d EXEC=%s", 4298 singlestepEnabled == TRUE, logEnabled == TRUE, 4299 enmExecEngine == VMExecutionEngine_NotSet ? "NotSet" 4300 : enmExecEngine == VMExecutionEngine_RawMode ? "RAW" 4301 : enmExecEngine == VMExecutionEngine_HwVirt ? "HM" 4302 : enmExecEngine == VMExecutionEngine_NativeApi ? "NEM" : "UNK"); 4424 4303 char *psz = strchr(szTitle, '\0'); 4425 4304 if (virtualTimeRate != 100) -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp
r93115 r93460 192 192 #endif 193 193 , m_fRestoreCurrentSnapshot(false) 194 , m_fDisablePatm(false)195 , m_fDisableCsam(false)196 , m_fRecompileSupervisor(false)197 , m_fRecompileUser(false)198 194 , m_fExecuteAllInIem(false) 199 195 , m_uWarpPct(100) … … 488 484 } 489 485 /* VMM Options: */ 490 else if (!::strcmp(arg, "-- disable-patm"))486 else if (!::strcmp(arg, "--execute-all-in-iem")) 491 487 { 492 488 enmOptType = OptType_VMRunner; 493 m_fDisablePatm = true; 494 } 495 else if (!::strcmp(arg, "--disable-csam")) 496 { 497 enmOptType = OptType_VMRunner; 498 m_fDisableCsam = true; 499 } 500 else if (!::strcmp(arg, "--recompile-supervisor")) 501 { 502 enmOptType = OptType_VMRunner; 503 m_fRecompileSupervisor = true; 504 } 505 else if (!::strcmp(arg, "--recompile-user")) 506 { 507 enmOptType = OptType_VMRunner; 508 m_fRecompileUser = true; 509 } 510 else if (!::strcmp(arg, "--recompile-all")) 511 { 512 enmOptType = OptType_VMRunner; 513 m_fDisablePatm = m_fDisableCsam = m_fRecompileSupervisor = m_fRecompileUser = true; 514 } 515 else if (!::strcmp(arg, "--execute-all-in-iem")) 516 { 517 enmOptType = OptType_VMRunner; 518 m_fDisablePatm = m_fDisableCsam = m_fExecuteAllInIem = true; 489 m_fExecuteAllInIem = true; 519 490 } 520 491 else if (!::strcmp(arg, "--driverless")) -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.h
r93115 r93460 256 256 QUuid getDvdImage() const { return m_uDvdImage; } 257 257 258 /** Returns the --disable-patm option value. */259 bool isPatmDisabled() const { return m_fDisablePatm; }260 /** Returns the --disable-csam option value. */261 bool isCsamDisabled() const { return m_fDisableCsam; }262 /** Returns the --recompile-supervisor option value. */263 bool isSupervisorCodeExecedRecompiled() const { return m_fRecompileSupervisor; }264 /** Returns the --recompile-user option value. */265 bool isUserCodeExecedRecompiled() const { return m_fRecompileUser; }266 258 /** Returns the --execute-all-in-iem option value. */ 267 259 bool areWeToExecuteAllInIem() const { return m_fExecuteAllInIem; } … … 678 670 QUuid m_uDvdImage; 679 671 680 /** Holds the --disable-patm option value. */681 bool m_fDisablePatm;682 /** Holds the --disable-csam option value. */683 bool m_fDisableCsam;684 /** Holds the --recompile-supervisor option value. */685 bool m_fRecompileSupervisor;686 /** Holds the --recompile-user option value. */687 bool m_fRecompileUser;688 672 /** Holds the --execute-all-in-iem option value. */ 689 673 bool m_fExecuteAllInIem; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r93115 r93460 173 173 if (!debugger().isNull() && debugger().isOk()) 174 174 { 175 if (uiCommon().isPatmDisabled())176 debugger().SetPATMEnabled(false);177 if (uiCommon().isCsamDisabled())178 debugger().SetCSAMEnabled(false);179 if (uiCommon().isSupervisorCodeExecedRecompiled())180 debugger().SetRecompileSupervisor(true);181 if (uiCommon().isUserCodeExecedRecompiled())182 debugger().SetRecompileUser(true);183 175 if (uiCommon().areWeToExecuteAllInIem()) 184 176 debugger().SetExecuteAllInIEM(true);
Note:
See TracChangeset
for help on using the changeset viewer.