mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
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: Roman Bolshakov <r.bolshakov@yadro.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
0041eda1e4
commit
171aa72baa
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user