summaryrefslogtreecommitdiffstats
path: root/hw/s390x/s390-virtio.c
diff options
context:
space:
mode:
authorDavid Hildenbrand2015-05-29 15:01:55 +0200
committerCornelia Huck2015-09-07 16:10:44 +0200
commit80d23275e3c4bc93fa6f123613d5ff389ed3fc62 (patch)
tree289a9138005fd0992c266f98b5b5977eb86d3e64 /hw/s390x/s390-virtio.c
parents390: move memory calculation into the sclp device (diff)
downloadqemu-80d23275e3c4bc93fa6f123613d5ff389ed3fc62.tar.gz
qemu-80d23275e3c4bc93fa6f123613d5ff389ed3fc62.tar.xz
qemu-80d23275e3c4bc93fa6f123613d5ff389ed3fc62.zip
s390: unify allocation of initial memory
Now that the calculation of the initial memory is hidden in the sclp device, we can unify the allocation of the initial memory. The remaining ugly part is the reserved memory for the virtio queues, but that can be cleaned up later. Reviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com> Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'hw/s390x/s390-virtio.c')
-rw-r--r--hw/s390x/s390-virtio.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/hw/s390x/s390-virtio.c b/hw/s390x/s390-virtio.c
index c8e4737cba..e4000c92e1 100644
--- a/hw/s390x/s390-virtio.c
+++ b/hw/s390x/s390-virtio.c
@@ -262,8 +262,6 @@ int gtod_load(QEMUFile *f, void *opaque, int version_id)
static void s390_init(MachineState *machine)
{
ram_addr_t my_ram_size;
- MemoryRegion *sysmem = get_system_memory();
- MemoryRegion *ram = g_new(MemoryRegion, 1);
void *virtio_region;
hwaddr virtio_region_len;
hwaddr virtio_region_start;
@@ -285,9 +283,7 @@ static void s390_init(MachineState *machine)
s390_virtio_register_hcalls();
/* allocate RAM */
- memory_region_init_ram(ram, NULL, "s390.ram", my_ram_size, &error_abort);
- vmstate_register_ram_global(ram);
- memory_region_add_subregion(sysmem, 0, ram);
+ s390_memory_init(my_ram_size);
/* clear virtio region */
virtio_region_len = my_ram_size - ram_size;
@@ -298,9 +294,6 @@ static void s390_init(MachineState *machine)
cpu_physical_memory_unmap(virtio_region, virtio_region_len, 1,
virtio_region_len);
- /* Initialize storage key device */
- s390_skeys_init();
-
/* init CPUs */
s390_init_cpus(machine->cpu_model);