提交 598927a5 编写于 作者: P Peter Krempa

conf: Split out logic to determine whether cpupin was provided

上级 451b955d
......@@ -1413,6 +1413,19 @@ virDomainDefGetVcpu(virDomainDefPtr def,
}
/**
* virDomainDefHasVcpuPin:
* @def: domain definition
*
* This helper returns true if any of the domain's vcpus has cpu pinning set
*/
static bool
virDomainDefHasVcpuPin(const virDomainDef *def)
{
return !!def->cputune.vcpupin;
}
virDomainDiskDefPtr
virDomainDiskDefNew(virDomainXMLOptionPtr xmlopt)
{
......@@ -15347,7 +15360,7 @@ virDomainDefParseXML(xmlDocPtr xml,
goto error;
if (virDomainNumatuneHasPlacementAuto(def->numa) &&
!def->cpumask && !def->cputune.vcpupin &&
!def->cpumask && !virDomainDefHasVcpuPin(def) &&
!def->cputune.emulatorpin &&
!virDomainIOThreadIDArrayHasPin(def))
def->placement_mode = VIR_DOMAIN_CPU_PLACEMENT_MODE_AUTO;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册