
On 11/24/2016 04:55 AM, Nitesh Konkar wrote:
Currently when the vcpu placement is static and cpuset is not specified, CPU Affinity under virsh emulatorpin shows 0..CPUMAX. This patchset will result in display of only online CPU's under CPU Affinity on linux.
Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com> --- src/qemu/qemu_driver.c | 5 +++++ 1 file changed, 5 insertions(+)
Similar questions/observations here obviously...
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index fdfe912..e69d92d 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5435,9 +5435,14 @@ qemuDomainGetEmulatorPinInfo(virDomainPtr dom, autoCpuset) { cpumask = autoCpuset; } else { +#ifdef __linux__ + if (!(bitmap = virHostCPUGetOnlineBitmap())) + goto cleanup;
Also the above is misaligned in the } else { It would be using the new function in any case, but be sure it's aligned properly and not just cut-n-paste John
+#else if (!(bitmap = virBitmapNew(hostcpus))) goto cleanup; virBitmapSetAll(bitmap); +#endif cpumask = bitmap; }