mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
machine: Conversion of QEMUMachineInitArgs to MachineState
Total removal of QEMUMachineInitArgs struct. QEMUMachineInitArgs's fields are copied into MachineState. Removed duplicated fields from MachineState. All the other changes are only mechanical refactoring, no semantic changes. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> (s390) Reviewed-by: Michael S. Tsirkin <mst@redhat.com> (PC) [AF: Renamed ms -> machine, use MACHINE_GET_CLASS()] Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
0380aef323
commit
3ef9622182
65 changed files with 545 additions and 549 deletions
|
@ -79,9 +79,9 @@ static void virtio_ccw_register_hcalls(void)
|
|||
virtio_ccw_hcall_early_printk);
|
||||
}
|
||||
|
||||
static void ccw_init(QEMUMachineInitArgs *args)
|
||||
static void ccw_init(MachineState *machine)
|
||||
{
|
||||
ram_addr_t my_ram_size = args->ram_size;
|
||||
ram_addr_t my_ram_size = machine->ram_size;
|
||||
MemoryRegion *sysmem = get_system_memory();
|
||||
MemoryRegion *ram = g_new(MemoryRegion, 1);
|
||||
int shift = 0;
|
||||
|
@ -102,8 +102,8 @@ static void ccw_init(QEMUMachineInitArgs *args)
|
|||
/* get a BUS */
|
||||
css_bus = virtual_css_bus_init();
|
||||
s390_sclp_init();
|
||||
s390_init_ipl_dev(args->kernel_filename, args->kernel_cmdline,
|
||||
args->initrd_filename, "s390-ccw.img");
|
||||
s390_init_ipl_dev(machine->kernel_filename, machine->kernel_cmdline,
|
||||
machine->initrd_filename, "s390-ccw.img");
|
||||
s390_flic_init();
|
||||
|
||||
/* register hypercalls */
|
||||
|
@ -118,7 +118,7 @@ static void ccw_init(QEMUMachineInitArgs *args)
|
|||
storage_keys = g_malloc0(my_ram_size / TARGET_PAGE_SIZE);
|
||||
|
||||
/* init CPUs */
|
||||
s390_init_cpus(args->cpu_model, storage_keys);
|
||||
s390_init_cpus(machine->cpu_model, storage_keys);
|
||||
|
||||
if (kvm_enabled()) {
|
||||
kvm_s390_enable_css_support(s390_cpu_addr2state(0));
|
||||
|
|
|
@ -224,9 +224,9 @@ void s390_create_virtio_net(BusState *bus, const char *name)
|
|||
}
|
||||
|
||||
/* PC hardware initialisation */
|
||||
static void s390_init(QEMUMachineInitArgs *args)
|
||||
static void s390_init(MachineState *machine)
|
||||
{
|
||||
ram_addr_t my_ram_size = args->ram_size;
|
||||
ram_addr_t my_ram_size = machine->ram_size;
|
||||
MemoryRegion *sysmem = get_system_memory();
|
||||
MemoryRegion *ram = g_new(MemoryRegion, 1);
|
||||
int shift = 0;
|
||||
|
@ -248,8 +248,8 @@ static void s390_init(QEMUMachineInitArgs *args)
|
|||
/* get a BUS */
|
||||
s390_bus = s390_virtio_bus_init(&my_ram_size);
|
||||
s390_sclp_init();
|
||||
s390_init_ipl_dev(args->kernel_filename, args->kernel_cmdline,
|
||||
args->initrd_filename, ZIPL_FILENAME);
|
||||
s390_init_ipl_dev(machine->kernel_filename, machine->kernel_cmdline,
|
||||
machine->initrd_filename, ZIPL_FILENAME);
|
||||
s390_flic_init();
|
||||
|
||||
/* register hypercalls */
|
||||
|
@ -273,7 +273,7 @@ static void s390_init(QEMUMachineInitArgs *args)
|
|||
storage_keys = g_malloc0(my_ram_size / TARGET_PAGE_SIZE);
|
||||
|
||||
/* init CPUs */
|
||||
s390_init_cpus(args->cpu_model, storage_keys);
|
||||
s390_init_cpus(machine->cpu_model, storage_keys);
|
||||
|
||||
/* Create VirtIO network adapters */
|
||||
s390_create_virtio_net((BusState *)s390_bus, "virtio-net-s390");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue