VirtualBox

Changeset 81581 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Oct 30, 2019 9:45:55 AM (5 years ago)
Author:
vboxsync
Message:

Main,FE/VBoxManage: Add an option to present the SMBIOS System UUID (SMBIOS spec chapter 7.2.1) in little endian format to the guest like it is supposed to be done. To not break existing behavior and causing certain software to require re-activation existing VMs will keep the current (wrong) beahvior. New VMs will be switched to the correct behavior. In addition VBoxManage got a new parameter to set the behavior evene for existing VMs

Location:
trunk/src/VBox/Main
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r81479 r81581  
    52635263    uuid="73af4152-7e67-4144-bf34-41c38e8b4cc7"
    52645264    wsmap="managed"
    5265     reservedMethods="1" reservedAttributes="8"
     5265    reservedMethods="1" reservedAttributes="7"
    52665266    >
    52675267    <desc>
     
    53305330        The location of the file storing the non-volatile memory content when
    53315331        the VM is powered off.  The file does not always exist.
     5332      </desc>
     5333    </attribute>
     5334
     5335    <attribute name="SMBIOSUuidLittleEndian" type="boolean">
     5336      <desc>
     5337        Flag to control whether the SMBIOS system UUID is presented in little endian
     5338        form to the guest as mandated by the SMBIOS spec chapter 7.2.1.
     5339        Before VirtualBox version 6.1 it was always presented in big endian form
     5340        and to retain the old behavior this flag was introduced so it can be changed.
     5341        VMs created with VBox 6.1 will default to true for this flag.
    53325342      </desc>
    53335343    </attribute>
  • trunk/src/VBox/Main/include/BIOSSettingsImpl.h

    r81425 r81581  
    8585    HRESULT setPXEDebugEnabled(BOOL enable);
    8686    HRESULT getNonVolatileStorageFile(com::Utf8Str &aNonVolatileStorageFile);
     87    HRESULT getSMBIOSUuidLittleEndian(BOOL *enabled);
     88    HRESULT setSMBIOSUuidLittleEndian(BOOL enable);
    8789
    8890    struct Data;
  • trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp

    r81425 r81581  
    16851685            InsertConfigInteger(pBiosCfg,  "PXEDebug",             fPXEDebug);
    16861686            InsertConfigBytes(pBiosCfg,    "UUID", &HardwareUuid,sizeof(HardwareUuid));
     1687            BOOL fUuidLe;
     1688            hrc = biosSettings->COMGETTER(SMBIOSUuidLittleEndian)(&fUuidLe);                H();
     1689            InsertConfigInteger(pBiosCfg,  "UuidLe",               fUuidLe);
    16871690            InsertConfigNode(pBiosCfg,     "NetBoot", &pNetBootCfg);
    16881691            InsertConfigInteger(pBiosCfg,  "McfgBase",   uMcfgBase);
     
    17541757            hrc = biosSettings->COMGETTER(NonVolatileStorageFile)(bstrNVRAM.asOutParam());  H();
    17551758
     1759            BOOL fUuidLe;
     1760            hrc = biosSettings->COMGETTER(SMBIOSUuidLittleEndian)(&fUuidLe);                H();
     1761
    17561762            /* Get graphics mode settings */
    17571763            uint32_t u32GraphicsMode = UINT32_MAX;
     
    18161822            InsertConfigInteger(pCfg,  "APIC",        uFwAPIC);
    18171823            InsertConfigBytes(pCfg,    "UUID", &HardwareUuid,sizeof(HardwareUuid));
     1824            InsertConfigInteger(pCfg,  "UuidLe",      fUuidLe);
    18181825            InsertConfigInteger(pCfg,  "64BitEntry",  f64BitEntry); /* boolean */
    18191826            InsertConfigString(pCfg,   "NvramFile",   bstrNVRAM);
  • trunk/src/VBox/Main/src-server/BIOSSettingsImpl.cpp

    r81425 r81581  
    489489
    490490
     491HRESULT BIOSSettings::getSMBIOSUuidLittleEndian(BOOL *enabled)
     492{
     493    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     494
     495    *enabled = m->bd->fSmbiosUuidLittleEndian;
     496
     497    return S_OK;
     498}
     499
     500HRESULT BIOSSettings::setSMBIOSUuidLittleEndian(BOOL enable)
     501{
     502    /* the machine needs to be mutable */
     503    AutoMutableStateDependency adep(m->pMachine);
     504    if (FAILED(adep.rc())) return adep.rc();
     505
     506    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     507
     508    m->bd.backup();
     509    m->bd->fSmbiosUuidLittleEndian = RT_BOOL(enable);
     510
     511    alock.release();
     512    AutoWriteLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS);  // mParent is const, needs no locking
     513    m->pMachine->i_setModified(Machine::IsModified_BIOS);
     514
     515    return S_OK;
     516}
     517
    491518
    492519// IBIOSSettings methods
  • trunk/src/VBox/Main/xml/Settings.cpp

    r81427 r81581  
    25392539    fLogoFadeOut(true),
    25402540    fPXEDebugEnabled(false),
     2541    fSmbiosUuidLittleEndian(true),
    25412542    ulLogoDisplayTime(0),
    25422543    biosBootMenuMode(BIOSBootMenuMode_MessageAndMenu),
     
    25562557        && fLogoFadeOut
    25572558        && !fPXEDebugEnabled
     2559        && !fSmbiosUuidLittleEndian
    25582560        && ulLogoDisplayTime == 0
    25592561        && biosBootMenuMode == BIOSBootMenuMode_MessageAndMenu
     
    25722574{
    25732575    return (this == &d)
    2574         || (   fACPIEnabled        == d.fACPIEnabled
    2575             && fIOAPICEnabled      == d.fIOAPICEnabled
    2576             && fLogoFadeIn         == d.fLogoFadeIn
    2577             && fLogoFadeOut        == d.fLogoFadeOut
    2578             && fPXEDebugEnabled    == d.fPXEDebugEnabled
    2579             && ulLogoDisplayTime   == d.ulLogoDisplayTime
    2580             && biosBootMenuMode    == d.biosBootMenuMode
    2581             && apicMode            == d.apicMode
    2582             && llTimeOffset        == d.llTimeOffset
    2583             && strLogoImagePath    == d.strLogoImagePath
    2584             && strNVRAMPath        == d.strNVRAMPath);
     2576        || (   fACPIEnabled            == d.fACPIEnabled
     2577            && fIOAPICEnabled          == d.fIOAPICEnabled
     2578            && fLogoFadeIn             == d.fLogoFadeIn
     2579            && fLogoFadeOut            == d.fLogoFadeOut
     2580            && fPXEDebugEnabled        == d.fPXEDebugEnabled
     2581            && fSmbiosUuidLittleEndian == d.fSmbiosUuidLittleEndian
     2582            && ulLogoDisplayTime       == d.ulLogoDisplayTime
     2583            && biosBootMenuMode        == d.biosBootMenuMode
     2584            && apicMode                == d.apicMode
     2585            && llTimeOffset            == d.llTimeOffset
     2586            && strLogoImagePath        == d.strLogoImagePath
     2587            && strNVRAMPath            == d.strNVRAMPath);
    25852588}
    25862589
     
    48214824            if ((pelmBIOSChild = pelmHwChild->findChildElement("NVRAM")))
    48224825                pelmBIOSChild->getAttributeValue("path", hw.biosSettings.strNVRAMPath);
     4826            if ((pelmBIOSChild = pelmHwChild->findChildElement("SmbiosUuidLittleEndian")))
     4827                pelmBIOSChild->getAttributeValue("enabled", hw.biosSettings.fSmbiosUuidLittleEndian);
     4828            else
     4829                hw.biosSettings.fSmbiosUuidLittleEndian = false; /* Default for existing VMs. */
    48234830
    48244831            // legacy BIOS/IDEController (pre 1.7)
     
    62936300        if (!hw.biosSettings.strNVRAMPath.isEmpty())
    62946301            pelmBIOS->createChild("NVRAM")->setAttribute("path", hw.biosSettings.strNVRAMPath);
     6302        if (hw.biosSettings.fSmbiosUuidLittleEndian)
     6303            pelmBIOS->createChild("SmbiosUuidLittleEndian")->setAttribute("enabled", hw.biosSettings.fSmbiosUuidLittleEndian);
    62956304    }
    62966305
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