def lcore_core_ids(lcore_mask_host):
    """ Convert CPU ID mask from argument 'lcore_mask' to a list of CPU IDs """

    lcore_cores = []
    binary_mask = bin(int(lcore_mask_host, 16))[2:]
    for i, val in enumerate(binary_mask[::-1]):
        if val == "1":
            lcore_cores.append(i)
    return lcore_cores