VirtualBox

儲存庫 vbox 的更動 48765


忽略:
時間撮記:
2013-9-30 上午08:51:08 (11 年 以前)
作者:
vboxsync
svn:sync-xref-src-repo-rev:
89402
訊息:

Main/Qt/VBoxManage: introduced IHost::ProcessorOnlineCoreCount and use it to determine the maximum allowed number of CPU virtual cores the user may assign to a guest

位置:
trunk
檔案:
修改 7 筆資料

圖例:

未更動
新增
刪除
  • trunk/doc/manual/user_ChangeLogImpl.xml

    r48682 r48765  
    9393        <para>GUI, VBoxManage: when unregistering a VM, also unregister the
    9494          hard disk images which are used exclusively (bug #10311)</para>
     95      </listitem>
     96
     97      <listitem>
     98        <para>GUI: use the number of physical presented processor cores instead of
     99          the number of logical processor cores to check if the users assigned
     100          too many virtual CPUs to the guest</para>
    95101      </listitem>
    96102
  • trunk/include/iprt/mp.h

    r46639 r48765  
    146146 * @returns The number of online cores.
    147147 */
    148 RTDECL(RTCPUID) RTMpGetCoreOnlineCount(void);
     148RTDECL(RTCPUID) RTMpGetOnlineCoreCount(void);
    149149
    150150/**
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp

    r48607 r48765  
    196196    CHECK_ERROR(Host, COMGETTER(ProcessorCount)(&processorCount));
    197197    RTPrintf("Processor count: %lu\n", processorCount);
     198    ULONG processorOnlineCoreCount = 0;
     199    CHECK_ERROR(Host, COMGETTER(ProcessorOnlineCoreCount)(&processorOnlineCoreCount));
     200    RTPrintf("Processor online core count: %lu\n", processorOnlineCoreCount);
     201    ULONG processorCoreCount = 0;
     202    CHECK_ERROR(Host, COMGETTER(ProcessorCoreCount)(&processorCoreCount));
     203    RTPrintf("Processor core count: %lu\n", processorCoreCount);
    198204    ULONG processorSpeed = 0;
    199205    Bstr processorDescription;
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp

    r48576 r48765  
    346346
    347347        /* VCPU amount test: */
    348         int cTotalCPUs = vboxGlobal().host().GetProcessorOnlineCount();
     348        int cTotalCPUs = vboxGlobal().host().GetProcessorOnlineCoreCount();
    349349        if (m_pSliderCPUCount->value() > 2 * cTotalCPUs)
    350350        {
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r48715 r48765  
    84198419    </attribute>
    84208420
     8421    <attribute name="processorOnlineCoreCount" type="unsigned long" readonly="yes">
     8422      <desc>Number of physical processor cores online in the host system.</desc>
     8423    </attribute>
     8424
    84218425    <method name="getProcessorSpeed">
    84228426      <desc>Query the (approximate) maximum speed of a specified host CPU in
  • trunk/src/VBox/Main/include/HostImpl.h

    r48607 r48765  
    6868    STDMETHOD(COMGETTER(ProcessorOnlineCount))(ULONG *count);
    6969    STDMETHOD(COMGETTER(ProcessorCoreCount))(ULONG *count);
     70    STDMETHOD(COMGETTER(ProcessorOnlineCoreCount))(ULONG *count);
    7071    STDMETHOD(GetProcessorSpeed)(ULONG cpuId, ULONG *speed);
    7172    STDMETHOD(GetProcessorDescription)(ULONG cpuId, BSTR *description);
  • trunk/src/VBox/Main/src-server/HostImpl.cpp

    r48607 r48765  
    956956    // no locking required
    957957
    958     return E_NOTIMPL;
     958    *aCount = RTMpGetPresentCoreCount();
     959    return S_OK;
     960}
     961
     962/**
     963 * Returns the number of installed physical processor cores.
     964 *
     965 * @returns COM status code
     966 * @param   count address of result variable
     967 */
     968STDMETHODIMP Host::COMGETTER(ProcessorOnlineCoreCount)(ULONG *aCount)
     969{
     970    CheckComArgOutPointerValid(aCount);
     971    // no locking required
     972
     973    *aCount = RTMpGetOnlineCoreCount();
     974    return S_OK;
    959975}
    960976
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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