On 02/23/2012 08:10 AM, Eric Blake wrote: >> + if (virDomainCpuSetParse(str, 0, map, >> + VIR_DOMAIN_CPUMASK_LEN) < 0) { >> + goto error; >> + } >> + >> + for (i = 0; i < VIR_DOMAIN_CPUMASK_LEN; i++) { >> + if (map[i]) { >> + max_id = i; > > That's off by a factor of 8 - map[i] means that you have visited i*8 > bits in cpumask. @map is not bitmask, virDomainCpuSetParse() filled it a char per a cpu. And the return of this function is also cpumap(byte per cpu). I will rework the patches soon after you comments them. Thank you very much. --lai. -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list