]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
Implement CPU topology support for QEMU driver
authorJiri Denemark <jdenemar@redhat.com>
Mon, 18 Jan 2010 15:51:52 +0000 (16:51 +0100)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Tue, 19 Jan 2010 10:40:09 +0000 (11:40 +0100)
commit5d462bd0b3d62d5bf66d7d9aefd382bca4338bd3
tree1ae7e0199afb5e98ea8a6bc47850cd4a6756f165
parent014c9f3196024b9e7fd44479cb72958b63675bfb
Implement CPU topology support for QEMU driver

QEMU's command line equivalent for the following domain XML fragment
    <vcpus>2</vcpus>
    <cpu ...>
        ...
        <topology sockets='1' cores='2', threads='1'/>
    </cpu>

is

    -smp 2,sockets=1,cores=2,threads=1

This syntax was introduced in QEMU-0.12.

Version 2 changes:
- -smp argument build split into a separate function
- always add ",sockets=S,cores=C,threads=T" to -smp if qemu supports it
- use qemuParseCommandLineKeywords for command line parsing

Version 3 changes:
- ADD_ARG_LIT => ADD_ARG and line reordering in qemudBuildCommandLine
- rebased

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/qemu/qemu_conf.c
src/qemu/qemu_conf.h
tests/qemuhelptest.c