qemuProcessInitCpuAffinity prevents a VM from getting started on a platform that uses cpu affinity wrapper stubs e.g. macOS. The patch adds qemuProcessInitCpuAffinity stub on all platforms without HAVE_SCHED_GETAFFINITY or HAVE_BSD_CPU_AFFINITY. Signed-off-by: Roman Bolshakov <r.bolshakov@xxxxxxxxx> --- Changes since v1: * Replaced no-op virProcessGetAffinity with qemuProcessInitCpuAffinity stub. src/qemu/qemu_process.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index ab749389ee..28d52f01f6 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -2343,6 +2343,7 @@ qemuProcessDetectIOThreadPIDs(virQEMUDriverPtr driver, /* * To be run between fork/exec of QEMU only */ +#if defined(HAVE_SCHED_GETAFFINITY) || defined(HAVE_BSD_CPU_AFFINITY) static int qemuProcessInitCpuAffinity(virDomainObjPtr vm) { @@ -2413,6 +2414,13 @@ qemuProcessInitCpuAffinity(virDomainObjPtr vm) virBitmapFree(hostcpumap); return ret; } +#else +static int +qemuProcessInitCpuAffinity(virDomainObjPtr vm ATTRIBUTE_UNUSED) +{ + return 0; +} +#endif /* set link states to down on interfaces at qemu start */ static int -- 2.17.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list