2017-03-02 19:25:51 +01:00
|
|
|
/*
|
|
|
|
* vhost_scsi host device
|
|
|
|
*
|
|
|
|
* Copyright (c) 2016 Nutanix Inc. All rights reserved.
|
|
|
|
*
|
|
|
|
* Author:
|
|
|
|
* Felipe Franciosi <felipe@nutanix.com>
|
|
|
|
*
|
|
|
|
* This work is licensed under the terms of the GNU LGPL, version 2 or later.
|
|
|
|
* See the COPYING.LIB file in the top-level directory.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef VHOST_SCSI_COMMON_H
|
|
|
|
#define VHOST_SCSI_COMMON_H
|
|
|
|
|
|
|
|
#include "hw/virtio/virtio-scsi.h"
|
|
|
|
#include "hw/virtio/vhost.h"
|
|
|
|
#include "hw/fw-path-provider.h"
|
2020-09-03 22:43:22 +02:00
|
|
|
#include "qom/object.h"
|
2017-03-02 19:25:51 +01:00
|
|
|
|
|
|
|
#define TYPE_VHOST_SCSI_COMMON "vhost-scsi-common"
|
2020-09-16 20:25:19 +02:00
|
|
|
OBJECT_DECLARE_SIMPLE_TYPE(VHostSCSICommon, VHOST_SCSI_COMMON)
|
2017-03-02 19:25:51 +01:00
|
|
|
|
2020-09-03 22:43:22 +02:00
|
|
|
struct VHostSCSICommon {
|
2017-03-02 19:25:51 +01:00
|
|
|
VirtIOSCSICommon parent_obj;
|
|
|
|
|
|
|
|
Error *migration_blocker;
|
|
|
|
|
|
|
|
struct vhost_dev dev;
|
|
|
|
const int *feature_bits;
|
|
|
|
int32_t bootindex;
|
|
|
|
int channel;
|
|
|
|
int target;
|
|
|
|
int lun;
|
2018-08-08 21:52:33 +02:00
|
|
|
uint64_t host_features;
|
2019-04-16 14:59:12 +02:00
|
|
|
bool migratable;
|
2020-09-09 14:20:21 +02:00
|
|
|
|
|
|
|
struct vhost_inflight *inflight;
|
2020-09-03 22:43:22 +02:00
|
|
|
};
|
2017-03-02 19:25:51 +01:00
|
|
|
|
|
|
|
int vhost_scsi_common_start(VHostSCSICommon *vsc);
|
|
|
|
void vhost_scsi_common_stop(VHostSCSICommon *vsc);
|
|
|
|
char *vhost_scsi_common_get_fw_dev_path(FWPathProvider *p, BusState *bus,
|
|
|
|
DeviceState *dev);
|
|
|
|
void vhost_scsi_common_set_config(VirtIODevice *vdev, const uint8_t *config);
|
|
|
|
uint64_t vhost_scsi_common_get_features(VirtIODevice *vdev, uint64_t features,
|
|
|
|
Error **errp);
|
|
|
|
|
|
|
|
#endif /* VHOST_SCSI_COMMON_H */
|