[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 for-2.4 09/11] s390x/ipl: Fix boot if no bootindex
From: |
Cornelia Huck |
Subject: |
[Qemu-devel] [PULL v2 for-2.4 09/11] s390x/ipl: Fix boot if no bootindex was specified |
Date: |
Thu, 2 Jul 2015 12:14:20 +0200 |
From: Christian Borntraeger <address@hidden>
commit fa92e218df1d ("s390x/ipl: avoid sign extension") introduced
a regression:
qemu-system-s390x -drive file=image.qcow,format=qcow2
does not boot, the bios states
"No virtio-blk device found!"
adding bootindex=1 does boot.
The reason is that the uint32_t as return value will not do the right
thing for the return -1 (default without bootindex).
The bios itself, will interpret a 64bit -1 as autodetect (but it will
interpret 32bit -1 as ccw device address ff.ff.ffff)
Signed-off-by: Christian Borntraeger <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Cc: Cornelia Huck <address@hidden>
Cc: address@hidden # v2.3.0
Tested-by: Aurelien Jarno <address@hidden>
Reviewed-by: Aurelien Jarno <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
hw/s390x/ipl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
index 132004a..2e0a8b6 100644
--- a/hw/s390x/ipl.c
+++ b/hw/s390x/ipl.c
@@ -218,7 +218,7 @@ static Property s390_ipl_properties[] = {
* - -1 if no valid boot device was found
* - ccw id of the boot device otherwise
*/
-static uint32_t s390_update_iplstate(CPUS390XState *env, S390IPLState *ipl)
+static uint64_t s390_update_iplstate(CPUS390XState *env, S390IPLState *ipl)
{
DeviceState *dev_st;
@@ -248,7 +248,7 @@ static uint32_t s390_update_iplstate(CPUS390XState *env,
S390IPLState *ipl)
return -1;
out:
- return ipl->cssid << 24 | ipl->ssid << 16 | ipl->devno;
+ return (uint32_t) (ipl->cssid << 24 | ipl->ssid << 16 | ipl->devno);
}
int s390_ipl_update_diag308(IplParameterBlock *iplb)
--
2.4.5
- [Qemu-devel] [PULL v2 for-2.4 00/11] s390x patches for 2.4, Cornelia Huck, 2015/07/02
- [Qemu-devel] [PULL v2 for-2.4 03/11] s390-ccw.img: Consume service interrupts, Cornelia Huck, 2015/07/02
- [Qemu-devel] [PULL v2 for-2.4 02/11] css: mss/mcss-e vs. migration, Cornelia Huck, 2015/07/02
- [Qemu-devel] [PULL v2 for-2.4 01/11] virtio-ccw: complete handling of guest-initiated resets, Cornelia Huck, 2015/07/02
- [Qemu-devel] [PULL v2 for-2.4 05/11] s390x/css: Add a callback for when subchannel gets disabled, Cornelia Huck, 2015/07/02
- [Qemu-devel] [PULL v2 for-2.4 07/11] s390x/virtio-ccw: support virtio-1 set_vq format, Cornelia Huck, 2015/07/02
- [Qemu-devel] [PULL v2 for-2.4 06/11] s390x/virtio-ccw: add virtio set-revision call, Cornelia Huck, 2015/07/02
- [Qemu-devel] [PULL v2 for-2.4 08/11] virtio-ccw: migrate ->revision, Cornelia Huck, 2015/07/02
- [Qemu-devel] [PULL v2 for-2.4 04/11] s390-ccw.img: update, Cornelia Huck, 2015/07/02
- [Qemu-devel] [PULL v2 for-2.4 09/11] s390x/ipl: Fix boot if no bootindex was specified,
Cornelia Huck <=
- [Qemu-devel] [PULL v2 for-2.4 10/11] s390x/gdb: synchronize cpu state after modifying acrs, Cornelia Huck, 2015/07/02
- [Qemu-devel] [PULL v2 for-2.4 11/11] s390x/migration: Introduce 2.4 machine, Cornelia Huck, 2015/07/02
- Re: [Qemu-devel] [PULL v2 for-2.4 00/11] s390x patches for 2.4, Peter Maydell, 2015/07/02