s390x: fix -initrd in virtio machine
PATCH 1/1 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 <[email protected]>
--- hw/s390-virtio.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
hw/s390-virtio.c +2 -2
@@ -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 )) {
Signature · 1 line
1.6.0.2
Quoted 5 lines · Alexander Graf
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 <[email protected]>
Quoted 5 lines · Alexander Graf
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 <[email protected]>
Tested-by Richard Henderson <[email protected]>
r~