VirtualBox

Changeset 101468 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Oct 17, 2023 10:13:30 AM (16 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
159537
Message:

Main: Allow running x86 VMs (via IEM) on ARM hosts again. Running ARM VMs on x86 is not supported though. bugref:10384

Location:
trunk/src/VBox/Main/src-client
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleImplConfigArmV8.cpp

    r101462 r101468  
    131131    hrc = virtualBox->COMGETTER(Host)(host.asOutParam());                                   H();
    132132
     133    PlatformArchitecture_T platformArchHost;
     134    hrc = host->COMGETTER(Architecture)(&platformArchHost);                                 H();
     135
    133136    ComPtr<ISystemProperties> systemProperties;
    134137    hrc = virtualBox->COMGETTER(SystemProperties)(systemProperties.asOutParam());           H();
     
    149152    uint64_t const cbRam   = cRamMBs * (uint64_t)_1M;
    150153
    151     ComPtr<IPlatform> pPlatform;
    152     hrc = pMachine->COMGETTER(Platform)(pPlatform.asOutParam());                            H();
     154    ComPtr<IPlatform> platform;
     155    hrc = pMachine->COMGETTER(Platform)(platform.asOutParam());                             H();
     156
     157    /* Note: Should be guarded by VBOX_WITH_VIRT_ARMV8, but we check this anyway here. */
     158#if 1 /* For now we only support running ARM VMs on ARM hosts. */
     159    PlatformArchitecture_T platformArchMachine;
     160    hrc = platform->COMGETTER(Architecture)(&platformArchMachine);                          H();
     161    if (platformArchMachine != platformArchHost)
     162        return pVMM->pfnVMR3SetError(pUVM, VERR_PLATFORM_ARCH_NOT_SUPPORTED, RT_SRC_POS,
     163                                     N_("VM platform architecture (%s) not supported on this host (%s)."),
     164                                     Global::stringifyPlatformArchitecture(platformArchMachine),
     165                                     Global::stringifyPlatformArchitecture(platformArchHost));
     166#endif
    153167
    154168    ComPtr<IPlatformProperties> pPlatformProperties;
    155     hrc = pPlatform->COMGETTER(Properties)(pPlatformProperties.asOutParam());               H();
     169    hrc = platform->COMGETTER(Properties)(pPlatformProperties.asOutParam());                H();
    156170
    157171    ChipsetType_T chipsetType;
    158     hrc = pPlatform->COMGETTER(ChipsetType)(&chipsetType);                                  H();
     172    hrc = platform->COMGETTER(ChipsetType)(&chipsetType);                                   H();
    159173
    160174    ULONG cCpus = 1;
  • trunk/src/VBox/Main/src-client/ConsoleImplConfigX86.cpp

    r101465 r101468  
    465465    hrc = virtualBox->COMGETTER(SystemProperties)(systemProperties.asOutParam());           H();
    466466
    467     PlatformArchitecture_T platformArchHost;
    468     hrc = host->COMGETTER(Architecture)(&platformArchHost);                                 H();
    469 
    470467    ComPtr<IFirmwareSettings> firmwareSettings;
    471468    hrc = pMachine->COMGETTER(FirmwareSettings)(firmwareSettings.asOutParam());             H();
     
    502499    ComPtr<IPlatform> platform;
    503500    pMachine->COMGETTER(Platform)(platform.asOutParam());                                   H();
    504 
    505 #if 0 /* For now we only support running same-same architectures (e.g. x86 VMs on x86 hosts). */
    506     PlatformArchitecture_T platformArchMachine;
    507     hrc = platform->COMGETTER(Architecture)(&platformArchMachine);                          H();
    508     if (platformArchMachine != platformArchHost)
    509         return pVMM->pfnVMR3SetError(pUVM, VERR_PLATFORM_ARCH_NOT_SUPPORTED, RT_SRC_POS,
    510                                      N_("VM platform architecture (%s) not supported on this host (%s)."),
    511                                      Global::stringifyPlatformArchitecture(platformArchMachine),
    512                                      Global::stringifyPlatformArchitecture(platformArchHost));
    513 #endif
    514501
    515502    ChipsetType_T chipsetType;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette