summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2012-09-19 17:24:46 +0200
committerDoug Goldstein <cardoe@cardoe.com>2012-11-21 15:26:15 -0600
commit7531e7c1fd2a8a2260c0b5d1a2dabed6695929a3 (patch)
treefbab15ae293844aa12e0ef316862542dc45b1512
parentmemory: fix rendering of a region obscured by another (diff)
downloadqemu-kvm-7531e7c1fd2a8a2260c0b5d1a2dabed6695929a3.tar.gz
qemu-kvm-7531e7c1fd2a8a2260c0b5d1a2dabed6695929a3.tar.bz2
qemu-kvm-7531e7c1fd2a8a2260c0b5d1a2dabed6695929a3.zip
s390x: fix -initrd in virtio machine
When using -initrd in the virtio machine, we need to indicate the initrd start and size inside the kernel image. These parameters need to be stored in native endianness. Signed-off-by: Alexander Graf <agraf@suse.de> Acked-by: Richard Henderson <rth@twiddle.net> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> (cherry picked from commit 235a3f0bed3584fe65079ffa07c7a842971f261e)
-rw-r--r--hw/s390-virtio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c
index c0e19fd66..05058c3e5 100644
--- a/hw/s390-virtio.c
+++ b/hw/s390-virtio.c
@@ -282,8 +282,8 @@ static void s390_init(ram_addr_t my_ram_size,
}
/* we have to overwrite values in the kernel image, which are "rom" */
- memcpy(rom_ptr(INITRD_PARM_START), &initrd_offset, 8);
- memcpy(rom_ptr(INITRD_PARM_SIZE), &initrd_size, 8);
+ stq_p(rom_ptr(INITRD_PARM_START), initrd_offset);
+ stq_p(rom_ptr(INITRD_PARM_SIZE), initrd_size);
}
if (rom_ptr(KERN_PARM_AREA)) {