From: Paolo Bonzini <pbonzini@redhat.com>
To: Ming Lei <ming.lei@canonical.com>,
Peter Maydell <peter.maydell@linaro.org>,
qemu-devel@nongnu.org
Cc: qemu-stable@nongnu.org, Anthony Liguori <aliguori@amazon.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] virtio-scsi: fix object check failure
Date: Wed, 18 Jun 2014 14:29:02 +0200 [thread overview]
Message-ID: <53A1860E.6040304@redhat.com> (raw)
In-Reply-To: <1403093631-7384-1-git-send-email-ming.lei@canonical.com>
Il 18/06/2014 14:13, Ming Lei ha scritto:
> In case of vhost-scsi, the object type of VirtIODevice isn't
> VirtIOSCSI, so use the cast trick to fix the problem like
> in virtio_scsi_handle_cmd()
>
> Cc: qemu-stable@nongnu.org
> Cc: Anthony Liguori <aliguori@amazon.com>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Ming Lei <ming.lei@canonical.com>
> ---
> hw/scsi/virtio-scsi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
> index b0d7517..13700f5 100644
> --- a/hw/scsi/virtio-scsi.c
> +++ b/hw/scsi/virtio-scsi.c
> @@ -538,7 +538,7 @@ static void virtio_scsi_push_event(VirtIOSCSI *s, SCSIDevice *dev,
>
> static void virtio_scsi_handle_event(VirtIODevice *vdev, VirtQueue *vq)
> {
> - VirtIOSCSI *s = VIRTIO_SCSI(vdev);
> + VirtIOSCSI *s = (VirtIOSCSI *)vdev;
>
> if (s->events_dropped) {
> virtio_scsi_push_event(s, NULL, VIRTIO_SCSI_T_NO_EVENT, 0);
>
This should never be triggered by vhost-scsi. Perhaps a bug in the kernel?
Paolo
next prev parent reply other threads:[~2014-06-18 12:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-18 12:13 [Qemu-devel] [PATCH] virtio-scsi: fix object check failure Ming Lei
2014-06-18 12:29 ` Paolo Bonzini [this message]
2014-06-18 14:18 ` Ming Lei
2014-06-18 15:02 ` Paolo Bonzini
2014-06-18 15:06 ` Paolo Bonzini
2014-06-18 15:11 ` Ming Lei
2014-07-25 23:10 ` Nicholas A. Bellinger
2014-07-26 3:52 ` Ming Lei
2014-06-18 14:23 ` Andreas Färber
2014-06-18 14:43 ` Ming Lei
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=53A1860E.6040304@redhat.com \
--to=pbonzini@redhat.com \
--cc=aliguori@amazon.com \
--cc=ming.lei@canonical.com \
--cc=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@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.