• J
    Fix initialization of current vcpus in libxl driver · 492e493a
    Jim Fehlig 提交于
    The cur_vcpus member of struct libxl_domain_build_info was incorrectly
    initialized to the number of vcpus, when it should have been interpreted
    as a bitmap, where bit X corresponds to online/offline status of vcpuX.
    
    To complicate matters, cur_vcpus is an int, so only 32 vcpus can be
    set online.  Add a check to ensure vcpus does not exceed this limit.
    
    V2: Eric Blake noted a compilation pitfal when '1 << 32' on an int.
        Account for vcpus == 32.
    492e493a
libxl_conf.c 29.1 KB