aboutsummaryrefslogtreecommitdiff
path: root/lib/libvirtio/virtio-blk.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libvirtio/virtio-blk.c')
-rw-r--r--lib/libvirtio/virtio-blk.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libvirtio/virtio-blk.c b/lib/libvirtio/virtio-blk.c
index 7b1e795..e470968 100644
--- a/lib/libvirtio/virtio-blk.c
+++ b/lib/libvirtio/virtio-blk.c
@@ -27,7 +27,10 @@ virtioblk_init(struct virtio_device *dev)
struct vring_avail *vq_avail;
/* Reset device */
- // virtio_reset_device(dev);
+ // XXX That will clear the virtq base. We need to move
+ // initializing it to here anyway
+ //
+ // virtio_reset_device(dev);
/* Acknowledge device. */
virtio_set_status(dev, VIRTIO_STAT_ACKNOWLEDGE);
@@ -146,6 +149,7 @@ virtioblk_read(struct virtio_device *dev, char *buf, long blocknum, long cnt)
/* Wait for host to consume the descriptor */
i = 10000000;
while (*current_used_idx == last_used_idx && i-- > 0) {
+ // do something better
sync();
}