]> git.proxmox.com Git - mirror_qemu.git/commit
vl.c: allocate TYPE_MACHINE list once during bootup
authorWei Yang <richardw.yang@linux.intel.com>
Fri, 5 Apr 2019 06:41:19 +0000 (14:41 +0800)
committerEduardo Habkost <ehabkost@redhat.com>
Thu, 25 Apr 2019 17:16:42 +0000 (14:16 -0300)
commitc516cd1b34f119370d9816ad87514698dc2bdbc8
tree841fec47a63886e0b4e1ac729a322d60a4c3031d
parent06433c27c1be5755c56ff0656660072e339ce4be
vl.c: allocate TYPE_MACHINE list once during bootup

Now all the functions used to select machine is local and the call flow
looks like below:

    select_machine()
        find_default_machine()
        machine_parse()
            find_machine()

All these related function will need a GSList for TYPE_MACHINE.
Currently we allocate this list each time we use it, while this is not
necessary to do so because we don't need to modify this.

This patch make the TYPE_MACHINE list allocation in select_machine and
pass this to its child for use.

Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20190405064121.23662-3-richardw.yang@linux.intel.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
vl.c