hw/s390x/ipl: Fix endianness problem with netboot_start_addr
authorThomas Huth <thuth@redhat.com>
Wed, 5 Jul 2017 15:25:45 +0000 (17:25 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Wed, 5 Jul 2017 17:46:30 +0000 (19:46 +0200)
The start address has to be stored in big endian byte order
in the iplb.ccw block for the guest.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1499268345-12552-1-git-send-email-thuth@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
hw/s390x/ipl.c

index 4e6469db0f0476108b69f43e6062c0c29e473b5f..cc360031ef28e821ef85ae3ef2ce824872ef189e 100644 (file)
@@ -418,7 +418,7 @@ void s390_ipl_prepare_cpu(S390CPU *cpu)
             error_report_err(err);
             vm_stop(RUN_STATE_INTERNAL_ERROR);
         }
-        ipl->iplb.ccw.netboot_start_addr = ipl->start_addr;
+        ipl->iplb.ccw.netboot_start_addr = cpu_to_be64(ipl->start_addr);
     }
 }