From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, jasowang@redhat.com, rth@twiddle.net,
Alexander Graf <agraf@suse.de>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: [Qemu-devel] [PATCH 07/10] machine: Remove unused fields from QEMUMachine
Date: Fri, 15 May 2015 14:18:58 -0300 [thread overview]
Message-ID: <1431710341-24696-8-git-send-email-ehabkost@redhat.com> (raw)
In-Reply-To: <1431710341-24696-1-git-send-email-ehabkost@redhat.com>
This removes the following fields from QEMUMachine: family, alias,
reset, hot_add_cpu, units_per_default_bus, no_serial, no_parallel,
use_virtcon, use_sclp, no_floppy, no_cdrom, default_display,
compat_props, and hw_version.
The only users of those fields were already converted to use QOM and
MachineClass directly, so they are not needed anymore.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
include/hw/boards.h | 15 +--------------
vl.c | 15 ---------------
2 files changed, 1 insertion(+), 29 deletions(-)
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 1f11881..ff79797 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -19,31 +19,18 @@ typedef void QEMUMachineHotAddCPUFunc(const int64_t id, Error **errp);
typedef int QEMUMachineGetKvmtypeFunc(const char *arg);
struct QEMUMachine {
- const char *family; /* NULL iff @name identifies a standalone machtype */
const char *name;
- const char *alias;
const char *desc;
QEMUMachineInitFunc *init;
- QEMUMachineResetFunc *reset;
- QEMUMachineHotAddCPUFunc *hot_add_cpu;
QEMUMachineGetKvmtypeFunc *kvm_type;
BlockInterfaceType block_default_type;
- int units_per_default_bus;
int max_cpus;
- unsigned int no_serial:1,
- no_parallel:1,
- use_virtcon:1,
- use_sclp:1,
- no_floppy:1,
- no_cdrom:1,
+ unsigned int
no_sdcard:1,
has_dynamic_sysbus:1;
int is_default;
const char *default_machine_opts;
const char *default_boot_order;
- const char *default_display;
- GlobalProperty *compat_props;
- const char *hw_version;
};
void memory_region_allocate_system_memory(MemoryRegion *mr, Object *owner,
diff --git a/vl.c b/vl.c
index 15bccc4..1ac06a0 100644
--- a/vl.c
+++ b/vl.c
@@ -1314,32 +1314,17 @@ static void machine_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
QEMUMachine *qm = data;
-
- mc->family = qm->family;
mc->name = qm->name;
- mc->alias = qm->alias;
mc->desc = qm->desc;
mc->init = qm->init;
- mc->reset = qm->reset;
- mc->hot_add_cpu = qm->hot_add_cpu;
mc->kvm_type = qm->kvm_type;
mc->block_default_type = qm->block_default_type;
- mc->units_per_default_bus = qm->units_per_default_bus;
mc->max_cpus = qm->max_cpus;
- mc->no_serial = qm->no_serial;
- mc->no_parallel = qm->no_parallel;
- mc->use_virtcon = qm->use_virtcon;
- mc->use_sclp = qm->use_sclp;
- mc->no_floppy = qm->no_floppy;
- mc->no_cdrom = qm->no_cdrom;
mc->no_sdcard = qm->no_sdcard;
mc->has_dynamic_sysbus = qm->has_dynamic_sysbus;
mc->is_default = qm->is_default;
mc->default_machine_opts = qm->default_machine_opts;
mc->default_boot_order = qm->default_boot_order;
- mc->default_display = qm->default_display;
- mc->compat_props = qm->compat_props;
- mc->hw_version = qm->hw_version;
}
int qemu_register_machine(QEMUMachine *m)
--
2.1.0
next prev parent reply other threads:[~2015-05-15 17:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-15 17:18 [Qemu-devel] [PATCH 00/10] pc: Don't use QEMUMachine, simplify compat+init code Eduardo Habkost
2015-05-15 17:18 ` [Qemu-devel] [PATCH 01/10] pc: Define MACHINE_OPTIONS macros consistently for all machines Eduardo Habkost
2015-05-15 17:18 ` [Qemu-devel] [PATCH 02/10] pc: Define machines using a DEFINE_PC_MACHINE macro Eduardo Habkost
2015-05-15 17:18 ` [Qemu-devel] [PATCH 03/10] pc: Convert *_MACHINE_OPTIONS macros into functions Eduardo Habkost
2015-05-15 17:18 ` [Qemu-devel] [PATCH 04/10] pc: Move compat_props setting inside *_machine_options() functions Eduardo Habkost
2015-05-15 17:18 ` [Qemu-devel] [PATCH 05/10] pc: Don't use QEMUMachine anymore Eduardo Habkost
2015-05-15 17:18 ` [Qemu-devel] [PATCH 06/10] pc: Remove qemu_register_pc_machine() function Eduardo Habkost
2015-05-15 17:18 ` Eduardo Habkost [this message]
2015-05-15 17:18 ` [Qemu-devel] [PATCH 08/10] piix: Add kvmclock_enabled, pci_enabled globals Eduardo Habkost
2015-05-15 17:19 ` [Qemu-devel] [PATCH 09/10] piix: Eliminate pc_init_pci() Eduardo Habkost
2015-05-15 17:19 ` [Qemu-devel] [PATCH 10/10] pc: Generate init functions with a macro Eduardo Habkost
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1431710341-24696-8-git-send-email-ehabkost@redhat.com \
--to=ehabkost@redhat.com \
--cc=agraf@suse.de \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).