]> git.proxmox.com Git - mirror_qemu.git/commit
machine: Refactor smp_parse() in vl.c as MachineClass::smp_parse()
authorLike Xu <like.xu@linux.intel.com>
Thu, 20 Jun 2019 05:45:24 +0000 (13:45 +0800)
committerEduardo Habkost <ehabkost@redhat.com>
Fri, 5 Jul 2019 20:08:04 +0000 (17:08 -0300)
commit6f479566a87d5087d6f3106b9401e6f53e933309
tree8b5233d11def22ec0847fde7c8e4cb13f3822f36
parenta94e1428991f741e2c6636e7c8df7f8d1905d983
machine: Refactor smp_parse() in vl.c as MachineClass::smp_parse()

To make smp_parse() more flexible and expansive, a smp_parse function
pointer is added to MachineClass that machine types could override.

The generic smp_parse() code in vl.c is moved to hw/core/machine.c, and
become the default implementation of MachineClass::smp_parse. A PC-specific
function called pc_smp_parse() has been added to hw/i386/pc.c, which in
this patch changes nothing against the default one .

Suggested-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Like Xu <like.xu@linux.intel.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20190620054525.37188-3-like.xu@linux.intel.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
hw/core/machine.c
hw/i386/pc.c
include/hw/boards.h
include/hw/i386/pc.h
vl.c