qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v1] virtio-scsi: fix object check failure


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v1] virtio-scsi: fix object check failure
Date: Wed, 18 Jun 2014 17:53:03 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Il 18/06/2014 17:48, Ming Lei ha scritto:
On Wed, Jun 18, 2014 at 11:43 PM, Michael S. Tsirkin <address@hidden> wrote:
On Wed, Jun 18, 2014 at 11:32:33PM +0800, Ming Lei wrote:
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().

Also 'events_dropped' need to be accessed in the path,

in which path?

I mean vq's notify path, virtio_scsi_handle_event().

A better way is this:

- create a VirtIOSCSICommonClass struct and use it (virtio_scsi_common_info)

- add three members virtio_scsi_handle_ctrl, virtio_scsi_handle_event, virtio_scsi_handle_cmd to VirtIOSCSICommonClass

- initialize them to the existing functions in virtio_scsi_class_init

- initialize them to dummy empty functions in vhost_scsi_class_init

Which I should have done in the first place when rebasing vhost-scsi, and I didn't only because I was lazy and thought this could not happen. :( Turns out it only didn't because at the time the kernel did not support events.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]