VirtualBox

Changeset 101200 in vbox for trunk


Ignore:
Timestamp:
Sep 20, 2023 2:14:26 PM (17 months ago)
Author:
vboxsync
Message:

Main,FE/Qt: Add the QEMU RAM based framebuffer device as a possible graphics controller for ARM platforms. Allows getting graphics output on guests like OpenSuse 15.4 and Oracle Linux 9 which don't have a compatible VSVGA3 device driver, bugref:10386

Location:
trunk/src/VBox
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendCOM.cpp

    r101199 r101200  
    313313    switch (type)
    314314    {
    315         case KGraphicsControllerType_Null:     return QApplication::translate("UICommon", "None",     "GraphicsControllerType");
    316         case KGraphicsControllerType_VBoxVGA:  return QApplication::translate("UICommon", "VBoxVGA",  "GraphicsControllerType");
    317         case KGraphicsControllerType_VMSVGA:   return QApplication::translate("UICommon", "VMSVGA",   "GraphicsControllerType");
    318         case KGraphicsControllerType_VBoxSVGA: return QApplication::translate("UICommon", "VBoxSVGA", "GraphicsControllerType");
     315        case KGraphicsControllerType_Null:      return QApplication::translate("UICommon", "None",      "GraphicsControllerType");
     316        case KGraphicsControllerType_VBoxVGA:   return QApplication::translate("UICommon", "VBoxVGA",   "GraphicsControllerType");
     317        case KGraphicsControllerType_VMSVGA:    return QApplication::translate("UICommon", "VMSVGA",    "GraphicsControllerType");
     318        case KGraphicsControllerType_VBoxSVGA:  return QApplication::translate("UICommon", "VBoxSVGA",  "GraphicsControllerType");
     319        case KGraphicsControllerType_QemuRamFB: return QApplication::translate("UICommon", "QemuRamFB", "GraphicsControllerType");
    319320        default: AssertMsgFailed(("No text for %d", type)); break;
    320321    }
     
    326327{
    327328    QHash<QString, KGraphicsControllerType> list;
    328     list.insert(QApplication::translate("UICommon", "None",     "GraphicsControllerType"), KGraphicsControllerType_Null);
    329     list.insert(QApplication::translate("UICommon", "VBoxVGA",  "GraphicsControllerType"), KGraphicsControllerType_VBoxVGA);
    330     list.insert(QApplication::translate("UICommon", "VMSVGA",   "GraphicsControllerType"), KGraphicsControllerType_VMSVGA);
    331     list.insert(QApplication::translate("UICommon", "VBoxSVGA", "GraphicsControllerType"), KGraphicsControllerType_VBoxSVGA);
     329    list.insert(QApplication::translate("UICommon", "None",      "GraphicsControllerType"), KGraphicsControllerType_Null);
     330    list.insert(QApplication::translate("UICommon", "VBoxVGA",   "GraphicsControllerType"), KGraphicsControllerType_VBoxVGA);
     331    list.insert(QApplication::translate("UICommon", "VMSVGA",    "GraphicsControllerType"), KGraphicsControllerType_VMSVGA);
     332    list.insert(QApplication::translate("UICommon", "VBoxSVGA",  "GraphicsControllerType"), KGraphicsControllerType_VBoxSVGA);
     333    list.insert(QApplication::translate("UICommon", "QemuRamFB", "GraphicsControllerType"), KGraphicsControllerType_QemuRamFB);
    332334    if (!list.contains(strType))
    333335    {
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r101180 r101200  
    66796679  <enum
    66806680    name="GraphicsControllerType"
    6681     uuid="3e009bb0-2b57-4283-a39b-4c363d4f0808"
     6681    uuid="e1379bad-ae01-493d-abf5-740a95c41676"
    66826682    >
    66836683    <desc>Graphics controller type, used with <link to="IGraphicsAdapter::graphicsControllerType" />.
     
    66946694    <const name="VBoxSVGA"  value="3">
    66956695      <desc>VirtualBox VGA device with VMware SVGA II extensions.</desc>
     6696    </const>
     6697    <const name="QemuRamFB" value="4">
     6698      <desc>QEMU RAM based framebuffer based device.</desc>
    66966699    </const>
    66976700  </enum>
  • trunk/src/VBox/Main/src-all/PlatformPropertiesImpl.cpp

    r101133 r101200  
    699699            static const GraphicsControllerType_T aGraphicsControllerTypes[] =
    700700            {
    701                 GraphicsControllerType_Null
     701                GraphicsControllerType_Null,
     702                GraphicsControllerType_QemuRamFB
    702703#ifdef VBOX_WITH_VMSVGA
    703704              , GraphicsControllerType_VMSVGA
  • trunk/src/VBox/Main/src-client/ConsoleImplConfigArmV8.cpp

    r101191 r101200  
    413413
    414414        /*
     415         * VGA.
     416         */
     417        ComPtr<IGraphicsAdapter> pGraphicsAdapter;
     418        hrc = pMachine->COMGETTER(GraphicsAdapter)(pGraphicsAdapter.asOutParam());           H();
     419        GraphicsControllerType_T enmGraphicsController;
     420        hrc = pGraphicsAdapter->COMGETTER(GraphicsControllerType)(&enmGraphicsController);   H();
     421
     422        /*
    415423         * Devices
    416424         */
     
    482490        InsertConfigInteger(pCfg,  "MmioBase", 0x09020000);
    483491        InsertConfigInteger(pCfg,  "DmaEnabled",        1);
    484         InsertConfigInteger(pCfg,  "QemuRamfbSupport",  0);
    485         InsertConfigNode(pInst,    "LUN#0",           &pLunL0);
    486         InsertConfigString(pLunL0, "Driver",          "MainDisplay");
     492        InsertConfigInteger(pCfg,  "QemuRamfbSupport",  enmGraphicsController == GraphicsControllerType_QemuRamFB ? 1 : 0);
     493        if (enmGraphicsController == GraphicsControllerType_QemuRamFB)
     494        {
     495            InsertConfigNode(pInst,    "LUN#0",           &pLunL0);
     496            InsertConfigString(pLunL0, "Driver",          "MainDisplay");
     497        }
    487498
    488499        vrc = RTFdtNodeAddF(hFdt, "fw-cfg@%RX32", 0x09020000);                              VRC();
     
    637648        vrc = RTFdtNodeFinalize(hFdt);                                                      VRC();
    638649
    639         InsertConfigNode(pDevices, "vga", &pDev);
    640         InsertConfigNode(pDev,     "0", &pInst);
    641         InsertConfigInteger(pInst, "Trusted",           1);
    642         InsertConfigInteger(pInst, "PCIBusNo",          0);
    643         InsertConfigInteger(pInst, "PCIDeviceNo",       2);
    644         InsertConfigInteger(pInst, "PCIFunctionNo",     0);
    645         InsertConfigNode(pInst,    "Config", &pCfg);
    646         InsertConfigInteger(pCfg,  "VRamSize",          32 * _1M);
    647         InsertConfigInteger(pCfg,  "MonitorCount",         1);
    648         i_attachStatusDriver(pInst, DeviceType_Graphics3D);
    649         InsertConfigInteger(pCfg, "VMSVGAEnabled", true);
    650         InsertConfigInteger(pCfg, "VMSVGAPciBarLayout", true);
    651         InsertConfigInteger(pCfg, "VMSVGAPciId", true);
    652         InsertConfigInteger(pCfg, "VMSVGA3dEnabled", false);
    653         InsertConfigInteger(pCfg, "VmSvga3", true);
    654         InsertConfigInteger(pCfg, "VmSvgaExposeLegacyVga", false);
    655 
    656         /* Attach the display. */
    657         InsertConfigNode(pInst,    "LUN#0", &pLunL0);
    658         InsertConfigString(pLunL0, "Driver",               "MainDisplay");
    659         InsertConfigNode(pLunL0,   "Config", &pCfg);
    660 
     650        if (   enmGraphicsController != GraphicsControllerType_QemuRamFB
     651            && enmGraphicsController != GraphicsControllerType_Null)
     652        {
     653            InsertConfigNode(pDevices, "vga", &pDev);
     654            InsertConfigNode(pDev,     "0", &pInst);
     655            InsertConfigInteger(pInst, "Trusted",           1);
     656            InsertConfigInteger(pInst, "PCIBusNo",          0);
     657            InsertConfigInteger(pInst, "PCIDeviceNo",       2);
     658            InsertConfigInteger(pInst, "PCIFunctionNo",     0);
     659            InsertConfigNode(pInst,    "Config", &pCfg);
     660            InsertConfigInteger(pCfg,  "VRamSize",          32 * _1M);
     661            InsertConfigInteger(pCfg,  "MonitorCount",         1);
     662            i_attachStatusDriver(pInst, DeviceType_Graphics3D);
     663            InsertConfigInteger(pCfg, "VMSVGAEnabled", true);
     664            InsertConfigInteger(pCfg, "VMSVGAPciBarLayout", true);
     665            InsertConfigInteger(pCfg, "VMSVGAPciId", true);
     666            InsertConfigInteger(pCfg, "VMSVGA3dEnabled", false);
     667            InsertConfigInteger(pCfg, "VmSvga3", true);
     668            InsertConfigInteger(pCfg, "VmSvgaExposeLegacyVga", false);
     669
     670            /* Attach the display. */
     671            InsertConfigNode(pInst,    "LUN#0", &pLunL0);
     672            InsertConfigString(pLunL0, "Driver",               "MainDisplay");
     673            InsertConfigNode(pLunL0,   "Config", &pCfg);
     674        }
    661675
    662676        InsertConfigNode(pDevices, "VMMDev",          &pDev);
  • trunk/src/VBox/Main/src-server/GraphicsAdapterImpl.cpp

    r98262 r101200  
    199199        case GraphicsControllerType_VBoxSVGA:
    200200#endif
     201        case GraphicsControllerType_QemuRamFB:
    201202            break;
    202203        default:
  • trunk/src/VBox/Main/xml/Settings.cpp

    r101199 r101200  
    56365636                else if (strGraphicsControllerType == "VBOXSVGA")
    56375637                    type = GraphicsControllerType_VBoxSVGA;
     5638                else if (strGraphicsControllerType == "QEMURAMFB")
     5639                    type = GraphicsControllerType_QemuRamFB;
    56385640                else if (strGraphicsControllerType == "NONE")
    56395641                    type = GraphicsControllerType_Null;
     
    74847486                case GraphicsControllerType_VMSVGA:             pcszGraphics = "VMSVGA"; break;
    74857487                case GraphicsControllerType_VBoxSVGA:           pcszGraphics = "VBoxSVGA"; break;
     7488                case GraphicsControllerType_QemuRamFB:          pcszGraphics = "QemuRamFB"; break;
    74867489                default: /*case GraphicsControllerType_Null:*/  pcszGraphics = "None"; break;
    74877490            }
     
    93929395    if (m->sv < SettingsVersion_v1_20)
    93939396    {
    9394         // VirtualBox 7.1 (settings v1.20) adds support for different VM platforms.
    9395         if (   hardwareMachine.platformSettings.architectureType != PlatformArchitecture_None
    9396             && hardwareMachine.platformSettings.architectureType != PlatformArchitecture_x86)
     9397        // VirtualBox 7.1 (settings v1.20) adds support for different VM platforms and the QEMU RAM based framebuffer device.
     9398        if (   (   hardwareMachine.platformSettings.architectureType != PlatformArchitecture_None
     9399                && hardwareMachine.platformSettings.architectureType != PlatformArchitecture_x86)
     9400            || hardwareMachine.graphicsAdapter.graphicsControllerType == GraphicsControllerType_QemuRamFB)
    93979401        {
    93989402            /* Note: The new chipset type ARMv8Virtual implies setting the platform architecture type to ARM. */
  • trunk/src/VBox/Main/xml/VirtualBox-settings.xsd

    r101035 r101200  
    290290    <xsd:enumeration value="VMSVGA"/>
    291291    <xsd:enumeration value="VBoxSVGA"/>
     292    <xsd:enumeration value="QemuRamFB"/>
    292293  </xsd:restriction>
    293294</xsd:simpleType>
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