vhost-scsi: create a vhost-scsi-common abstraction

In order to introduce a new vhost-user-scsi host device type, it makes
sense to abstract part of vhost-scsi into a common parent class. This
commit does exactly that.

Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
Message-Id: <1488479153-21203-3-git-send-email-felipe@nutanix.com>
This commit is contained in:
Felipe Franciosi 2017-03-02 10:25:51 -08:00 committed by Paolo Bonzini
parent eae0f54334
commit 95615ce5a1
6 changed files with 252 additions and 148 deletions

View file

@ -18,6 +18,7 @@
#include "hw/qdev.h"
#include "hw/virtio/virtio-scsi.h"
#include "hw/virtio/vhost.h"
#include "hw/virtio/vhost-scsi-common.h"
enum vhost_scsi_vq_list {
VHOST_SCSI_VQ_CONTROL = 0,
@ -30,15 +31,7 @@ enum vhost_scsi_vq_list {
OBJECT_CHECK(VHostSCSI, (obj), TYPE_VHOST_SCSI)
typedef struct VHostSCSI {
VirtIOSCSICommon parent_obj;
Error *migration_blocker;
struct vhost_dev dev;
int32_t bootindex;
int channel;
int target;
int lun;
VHostSCSICommon parent_obj;
} VHostSCSI;
#endif