VirtualBox

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


Ignore:
Timestamp:
May 22, 2023 6:36:24 PM (21 months ago)
Author:
vboxsync
Message:

Main/src-client/ConsoleImpl: Add some _very_ basic config code to run an ARMv8 based guest inside the main VirtualBox frontend, can be activated by a CFGM key, bugref:10384

Location:
trunk/src/VBox/Main/src-client
Files:
1 added
3 edited

Legend:

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

    r99808 r99913  
    543543    if (aLockType == LockType_VM)
    544544    {
     545        const char *pszVMM = "VBoxVMM";
     546
     547#ifdef VBOX_WITH_VIRT_ARMV8
     548        Bstr value;
     549        hrc = mMachine->GetExtraData(Bstr("VBoxInternal2/ArmV8Virt").raw(),
     550                                     value.asOutParam());
     551        if (   hrc   == S_OK
     552            && value == "1")
     553            pszVMM = "VBoxVMMArm";
     554#endif
     555
    545556        /* Load the VMM. We won't continue without it being successfully loaded here. */
    546         hrc = i_loadVMM();
     557        hrc = i_loadVMM(pszVMM);
    547558        AssertComRCReturnRC(hrc);
    548559
     
    78177828 *
    78187829 * @returns COM status.
     7830 * @param   pszVMMMod       The VMM module to load.
    78197831 * @remarks Caller must write lock the console object.
    78207832 */
    7821 HRESULT Console::i_loadVMM(void) RT_NOEXCEPT
     7833HRESULT Console::i_loadVMM(const char *pszVMMMod) RT_NOEXCEPT
    78227834{
    78237835    if (   mhModVMM == NIL_RTLDRMOD
     
    78297841        RTERRINFOSTATIC ErrInfo;
    78307842        RTLDRMOD        hModVMM = NIL_RTLDRMOD;
    7831         int vrc = SUPR3HardenedLdrLoadAppPriv("VBoxVMM", &hModVMM, RTLDRLOAD_FLAGS_LOCAL, RTErrInfoInitStatic(&ErrInfo));
     7843        int vrc = SUPR3HardenedLdrLoadAppPriv(pszVMMMod, &hModVMM, RTLDRLOAD_FLAGS_LOCAL, RTErrInfoInitStatic(&ErrInfo));
    78327844        if (RT_SUCCESS(vrc))
    78337845        {
  • trunk/src/VBox/Main/src-client/ConsoleImplConfigCommon.cpp

    r99909 r99913  
    477477    try
    478478    {
    479         vrc = pConsole->i_configConstructorInnerX86(pUVM, pVM, pVMM, &alock);
     479        vrc = pConsole->i_configConstructorInner(pUVM, pVM, pVMM, &alock);
    480480    }
    481481    catch (...)
     
    490490
    491491    return vrc;
     492}
     493
     494
     495/**
     496 * Worker for configConstructor.
     497 *
     498 * @return  VBox status code.
     499 * @param   pUVM        The user mode VM handle.
     500 * @param   pVM         The cross context VM handle.
     501 * @param   pVMM        The VMM vtable.
     502 * @param   pAlock      The automatic lock instance.  This is for when we have
     503 *                      to leave it in order to avoid deadlocks (ext packs and
     504 *                      more).
     505 */
     506int Console::i_configConstructorInner(PUVM pUVM, PVM pVM, PCVMMR3VTABLE pVMM, AutoWriteLock *pAlock)
     507{
     508#ifdef VBOX_WITH_VIRT_ARMV8
     509        ComPtr<IMachine> pMachine = i_machine();
     510
     511        Bstr strArmV8VirtFlag;
     512        HRESULT hrc = pMachine->GetExtraData(Bstr("VBoxInternal2/ArmV8Virt").raw(),
     513                                             strArmV8VirtFlag.asOutParam());
     514        if (   hrc == S_OK
     515            && strArmV8VirtFlag == "1")
     516            return i_configConstructorArmV8(pUVM, pVM, pVMM, pAlock);
     517#endif
     518        return i_configConstructorX86(pUVM, pVM, pVMM, pAlock);
    492519}
    493520
  • trunk/src/VBox/Main/src-client/ConsoleImplConfigX86.cpp

    r99909 r99913  
    485485 *                      more).
    486486 */
    487 int Console::i_configConstructorInnerX86(PUVM pUVM, PVM pVM, PCVMMR3VTABLE pVMM, AutoWriteLock *pAlock)
     487int Console::i_configConstructorX86(PUVM pUVM, PVM pVM, PCVMMR3VTABLE pVMM, AutoWriteLock *pAlock)
    488488{
    489489    RT_NOREF(pVM /* when everything is disabled */);
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