提交 171aa72b 编写于 作者: R Roman Bolshakov 提交者: Michal Privoznik

qemu: Start domain on a node without cpu affinity

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: NRoman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 0041eda1
......@@ -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 /* !defined(HAVE_SCHED_GETAFFINITY) && !defined(HAVE_BSD_CPU_AFFINITY) */
static int
qemuProcessInitCpuAffinity(virDomainObjPtr vm ATTRIBUTE_UNUSED)
{
return 0;
}
#endif /* !defined(HAVE_SCHED_GETAFFINITY) && !defined(HAVE_BSD_CPU_AFFINITY) */
/* set link states to down on interfaces at qemu start */
static int
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册