qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: peter.maydell@linaro.org
Cc: qemu-stable@nongnu.org, qemu-devel@nongnu.org, agraf@suse.de,
	borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com,
	Cornelia Huck <cornelia.huck@de.ibm.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: [Qemu-devel] [PULL for-2.4 09/11] s390x/ipl: Fix boot if no bootindex was specified
Date: Thu,  2 Jul 2015 09:42:23 +0200	[thread overview]
Message-ID: <1435822945-30232-10-git-send-email-cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <1435822945-30232-1-git-send-email-cornelia.huck@de.ibm.com>

From: Christian Borntraeger <borntraeger@de.ibm.com>

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 <borntraeger@de.ibm.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: qemu-stable@nongnu.org # v2.3.0
Tested-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
 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

  parent reply	other threads:[~2015-07-02  7:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-02  7:42 [Qemu-devel] [PULL for-2.4 00/11] s390x patches for 2.4 Cornelia Huck
2015-07-02  7:42 ` [Qemu-devel] [PULL for-2.4 01/11] virtio-ccw: complete handling of guest-initiated resets Cornelia Huck
2015-07-02  7:42 ` [Qemu-devel] [PULL for-2.4 02/11] css: mss/mcss-e vs. migration Cornelia Huck
2015-07-02  7:42 ` [Qemu-devel] [PULL for-2.4 03/11] s390-ccw.img: Consume service interrupts Cornelia Huck
2015-07-02  7:42 ` [Qemu-devel] [PULL for-2.4 04/11] s390-ccw.img: update Cornelia Huck
2015-07-02  7:42 ` [Qemu-devel] [PULL for-2.4 05/11] s390x/css: Add a callback for when subchannel gets disabled Cornelia Huck
2015-07-02  7:42 ` [Qemu-devel] [PULL for-2.4 06/11] s390x/virtio-ccw: add virtio set-revision call Cornelia Huck
2015-07-02  7:42 ` [Qemu-devel] [PULL for-2.4 07/11] s390x/virtio-ccw: support virtio-1 set_vq format Cornelia Huck
2015-07-02  7:42 ` [Qemu-devel] [PULL for-2.4 08/11] virtio-ccw: migrate ->revision Cornelia Huck
2015-07-02  7:42 ` Cornelia Huck [this message]
2015-07-02  7:42 ` [Qemu-devel] [PULL for-2.4 10/11] s390x/gdb: synchronize cpu state after modifying acrs Cornelia Huck
2015-07-02  7:42 ` [Qemu-devel] [PULL for-2.4 11/11] s390x/migration: Introduce 2.4 machine Cornelia Huck
2015-07-02  9:44 ` [Qemu-devel] [PULL for-2.4 00/11] s390x patches for 2.4 Peter Maydell
2015-07-02  9:52   ` Cornelia Huck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1435822945-30232-10-git-send-email-cornelia.huck@de.ibm.com \
    --to=cornelia.huck@de.ibm.com \
    --cc=agraf@suse.de \
    --cc=borntraeger@de.ibm.com \
    --cc=jfrei@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).