From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkCiL-0001WC-Tq for qemu-devel@nongnu.org; Tue, 13 May 2014 09:25:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkChr-0001aJ-Nz for qemu-devel@nongnu.org; Tue, 13 May 2014 09:25:49 -0400 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:59198) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkChr-0001YK-Ej for qemu-devel@nongnu.org; Tue, 13 May 2014 09:25:19 -0400 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 13 May 2014 14:25:18 +0100 Date: Tue, 13 May 2014 15:25:12 +0200 From: Cornelia Huck Message-ID: <20140513152512.70cf8ce6.cornelia.huck@de.ibm.com> In-Reply-To: <1399473780-20374-2-git-send-email-marcel.a@redhat.com> References: <1399473780-20374-1-git-send-email-marcel.a@redhat.com> <1399473780-20374-2-git-send-email-marcel.a@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/4] machine: conversion of QEMUMachineInitArgs to MachineState List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcel Apfelbaum Cc: mst@redhat.com, aik@ozlabs.ru, qemu-devel@nongnu.org, lcapitulino@redhat.com, blauwirbel@gmail.com, jcmvbkbc@gmail.com, edgar.iglesias@gmail.com, gxt@mprc.pku.edu.cn, proljc@gmail.com, agraf@suse.de, lersek@redhat.com, borntraeger@de.ibm.com, hpoussin@reactos.org, aliguori@amazon.com, mdroth@linux.vnet.ibm.com, chouteau@adacore.com, jan.kiszka@web.de, stefanha@redhat.com, pbonzini@redhat.com, scottwood@freescale.com, peter.crosthwaite@xilinx.com, mark.langsdorf@calxeda.com, armbru@redhat.com, michael@walle.cc, qemu-ppc@nongnu.org, peter.chubb@nicta.com.au, afaerber@suse.de, aurelien@aurel32.net On Wed, 7 May 2014 17:42:57 +0300 Marcel Apfelbaum wrote: > 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 > --- > - I am perfectly aware that patches touching a lot of files > are not desirable, but this one is a very simple replacement > patch: > QEMUMachineInitArgs -> MachineState > args -> ms > - This is the simplest way to get rid of QEMUMachineInitArgs fast. > > hw/s390x/s390-virtio-ccw.c | 10 +-- > hw/s390x/s390-virtio.c | 10 +-- > diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c > index 0d4f6ae..3d28045 100644 > --- a/hw/s390x/s390-virtio-ccw.c > +++ b/hw/s390x/s390-virtio-ccw.c > @@ -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 *ms) > { > - ram_addr_t my_ram_size = args->ram_size; > + ram_addr_t my_ram_size = ms->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(ms->kernel_filename, ms->kernel_cmdline, > + ms->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(ms->cpu_model, storage_keys); > > if (kvm_enabled()) { > kvm_s390_enable_css_support(s390_cpu_addr2state(0)); > diff --git a/hw/s390x/s390-virtio.c b/hw/s390x/s390-virtio.c > index aef2003..19443d2 100644 > --- a/hw/s390x/s390-virtio.c > +++ b/hw/s390x/s390-virtio.c > @@ -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 *ms) > { > - ram_addr_t my_ram_size = args->ram_size; > + ram_addr_t my_ram_size = ms->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(ms->kernel_filename, ms->kernel_cmdline, > + ms->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(ms->cpu_model, storage_keys); > > /* Create VirtIO network adapters */ > s390_create_virtio_net((BusState *)s390_bus, "virtio-net-s390"); The changes to the s390 machines look sane to me. Acked-by: Cornelia Huck