[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 29/45] pc: Simplify xen_load_linux() signature
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL v2 29/45] pc: Simplify xen_load_linux() signature |
Date: |
Sat, 6 Feb 2016 21:14:03 +0200 |
From: Eduardo Habkost <address@hidden>
We can get the PcGuestInfo struct directly from PCMachineState,
and the return value is not needed at all.
Signed-off-by: Eduardo Habkost <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Marcel Apfelbaum <address@hidden>
---
include/hw/i386/pc.h | 3 +--
hw/i386/pc.c | 5 ++---
hw/i386/pc_piix.c | 2 +-
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 5b21d01..223621a 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -248,8 +248,7 @@ PcGuestInfo *pc_guest_info_init(PCMachineState *pcms);
void pc_pci_as_mapping_init(Object *owner, MemoryRegion *system_memory,
MemoryRegion *pci_address_space);
-FWCfgState *xen_load_linux(PCMachineState *pcms,
- PcGuestInfo *guest_info);
+void xen_load_linux(PCMachineState *pcms);
void pc_memory_init(PCMachineState *pcms,
MemoryRegion *system_memory,
MemoryRegion *rom_memory,
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index fbdad88..9745dca 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1255,11 +1255,11 @@ void pc_acpi_init(const char *default_dsdt)
}
}
-FWCfgState *xen_load_linux(PCMachineState *pcms,
- PcGuestInfo *guest_info)
+void xen_load_linux(PCMachineState *pcms)
{
int i;
FWCfgState *fw_cfg;
+ PcGuestInfo *guest_info = &pcms->acpi_guest_info;
assert(MACHINE(pcms)->kernel_filename != NULL);
@@ -1273,7 +1273,6 @@ FWCfgState *xen_load_linux(PCMachineState *pcms,
rom_add_option(option_rom[i].name, option_rom[i].bootindex);
}
guest_info->fw_cfg = fw_cfg;
- return fw_cfg;
}
void pc_memory_init(PCMachineState *pcms,
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index ad51fd6..4262c32 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -165,7 +165,7 @@ static void pc_init1(MachineState *machine,
rom_memory, &ram_memory);
} else if (machine->kernel_filename != NULL) {
/* For xen HVM direct kernel boot, load linux here */
- xen_load_linux(pcms, guest_info);
+ xen_load_linux(pcms);
}
gsi_state = g_malloc0(sizeof(*gsi_state));
--
MST
- [Qemu-devel] [PULL v2 20/45] ipmi: cleanup error_report messages, (continued)
- [Qemu-devel] [PULL v2 20/45] ipmi: cleanup error_report messages, Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 22/45] ipmi: introduce a struct ipmi_sdr_compact, Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 23/45] ipmi: add get and set SENSOR_TYPE commands, Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 24/45] ipmi: add GET_SYS_RESTART_CAUSE chassis command, Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 25/45] ipmi: add ACPI power and GUID commands, Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 27/45] pc: Eliminate struct PcGuestInfoState, Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 26/45] pc: Move PcGuestInfo declaration to top of file, Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 28/45] pc: Simplify pc_memory_init() signature, Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 29/45] pc: Simplify xen_load_linux() signature,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL v2 30/45] acpi: Remove guest_info parameters from functions, Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 31/45] acpi: Don't save PcGuestInfo on AcpiBuildState, Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 32/45] pc: Remove compat fields from PcGuestInfo, Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 33/45] pc: Remove RAM size fields from PcGuestInfo, Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 34/45] pc: Remove PcGuestInfo.isapc_ram_fw field, Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 35/45] pc: Move PcGuestInfo.fw_cfg to PCMachineState, Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 36/45] pc: Move APIC and NUMA data from PcGuestInfo to PCMachineState, Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 37/45] pc: Eliminate PcGuestInfo struct, Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 38/45] acpi: take oem_id in build_header(), optionally, Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 39/45] acpi: expose oem_id and oem_table_id in build_rsdt(), Michael S. Tsirkin, 2016/02/06