Re: [PATCH] qemu: match vcpu topology to maximum vcpu numbers.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/28/2013 03:59 AM, Guannan Ren wrote:
> For qemu, if the -smp N or the value of maxcpus is given, it define
> the number of vcpu of guest whenever the vcpu topology is defined or
> not. But if the -smp N and maxcpus are missing, the topology can
> compute and define vcpus for guest automatically by math:
> 
> vcpu number = sockets*cores*threads
> 
> For libvirt, as <vcpu> is always mandatory, so we can ask topology
> to match maximum vcpu numbers.
> ---
>  src/conf/domain_conf.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index a9656af..ffdc6da 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -11815,10 +11815,10 @@ virDomainDefParseXML(xmlDocPtr xml,
>              goto error;
>  
>          if (def->cpu->sockets &&
> -            def->maxvcpus >
> +            def->maxvcpus !=
>              def->cpu->sockets * def->cpu->cores * def->cpu->threads) {
>              virReportError(VIR_ERR_XML_DETAIL, "%s",
> -                           _("Maximum CPUs greater than topology limit"));
> +                           _("Topology limit does not match maximum CPUs"));

Is this going to reject XML that was previously accepted?  Is there a
bugzilla showing what happens if this patch is not incorporated?  I'm
worried about introducing an unintentional regression if we include this
in 1.0.6 without more justification.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]