qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: seabios@seabios.org
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] fix virtio-blk failure after reboot
Date: Wed, 15 Sep 2010 18:31:44 +0200	[thread overview]
Message-ID: <20100915163144.GM3008@redhat.com> (raw)

vring_virtqueue should be zeroed otherwise old values will be reused
after reboot.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
diff --git a/src/virtio-blk.c b/src/virtio-blk.c
index 34d7863..7a25826 100644
--- a/src/virtio-blk.c
+++ b/src/virtio-blk.c
@@ -109,6 +109,7 @@ init_virtio_blk(u16 bdf)
         goto fail;
     }
     memset(vdrive_g, 0, sizeof(*vdrive_g));
+    memset(vq, 0, sizeof(*vq));
     vdrive_g->drive.type = DTYPE_VIRTIO;
     vdrive_g->drive.cntl_id = bdf;
     vdrive_g->vq = vq;
--
			Gleb.

             reply	other threads:[~2010-09-15 16:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-15 16:31 Gleb Natapov [this message]
2010-09-15 21:05 ` [Qemu-devel] Re: [PATCH] fix virtio-blk failure after reboot Michael S. Tsirkin
2010-09-25 15:44 ` [Qemu-devel] Re: [SeaBIOS] " Kevin O'Connor
2010-11-08 23:59 ` Kevin O'Connor
2010-11-09  6:46   ` Gleb Natapov
2010-11-13 15:01     ` Kevin O'Connor

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=20100915163144.GM3008@redhat.com \
    --to=gleb@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=seabios@seabios.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).