From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: "Cornelia Huck" <cornelia.huck@de.ibm.com>,
"Andreas Färber" <andreas.faerber@web.de>,
"Michael S. Tsirkin" <mst@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>,
"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PULL 30/30] virtio: Convert exit to unrealize
Date: Thu, 19 Dec 2013 16:32:54 +0100 [thread overview]
Message-ID: <52B311A6.4030100@redhat.com> (raw)
In-Reply-To: <CAJSP0QUVcNor4vjSfwXus88cJ-WTfwPP2-oCmFentzpANRhc7A@mail.gmail.com>
Il 19/12/2013 16:25, Stefan Hajnoczi ha scritto:
> On Mon, Dec 9, 2013 at 9:48 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> From: Andreas Färber <afaerber@suse.de>
>>
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>> hw/block/virtio-blk.c | 10 ++++++----
>> hw/char/virtio-serial-bus.c | 9 +++++----
>> hw/net/virtio-net.c | 9 +++++----
>> hw/scsi/vhost-scsi.c | 11 ++++++-----
>> hw/scsi/virtio-scsi.c | 17 +++++++++--------
>> hw/virtio/virtio-balloon.c | 9 +++++----
>> hw/virtio/virtio-rng.c | 9 +++++----
>> hw/virtio/virtio.c | 13 ++++++++-----
>> include/hw/virtio/virtio-scsi.h | 2 +-
>> include/hw/virtio/virtio.h | 2 +-
>> 10 files changed, 51 insertions(+), 40 deletions(-)
>
> This commit breaks qemu-iotests 067:
>
> 067 1s ... - output mismatch (see 067.out.bad)
> --- 067.out 2013-12-11 09:44:01.509447778 +0100
> +++ 067.out.bad 2013-12-19 16:02:39.582984141 +0100
> @@ -12,7 +12,7 @@
> {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP},
> "event": "DEVICE_DELETED", "data": {"path":
> "/machine/peripheral/virtio0/virtio-backend"}}
> {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP},
> "event": "DEVICE_DELETED", "data": {"device": "virtio0", "path":
> "/machine/peripheral/virtio0"}}
> {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP},
> "event": "RESET"}
> -{"return": [{"io-status": "ok", "device": "ide1-cd0", "locked":
> false, "removable": true, "tray_open": false, "type": "unknown"},
> {"device": "floppy0", "locked": false, "removable": true, "tray_open":
> false, "type": "unknown"}, {"device": "sd0", "locked": false,
> "removable": true, "tray_open": false, "type": "unknown"}]}
> +{"return": [{"io-status": "ok", "device": "disk", "locked": false,
> "removable": false, "inserted": {"iops_rd": 0, "image":
> {"virtual-size": 134217728, "filename": "TEST_DIR/t.qcow2",
> "cluster-size": 65536, "format": "qcow2", "actual-size": SIZE,
> "format-specific": {"type": "qcow2", "data": {"compat": "1.1",
> "lazy-refcounts": false}}, "dirty-flag": false}, "iops_wr": 0, "ro":
> false, "backing_file_depth": 0, "drv": "qcow2", "iops": 0, "bps_wr":
> 0, "encrypted": false, "bps": 0, "bps_rd": 0, "file":
> "TEST_DIR/t.qcow2", "encryption_key_missing": false}, "type":
> "unknown"}, {"io-status": "ok", "device": "ide1-cd0", "locked": false,
> "removable": true, "tray_open": false, "type": "unknown"}, {"device":
> "floppy0", "locked": false, "removable": true, "tray_open": false,
> "type": "unknown"}, {"device": "sd0", "locked": false, "removable":
> true, "tray_open": false, "type": "unknown"}]}
> {"return": {}}
> {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP},
> "event": "SHUTDOWN"}
> {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP},
> "event": "DEVICE_TRAY_MOVED", "data": {"device": "ide1-cd0",
> "tray-open": true}}
>
>> diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
>> index 1dba284..144b9ca 100644
>> --- a/hw/virtio/virtio.c
>> +++ b/hw/virtio/virtio.c
>> @@ -1169,12 +1169,15 @@ static void virtio_device_realize(DeviceState *dev, Error **errp)
>> static void virtio_device_unrealize(DeviceState *dev, Error **errp)
>> {
>> VirtIODevice *vdev = VIRTIO_DEVICE(dev);
>> - VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(dev);
>> -
>> - virtio_bus_device_unplugged(vdev);
>> + VirtioDeviceClass *vdc = VIRTIO_DEVICE_GET_CLASS(dev);
>> + Error *err = NULL;
>>
>> - if (k->exit != NULL) {
>> - k->exit(vdev);
>> + if (vdc->unrealize != NULL) {
>> + vdc->unrealize(dev, &err);
>> + if (err != NULL) {
>> + error_propagate(errp, err);
>> + return;
>> + }
>> }
>
> We no longer call virtio_bus_device_unplugged(dev). I don't see it
> called from anywhere else in the codebase!
Ugh, that's a rebase snafu. :( I'll send a patch tomorrow.
Paolo
next prev parent reply other threads:[~2013-12-19 15:33 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-09 20:48 [Qemu-devel] [PULL 00/30] virtio conversion to realize and hotplug/unplug fixes Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 01/30] virtio-ccw: move virtio_ccw_stop_ioeventfd to virtio_ccw_busdev_unplug Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 02/30] virtio-bus: remove vdev field Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 03/30] virtio-ccw: " Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 04/30] virtio-pci: " Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 05/30] virtio-bus: cleanup plug/unplug interface Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 06/30] virtio-blk: switch exit callback to VirtioDeviceClass Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 07/30] virtio-serial: " Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 08/30] virtio-net: " Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 09/30] virtio-scsi: " Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 10/30] virtio-balloon: " Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 11/30] virtio-rng: " Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 12/30] virtio-pci: add device_unplugged callback Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 13/30] virtio-blk-dataplane: Improve error reporting Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 14/30] virtio-9p: QOM realize preparations Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 15/30] virtio-blk: " Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 16/30] virtio-serial: " Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 17/30] virtio-net: " Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 18/30] virtio-balloon: " Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 19/30] virtio-rng: " Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 20/30] virtio-scsi: " Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 21/30] virtio: Start converting VirtioDevice to QOM realize Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 22/30] virtio-9p: Convert " Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 23/30] virtio-blk: " Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 24/30] virtio-serial: " Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 25/30] virtio-net: " Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 26/30] virtio-balloon: " Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 27/30] virtio-rng: " Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 28/30] virtio-scsi: " Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 29/30] virtio: Complete converting VirtioDevice " Paolo Bonzini
2013-12-09 20:48 ` [Qemu-devel] [PULL 30/30] virtio: Convert exit to unrealize Paolo Bonzini
2013-12-19 15:25 ` Stefan Hajnoczi
2013-12-19 15:32 ` Paolo Bonzini [this message]
2013-12-11 0:12 ` [Qemu-devel] [PULL 00/30] virtio conversion to realize and hotplug/unplug fixes Anthony Liguori
2013-12-11 7:45 ` Paolo Bonzini
2013-12-13 15:50 ` Paolo Bonzini
2013-12-13 16:37 ` Anthony Liguori
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=52B311A6.4030100@redhat.com \
--to=pbonzini@redhat.com \
--cc=afaerber@suse.de \
--cc=andreas.faerber@web.de \
--cc=cornelia.huck@de.ibm.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/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).