[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 10/24] i386: Rename bools in PCMachineState to end in
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PULL 10/24] i386: Rename bools in PCMachineState to end in _enabled |
Date: |
Tue, 11 Dec 2018 16:01:15 -0200 |
From: Corey Minyard <address@hidden>
This makes their function more clear and prevents conflicts when adding
the actual devices to the machine state, if necessary.
Signed-off-by: Corey Minyard <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Cc: Richard Henderson <address@hidden>
Cc: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
include/hw/i386/pc.h | 6 +++---
hw/i386/pc.c | 18 +++++++++---------
hw/i386/pc_piix.c | 3 ++-
hw/i386/pc_q35.c | 6 +++---
4 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 136fe497b6..7bb52b4762 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -49,9 +49,9 @@ struct PCMachineState {
AcpiNVDIMMState acpi_nvdimm_state;
bool acpi_build_enabled;
- bool smbus;
- bool sata;
- bool pit;
+ bool smbus_enabled;
+ bool sata_enabled;
+ bool pit_enabled;
/* RAM information (sizes, addresses, configuration): */
ram_addr_t below_4g_mem_size, above_4g_mem_size;
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index f095725dba..4cd2fbca4d 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -2222,42 +2222,42 @@ static bool pc_machine_get_smbus(Object *obj, Error
**errp)
{
PCMachineState *pcms = PC_MACHINE(obj);
- return pcms->smbus;
+ return pcms->smbus_enabled;
}
static void pc_machine_set_smbus(Object *obj, bool value, Error **errp)
{
PCMachineState *pcms = PC_MACHINE(obj);
- pcms->smbus = value;
+ pcms->smbus_enabled = value;
}
static bool pc_machine_get_sata(Object *obj, Error **errp)
{
PCMachineState *pcms = PC_MACHINE(obj);
- return pcms->sata;
+ return pcms->sata_enabled;
}
static void pc_machine_set_sata(Object *obj, bool value, Error **errp)
{
PCMachineState *pcms = PC_MACHINE(obj);
- pcms->sata = value;
+ pcms->sata_enabled = value;
}
static bool pc_machine_get_pit(Object *obj, Error **errp)
{
PCMachineState *pcms = PC_MACHINE(obj);
- return pcms->pit;
+ return pcms->pit_enabled;
}
static void pc_machine_set_pit(Object *obj, bool value, Error **errp)
{
PCMachineState *pcms = PC_MACHINE(obj);
- pcms->pit = value;
+ pcms->pit_enabled = value;
}
static void pc_machine_initfn(Object *obj)
@@ -2271,9 +2271,9 @@ static void pc_machine_initfn(Object *obj)
pcms->acpi_nvdimm_state.is_enabled = false;
/* acpi build is enabled by default if machine supports it */
pcms->acpi_build_enabled = PC_MACHINE_GET_CLASS(pcms)->has_acpi_build;
- pcms->smbus = true;
- pcms->sata = true;
- pcms->pit = true;
+ pcms->smbus_enabled = true;
+ pcms->sata_enabled = true;
+ pcms->pit_enabled = true;
}
static void pc_machine_reset(void)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 7092d6d13f..2d996162f1 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -239,7 +239,8 @@ static void pc_init1(MachineState *machine,
/* init basic PC hardware */
pc_basic_device_init(isa_bus, pcms->gsi, &rtc_state, true,
- (pcms->vmport != ON_OFF_AUTO_ON), pcms->pit, 0x4);
+ (pcms->vmport != ON_OFF_AUTO_ON), pcms->pit_enabled,
+ 0x4);
pc_nic_init(pcmc, isa_bus, pci_bus);
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 4702bb13c4..6e3d81f5be 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -236,13 +236,13 @@ static void pc_q35_init(MachineState *machine)
/* init basic PC hardware */
pc_basic_device_init(isa_bus, pcms->gsi, &rtc_state, !mc->no_floppy,
- (pcms->vmport != ON_OFF_AUTO_ON), pcms->pit,
+ (pcms->vmport != ON_OFF_AUTO_ON), pcms->pit_enabled,
0xff0104);
/* connect pm stuff to lpc */
ich9_lpc_pm_init(lpc, pc_machine_is_smm_enabled(pcms));
- if (pcms->sata) {
+ if (pcms->sata_enabled) {
/* ahci and SATA device, for q35 1 ahci controller is built-in */
ahci = pci_create_simple_multifunction(host_bus,
PCI_DEVFN(ICH9_SATA1_DEV,
@@ -262,7 +262,7 @@ static void pc_q35_init(MachineState *machine)
ehci_create_ich9_with_companions(host_bus, 0x1d);
}
- if (pcms->smbus) {
+ if (pcms->smbus_enabled) {
/* TODO: Populate SPD eeprom data. */
smbus_eeprom_init(ich9_smb_init(host_bus,
PCI_DEVFN(ICH9_SMB_DEV, ICH9_SMB_FUNC),
--
2.18.0.rc1.1.g3f1ff2140
- [Qemu-devel] [PULL 03/24] docs: Document vCPU hotplug procedure, (continued)
- [Qemu-devel] [PULL 03/24] docs: Document vCPU hotplug procedure, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 02/24] hw/timer/sun4v-rtc: Fix tracing at sun4v_rtc_write(), Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 04/24] Deprecate QMP `cpu-add`, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 01/24] hostmem-file: remove object id from pmem error message, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 05/24] Deprecate HMP `cpu-add`, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 07/24] memory-device: use QEMU_IS_ALIGNED, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 06/24] range: pass const pointer where possible, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 08/24] memory-device: avoid overflows on very huge devices, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 09/24] move ObjectClass to typedefs.h, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 11/24] numa: Match struct to typedef name, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 10/24] i386: Rename bools in PCMachineState to end in _enabled,
Eduardo Habkost <=
- [Qemu-devel] [PULL 12/24] hostmem: Validate host-nodes before setting bitmap, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 16/24] spapr: Use default_machine_opts to set suppress_vmdesc, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 18/24] pc: Use default_machine_opts to set suppress_vmdesc, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 14/24] virt: Eliminate separate instance_init functions, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 13/24] q35/440fx/arm/spapr: Add QEMU 4.0 machine type, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 17/24] spapr: Delete instance_options functions, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 15/24] spapr: Use default_machine_opts to set use_hotplug_event_source, Eduardo Habkost, 2018/12/11
- [Qemu-devel] [PULL 19/24] tests: qdev_prop_check_globals() doesn't return "all_used", Eduardo Habkost, 2018/12/11