[libvirt] [PATCH v3] Implement CPU topology support for QEMU driver

Matthias Bolte matthias.bolte at googlemail.com
Tue Jan 19 10:45:40 UTC 2010


2010/1/19 Jiri Denemark <jdenemar at redhat.com>:
>> > diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
>> > index 024b2ba..1fbb86a 100644
>> > --- a/src/qemu/qemu_conf.c
>> > +++ b/src/qemu/qemu_conf.c
>> [...]
>> > @@ -4714,11 +4771,84 @@ syntax:
>> >  no_memory:
>> >     virReportOOMError(conn);
>> >  error:
>> > -    virCPUDefFree(cpu);
>> >     return -1;
>> >  }
>> >
>> >
>> > +static int
>> > +qemuParseCommandLineSmp(virConnectPtr conn,
>> > +                        virDomainDefPtr dom,
>> > +                        const char *val)
>> > +{
>> > +    unsigned int sockets = 0;
>> > +    unsigned int cores = 0;
>> > +    unsigned int threads = 0;
>> > +    int i;
>> > +    int nkws;
>> > +    char **kws;
>> > +    char **vals;
>> > +    int n;
>> > +    char *end;
>> > +    int ret;
>> > +
>> > +    nkws = qemuParseCommandLineKeywords(conn, val, &kws, &vals, 1);
>>
>> What's the purpose of the 1 here? qemuParseCommandLineKeywords takes 4
>> parameters, you pass 5. This breaks compilation for me.
>
> Ah, I should have mentioned it explicitly... this patch requires 'Enhance
> qemuParseCommandLineKeywords' patch which I submitted earlier and which was
> already acked but haven't been pushed yet.
>
> Jirka
>
>

Ah, I pushed both now.

I made a slight modification to this one. You missed to update the
qemuhelptest. It failed for QEMU 0.12, because
QEMUD_CMD_FLAG_SMP_TOPOLOGY was missing from the expected flags list.

Matthias




More information about the libvir-list mailing list