summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2012-09-19 17:24:46 +0200
committerDoug Goldstein <cardoe@cardoe.com>2012-12-13 15:31:59 -0600
commitb9a852d5b6cd4bbf4da1b8de443afc4531db7e10 (patch)
tree97667cf1a2aeeeb1106874e6d87ef37a4002d63b
parentmemory: fix rendering of a region obscured by another (diff)
downloadqemu-kvm-b9a852d5b6cd4bbf4da1b8de443afc4531db7e10.tar.gz
qemu-kvm-b9a852d5b6cd4bbf4da1b8de443afc4531db7e10.tar.bz2
qemu-kvm-b9a852d5b6cd4bbf4da1b8de443afc4531db7e10.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) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> (cherry picked from commit 7817b8d858852adb2ae93f2af8c7f2a1198f4f61)
-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 47eed35da..12ae612bf 100644
--- a/hw/s390-virtio.c
+++ b/hw/s390-virtio.c
@@ -284,8 +284,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)) {