From: Marcelo Tosatti <mtosatti@redhat.com>
To: Anthony Liguori <aliguori@us.ibm.com>, Avi Kivity <avi@qumranet.com>
Cc: kvm-devel@lists.sourceforge.net, Gerd von Egidy <lists@egidy.de>,
Marcelo Tosatti <mtosatti@redhat.com>
Subject: [patch 1/2] QEMU/KVM: provide a reset method for virtio
Date: Fri, 18 Apr 2008 19:20:41 -0300 [thread overview]
Message-ID: <20080418222407.311375085@localhost.localdomain> (raw)
In-Reply-To: 20080418222040.988332630@localhost.localdomain
[-- Attachment #1: virtio-reset --]
[-- Type: text/plain, Size: 1346 bytes --]
So drivers can do whatever necessary on reset.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Index: kvm-userspace.aio/qemu/hw/virtio.c
===================================================================
--- kvm-userspace.aio.orig/qemu/hw/virtio.c
+++ kvm-userspace.aio/qemu/hw/virtio.c
@@ -166,6 +166,9 @@ void virtio_reset(void *opaque)
VirtIODevice *vdev = opaque;
int i;
+ if (vdev->reset)
+ vdev->reset(vdev);
+
vdev->features = 0;
vdev->queue_sel = 0;
vdev->status = 0;
Index: kvm-userspace.aio/qemu/hw/virtio.h
===================================================================
--- kvm-userspace.aio.orig/qemu/hw/virtio.h
+++ kvm-userspace.aio/qemu/hw/virtio.h
@@ -119,6 +119,7 @@ struct VirtIODevice
uint32_t (*get_features)(VirtIODevice *vdev);
void (*set_features)(VirtIODevice *vdev, uint32_t val);
void (*update_config)(VirtIODevice *vdev, uint8_t *config);
+ void (*reset)(VirtIODevice *vdev);
VirtQueue vq[VIRTIO_PCI_QUEUE_MAX];
};
--
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
next prev parent reply other threads:[~2008-04-18 22:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-18 22:20 [patch 0/2] virtio-blk async IO Marcelo Tosatti
2008-04-18 22:20 ` Marcelo Tosatti [this message]
2008-04-18 22:20 ` [patch 2/2] QEMU/KVM: " Marcelo Tosatti
2008-04-18 22:57 ` [patch 0/2] " Gerd von Egidy
-- strict thread matches above, loose matches on Subject: below --
2008-06-05 5:01 [patch 0/2] virtio-blk async IO (v3) Marcelo Tosatti
2008-06-05 5:01 ` [patch 1/2] QEMU/KVM: provide a reset method for virtio Marcelo Tosatti
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=20080418222407.311375085@localhost.localdomain \
--to=mtosatti@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=avi@qumranet.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=lists@egidy.de \
/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.