Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx> --- src/conf/domain_conf.c | 4 +++- src/conf/domain_conf.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 8f4fd0e3bc..20cf987176 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -18241,13 +18241,15 @@ virDomainVcpuParse(virDomainDef *def, tmp = virXMLPropString(vcpuNode, "placement"); if (tmp) { - if ((def->placement_mode = + int placement_mode; + if ((placement_mode = virDomainCpuPlacementModeTypeFromString(tmp)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unsupported CPU placement mode '%s'"), tmp); return -1; } + def->placement_mode = placement_mode; VIR_FREE(tmp); } else { def->placement_mode = VIR_DOMAIN_CPU_PLACEMENT_MODE_STATIC; diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 8133d19fca..1022f5b114 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2716,7 +2716,7 @@ struct _virDomainDef { size_t maxvcpus; /* set if the vcpu definition was specified individually */ bool individualvcpus; - int placement_mode; + virDomainCpuPlacementMode placement_mode; virBitmap *cpumask; size_t niothreadids; -- 2.26.3