- Timestamp:
- Sep 7, 2023 1:59:53 PM (13 months ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 4 edited
-
src-server/PlatformARMImpl.cpp (modified) (1 diff)
-
src-server/PlatformImpl.cpp (modified) (12 diffs)
-
src-server/PlatformX86Impl.cpp (modified) (1 diff)
-
xml/Settings.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/PlatformARMImpl.cpp
r101052 r101054 172 172 { 173 173 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 174 m->bd.rollback(); 174 if (m) 175 m->bd.rollback(); 175 176 } 176 177 -
trunk/src/VBox/Main/src-server/PlatformImpl.cpp
r101052 r101054 92 92 m->bd.allocate(); 93 93 94 /* Allocates architecture-dependent stuff. */ 95 HRESULT hrc = i_initArchitecture(m->bd->architectureType); 96 AssertComRCReturnRC(hrc); 94 /* Allocates architecture-dependent stuff. 95 * Note: We ignore the return value here, as the machine object expects a working platform object. 96 We always want a working platform object, no matter if we support the current platform architecture or not. */ 97 i_initArchitecture(m->bd->architectureType); 97 98 98 99 /* Confirm a successful initialization */ 99 100 autoInitSpan.setSucceeded(); 100 101 102 LogFlowThisFuncLeave(); 101 103 return S_OK; 102 104 } … … 129 131 m->bd.share(aThat->m->bd); 130 132 131 /* Allocates architecture-dependent stuff. */ 132 HRESULT hrc = i_initArchitecture(aThat->m->bd->architectureType, aThat); 133 AssertComRCReturnRC(hrc); 133 /* Allocates architecture-dependent stuff. 134 * Note: We ignore the return value here, as the machine object expects a working platform object. 135 We always want a working platform object, no matter if we support the current platform architecture or not. */ 136 i_initArchitecture(aThat->m->bd->architectureType, aThat); 134 137 135 138 autoInitSpan.setSucceeded(); … … 163 166 m->bd.attachCopy(aThat->m->bd); 164 167 165 /* Allocates architecture-dependent stuff. */ 166 HRESULT hrc = i_initArchitecture(aThat->m->bd->architectureType, aThat, true /* fCopy */); 167 AssertComRCReturnRC(hrc); 168 /* Allocates architecture-dependent stuff. 169 * Note: We ignore the return value here, as the machine object expects a working platform object. 170 We always want a working platform object, no matter if we support the current platform architecture or not. */ 171 i_initArchitecture(aThat->m->bd->architectureType, aThat, true /* fCopy */); 168 172 169 173 autoInitSpan.setSucceeded(); … … 277 281 case PlatformArchitecture_x86: 278 282 { 279 /* mX86 is constant during life time, no need to lock */ 280 return mX86.queryInterfaceTo(aX86.asOutParam()); 283 if (mX86.isNotNull()) 284 { 285 /* mX86 is constant during life time, no need to lock. */ 286 return mX86.queryInterfaceTo(aX86.asOutParam()); 287 } 288 break; 281 289 } 282 290 … … 286 294 } 287 295 288 return VBOX_E_PLATFORM_ARCH_NOT_SUPPORTED;296 return setErrorVrc(VERR_PLATFORM_ARCH_NOT_SUPPORTED, ("x86-specific platform settings are not available on this platform")); 289 297 } 290 298 … … 302 310 case PlatformArchitecture_ARM: 303 311 { 304 /* mARM is constant during life time, no need to lock */ 305 return mARM.queryInterfaceTo(aARM.asOutParam()); 312 if (mARM.isNotNull()) 313 { 314 /* mARM is constant during life time, no need to lock. */ 315 return mARM.queryInterfaceTo(aARM.asOutParam()); 316 } 317 break; 306 318 } 307 319 #else … … 313 325 } 314 326 315 return VBOX_E_PLATFORM_ARCH_NOT_SUPPORTED;327 return setErrorVrc(VERR_PLATFORM_ARCH_NOT_SUPPORTED, ("ARM-specific platform settings are not available on this platform")); 316 328 } 317 329 … … 538 550 return mX86->i_saveSettings(data.x86); 539 551 540 #ifdef VBOX_WITH_VIRT_ARMV8552 #ifdef VBOX_WITH_VIRT_ARMV8 541 553 case PlatformArchitecture_ARM: 542 554 return mARM->i_saveSettings(data.arm); … … 554 566 { 555 567 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 556 m->bd.rollback(); 557 558 switch (m->bd->architectureType) 559 { 560 case PlatformArchitecture_x86: 561 return mX86->i_rollback(); 562 563 #ifdef VBOX_WITH_VIRT_ARMV8 564 case PlatformArchitecture_ARM: 565 return mARM->i_rollback(); 566 #endif 567 case PlatformArchitecture_None: 568 RT_FALL_THROUGH(); 569 default: 570 break; 571 } 572 573 AssertFailedReturnVoid(); 568 569 if (m) 570 { 571 m->bd.rollback(); 572 573 switch (m->bd->architectureType) 574 { 575 case PlatformArchitecture_x86: 576 if (mX86.isNotNull()) 577 return mX86->i_rollback(); 578 break; 579 580 #ifdef VBOX_WITH_VIRT_ARMV8 581 case PlatformArchitecture_ARM: 582 if (mARM.isNotNull()) 583 return mARM->i_rollback(); 584 break; 585 #endif 586 case PlatformArchitecture_None: 587 RT_FALL_THROUGH(); 588 default: 589 break; 590 } 591 } 574 592 } 575 593 … … 675 693 676 694 HRESULT hrc = S_OK; 677 678 /** @todo BUGBUG We only support ARM VMs on ARM hosts for now.679 * Remove this limitation once we have support for FE/Qt and x86-on-ARM support. */680 #if defined(RT_ARCH_ARM32) || defined(RT_ARCH_ARM64)681 m->bd->architectureType = PlatformArchitecture_ARM;682 #else683 m->bd->architectureType = aArchitecture;684 #endif685 695 686 696 /* Currently we only keep the current platform-specific object around, … … 728 738 #endif 729 739 default: 730 AssertFailedStmt(hrc = VBOX_E_PLATFORM_ARCH_NOT_SUPPORTED);740 hrc = VBOX_E_PLATFORM_ARCH_NOT_SUPPORTED; 731 741 break; 732 742 } … … 796 806 break; 797 807 808 #ifdef VBOX_WITH_VIRT_ARMV8 798 809 case PlatformArchitecture_ARM: 799 AssertFailed();/** @todo BUGBUG Implement this! */800 break; 801 810 /** @todo BUGBUG Implement this! */ 811 break; 812 #endif 802 813 case PlatformArchitecture_None: 803 814 RT_FALL_THROUGH(); -
trunk/src/VBox/Main/src-server/PlatformX86Impl.cpp
r101052 r101054 181 181 { 182 182 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 183 m->bd.rollback(); 183 if (m) 184 m->bd.rollback(); 184 185 } 185 186 -
trunk/src/VBox/Main/xml/Settings.cpp
r101050 r101054 5407 5407 #endif 5408 5408 default: 5409 AssertFailed();5410 5409 break; 5411 5410 }
Note:
See TracChangeset
for help on using the changeset viewer.

