All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Christian Borntraeger <borntraeger@de.ibm.com>,
	Anthony Liguori <anthony@codemonkey.ws>,
	Peter Maydell <peter.maydell@linaro.org>
Cc: "Cornelia Huck" <cornelia.huck@de.ibm.com>,
	"Jens Freimann" <jfrei@linux.vnet.ibm.com>,
	"Alexander Graf" <agraf@suse.de>,
	"Andreas Färber" <afaerber@suse.de>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PULL 1/3] s390-ccw.img: Fix sporadic reboot hangs: Initialize next_idx
Date: Thu, 13 Feb 2014 07:15:54 -0800	[thread overview]
Message-ID: <52FCE1AA.4080509@twiddle.net> (raw)
In-Reply-To: <1392283031-40129-2-git-send-email-borntraeger@de.ibm.com>

On 02/13/2014 01:17 AM, Christian Borntraeger wrote:
> The current code does not initialize next_idx as the qemu
> elf loader does not zero the bss section.
> Make the initialization explicit.
> 
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  pc-bios/s390-ccw/virtio.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/pc-bios/s390-ccw/virtio.c b/pc-bios/s390-ccw/virtio.c
> index 4d6e48f..a46914d 100644
> --- a/pc-bios/s390-ccw/virtio.c
> +++ b/pc-bios/s390-ccw/virtio.c
> @@ -124,6 +124,7 @@ static void vring_init(struct vring *vr, unsigned int num, void *p,
>      vr->used->flags = VRING_USED_F_NO_NOTIFY;
>      vr->used->idx = 0;
>      vr->used_idx = 0;
> +    vr->next_idx = 0;
>  
>      debug_print_addr("init vr", vr);
>  }
> 

FWIW, I believe that rom_reset needs to do this re-zeroing of the bss.
That seems to be the only place we don't take care for datasize != romsize.


r~

  parent reply	other threads:[~2014-02-13 15:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-13  9:17 [Qemu-devel] [PULL 0/3] s390-ccw.img: fix sporadic boot errors Christian Borntraeger
2014-02-13  9:17 ` [Qemu-devel] [PULL 1/3] s390-ccw.img: Fix sporadic reboot hangs: Initialize next_idx Christian Borntraeger
2014-02-13  9:38   ` Cornelia Huck
2014-02-13 15:15   ` Richard Henderson [this message]
2014-02-13 19:39     ` Christian Borntraeger
2014-02-13 21:41       ` [Qemu-devel] [PATCH/RFC] clear bss memory of ROMS Christian Borntraeger
2014-02-13  9:17 ` [Qemu-devel] [PULL 2/3] s390-ccw.img: Fix sporadic errors with ccw boot image - initialize css Christian Borntraeger
2014-02-13  9:39   ` Cornelia Huck
2014-02-13  9:55   ` Peter Maydell
2014-02-13 10:05     ` Christian Borntraeger
2014-02-13 11:04       ` Peter Maydell
2014-02-13 12:59         ` Christian Borntraeger
2014-02-13  9:17 ` [Qemu-devel] [PULL 3/3] s390-ccw.img: new binary rom to match latest fixes Christian Borntraeger
2014-02-13  9:21 ` [Qemu-devel] [PULL 0/3] s390-ccw.img: fix sporadic boot errors Peter Maydell
2014-02-13  9:26   ` Christian Borntraeger

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=52FCE1AA.4080509@twiddle.net \
    --to=rth@twiddle.net \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=anthony@codemonkey.ws \
    --cc=borntraeger@de.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=jfrei@linux.vnet.ibm.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.