2017-03-02 21:25:51 +03: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 23:43:22 +03:00
|
|
|
#include "qom/object.h"
|
2017-03-02 21:25:51 +03:00
|
|
|
|
|
|
|
#define TYPE_VHOST_SCSI_COMMON "vhost-scsi-common"
|
2020-09-16 21:25:19 +03:00
|
|
|
OBJECT_DECLARE_SIMPLE_TYPE(VHostSCSICommon, VHOST_SCSI_COMMON)
|
2017-03-02 21:25:51 +03:00
|
|
|
|
2020-09-03 23:43:22 +03:00
|
|
|
struct VHostSCSICommon {
|
2017-03-02 21:25:51 +03: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 22:52:33 +03:00
|
|
|
uint64_t host_features;
|
2019-04-16 15:59:12 +03:00
|
|
|
bool migratable;
|
2020-09-09 15:20:21 +03:00
|
|
|
|
|
|
|
struct vhost_inflight *inflight;
|
2020-09-03 23:43:22 +03:00
|
|
|
};
|
2017-03-02 21:25:51 +03:00
|
|
|
|
2023-10-09 07:46:59 +03:00
|
|
|
int vhost_scsi_common_start(VHostSCSICommon *vsc, Error **errp);
|
2017-03-02 21:25:51 +03:00
|
|
|
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 */
|