|
|
7711c0 |
From fd72da696d48452bf9ffc4816e049f4ed18f6117 Mon Sep 17 00:00:00 2001
|
|
|
7711c0 |
From: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
7711c0 |
Date: Wed, 7 Nov 2018 18:00:06 +0100
|
|
|
7711c0 |
Subject: [PATCH 32/34] scsi-generic: avoid invalid access to struct when
|
|
|
7711c0 |
emulating block limits
|
|
|
7711c0 |
MIME-Version: 1.0
|
|
|
7711c0 |
Content-Type: text/plain; charset=UTF-8
|
|
|
7711c0 |
Content-Transfer-Encoding: 8bit
|
|
|
7711c0 |
|
|
|
7711c0 |
RH-Author: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
7711c0 |
Message-id: <20181107180007.22954-9-pbonzini@redhat.com>
|
|
|
7711c0 |
Patchwork-id: 82946
|
|
|
7711c0 |
O-Subject: [RHEL7.6.z qemu-kvm-rhev PATCH 8/9] scsi-generic: avoid invalid access to struct when emulating block limits
|
|
|
7711c0 |
Bugzilla: 1566195
|
|
|
7711c0 |
RH-Acked-by: Max Reitz <mreitz@redhat.com>
|
|
|
7711c0 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
7711c0 |
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
7711c0 |
|
|
|
7711c0 |
Emulation of the block limits VPD page called back into scsi-disk.c,
|
|
|
7711c0 |
which however expected the request to be for a SCSIDiskState and
|
|
|
7711c0 |
accessed a scsi-generic device outside the bounds of its struct
|
|
|
7711c0 |
(namely to retrieve s->max_unmap_size and s->max_io_size).
|
|
|
7711c0 |
|
|
|
7711c0 |
To avoid this, move the emulation code to a separate function that
|
|
|
7711c0 |
takes a new SCSIBlockLimits struct and marshals it into the VPD
|
|
|
7711c0 |
response format.
|
|
|
7711c0 |
|
|
|
7711c0 |
Reported-by: Max Reitz <mreitz@redhat.com>
|
|
|
7711c0 |
Reviewed-by: Max Reitz <mreitz@redhat.com>
|
|
|
7711c0 |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
7711c0 |
(cherry picked from commit 3d4a8bf0eed68a781e06118e4d1df6e2f106a1f2)
|
|
|
7711c0 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
7711c0 |
---
|
|
|
7711c0 |
hw/scsi/Makefile.objs | 2 +-
|
|
|
7711c0 |
hw/scsi/emulation.c | 42 +++++++++++++++++++++
|
|
|
7711c0 |
hw/scsi/scsi-disk.c | 92 ++++++++++-----------------------------------
|
|
|
7711c0 |
hw/scsi/scsi-generic.c | 35 ++++++++++++-----
|
|
|
7711c0 |
include/hw/scsi/emulation.h | 16 ++++++++
|
|
|
7711c0 |
include/hw/scsi/scsi.h | 1 -
|
|
|
7711c0 |
6 files changed, 104 insertions(+), 84 deletions(-)
|
|
|
7711c0 |
create mode 100644 hw/scsi/emulation.c
|
|
|
7711c0 |
create mode 100644 include/hw/scsi/emulation.h
|
|
|
7711c0 |
|
|
|
7711c0 |
diff --git a/hw/scsi/Makefile.objs b/hw/scsi/Makefile.objs
|
|
|
7711c0 |
index b188f72..c4f249a 100644
|
|
|
7711c0 |
--- a/hw/scsi/Makefile.objs
|
|
|
7711c0 |
+++ b/hw/scsi/Makefile.objs
|
|
|
7711c0 |
@@ -1,4 +1,4 @@
|
|
|
7711c0 |
-common-obj-y += scsi-disk.o
|
|
|
7711c0 |
+common-obj-y += scsi-disk.o emulation.o
|
|
|
7711c0 |
common-obj-y += scsi-generic.o scsi-bus.o
|
|
|
7711c0 |
common-obj-$(CONFIG_LSI_SCSI_PCI) += lsi53c895a.o
|
|
|
7711c0 |
common-obj-$(CONFIG_MPTSAS_SCSI_PCI) += mptsas.o mptconfig.o mptendian.o
|
|
|
7711c0 |
diff --git a/hw/scsi/emulation.c b/hw/scsi/emulation.c
|
|
|
7711c0 |
new file mode 100644
|
|
|
7711c0 |
index 0000000..06d62f3
|
|
|
7711c0 |
--- /dev/null
|
|
|
7711c0 |
+++ b/hw/scsi/emulation.c
|
|
|
7711c0 |
@@ -0,0 +1,42 @@
|
|
|
7711c0 |
+#include "qemu/osdep.h"
|
|
|
7711c0 |
+#include "qemu/units.h"
|
|
|
7711c0 |
+#include "qemu/bswap.h"
|
|
|
7711c0 |
+#include "hw/scsi/emulation.h"
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+int scsi_emulate_block_limits(uint8_t *outbuf, const SCSIBlockLimits *bl)
|
|
|
7711c0 |
+{
|
|
|
7711c0 |
+ /* required VPD size with unmap support */
|
|
|
7711c0 |
+ memset(outbuf, 0, 0x3c);
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+ outbuf[0] = bl->wsnz; /* wsnz */
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+ if (bl->max_io_sectors) {
|
|
|
7711c0 |
+ /* optimal transfer length granularity. This field and the optimal
|
|
|
7711c0 |
+ * transfer length can't be greater than maximum transfer length.
|
|
|
7711c0 |
+ */
|
|
|
7711c0 |
+ stw_be_p(outbuf + 2, MIN(bl->min_io_size, bl->max_io_sectors));
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+ /* maximum transfer length */
|
|
|
7711c0 |
+ stl_be_p(outbuf + 4, bl->max_io_sectors);
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+ /* optimal transfer length */
|
|
|
7711c0 |
+ stl_be_p(outbuf + 8, MIN(bl->opt_io_size, bl->max_io_sectors));
|
|
|
7711c0 |
+ } else {
|
|
|
7711c0 |
+ stw_be_p(outbuf + 2, bl->min_io_size);
|
|
|
7711c0 |
+ stl_be_p(outbuf + 8, bl->opt_io_size);
|
|
|
7711c0 |
+ }
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+ /* max unmap LBA count */
|
|
|
7711c0 |
+ stl_be_p(outbuf + 16, bl->max_unmap_sectors);
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+ /* max unmap descriptors */
|
|
|
7711c0 |
+ stl_be_p(outbuf + 20, bl->max_unmap_descr);
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+ /* optimal unmap granularity; alignment is zero */
|
|
|
7711c0 |
+ stl_be_p(outbuf + 24, bl->unmap_sectors);
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+ /* max write same size, make it the same as maximum transfer length */
|
|
|
7711c0 |
+ stl_be_p(outbuf + 36, bl->max_io_sectors);
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+ return 0x3c;
|
|
|
7711c0 |
+}
|
|
|
7711c0 |
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
|
|
|
7711c0 |
index b8a27d6..a20ef91 100644
|
|
|
7711c0 |
--- a/hw/scsi/scsi-disk.c
|
|
|
7711c0 |
+++ b/hw/scsi/scsi-disk.c
|
|
|
7711c0 |
@@ -32,6 +32,7 @@ do { printf("scsi-disk: " fmt , ## __VA_ARGS__); } while (0)
|
|
|
7711c0 |
#include "qapi/error.h"
|
|
|
7711c0 |
#include "qemu/error-report.h"
|
|
|
7711c0 |
#include "hw/scsi/scsi.h"
|
|
|
7711c0 |
+#include "hw/scsi/emulation.h"
|
|
|
7711c0 |
#include "scsi/constants.h"
|
|
|
7711c0 |
#include "sysemu/sysemu.h"
|
|
|
7711c0 |
#include "sysemu/block-backend.h"
|
|
|
7711c0 |
@@ -585,7 +586,7 @@ static uint8_t *scsi_get_buf(SCSIRequest *req)
|
|
|
7711c0 |
return (uint8_t *)r->iov.iov_base;
|
|
|
7711c0 |
}
|
|
|
7711c0 |
|
|
|
7711c0 |
-int scsi_disk_emulate_vpd_page(SCSIRequest *req, uint8_t *outbuf)
|
|
|
7711c0 |
+static int scsi_disk_emulate_vpd_page(SCSIRequest *req, uint8_t *outbuf)
|
|
|
7711c0 |
{
|
|
|
7711c0 |
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, req->dev);
|
|
|
7711c0 |
uint8_t page_code = req->cmd.buf[2];
|
|
|
7711c0 |
@@ -687,89 +688,36 @@ int scsi_disk_emulate_vpd_page(SCSIRequest *req, uint8_t *outbuf)
|
|
|
7711c0 |
}
|
|
|
7711c0 |
case 0xb0: /* block limits */
|
|
|
7711c0 |
{
|
|
|
7711c0 |
- unsigned int unmap_sectors =
|
|
|
7711c0 |
- s->qdev.conf.discard_granularity / s->qdev.blocksize;
|
|
|
7711c0 |
- unsigned int min_io_size =
|
|
|
7711c0 |
- s->qdev.conf.min_io_size / s->qdev.blocksize;
|
|
|
7711c0 |
- unsigned int opt_io_size =
|
|
|
7711c0 |
- s->qdev.conf.opt_io_size / s->qdev.blocksize;
|
|
|
7711c0 |
- unsigned int max_unmap_sectors =
|
|
|
7711c0 |
- s->max_unmap_size / s->qdev.blocksize;
|
|
|
7711c0 |
- unsigned int max_io_sectors =
|
|
|
7711c0 |
- s->max_io_size / s->qdev.blocksize;
|
|
|
7711c0 |
+ SCSIBlockLimits bl = {};
|
|
|
7711c0 |
|
|
|
7711c0 |
if (s->qdev.type == TYPE_ROM) {
|
|
|
7711c0 |
DPRINTF("Inquiry (EVPD[%02X] not supported for CDROM\n",
|
|
|
7711c0 |
page_code);
|
|
|
7711c0 |
return -1;
|
|
|
7711c0 |
}
|
|
|
7711c0 |
+ bl.wsnz = 1;
|
|
|
7711c0 |
+ bl.unmap_sectors =
|
|
|
7711c0 |
+ s->qdev.conf.discard_granularity / s->qdev.blocksize;
|
|
|
7711c0 |
+ bl.min_io_size =
|
|
|
7711c0 |
+ s->qdev.conf.min_io_size / s->qdev.blocksize;
|
|
|
7711c0 |
+ bl.opt_io_size =
|
|
|
7711c0 |
+ s->qdev.conf.opt_io_size / s->qdev.blocksize;
|
|
|
7711c0 |
+ bl.max_unmap_sectors =
|
|
|
7711c0 |
+ s->max_unmap_size / s->qdev.blocksize;
|
|
|
7711c0 |
+ bl.max_io_sectors =
|
|
|
7711c0 |
+ s->max_io_size / s->qdev.blocksize;
|
|
|
7711c0 |
+ /* 255 descriptors fit in 4 KiB with an 8-byte header */
|
|
|
7711c0 |
+ bl.max_unmap_descr = 255;
|
|
|
7711c0 |
+
|
|
|
7711c0 |
if (s->qdev.type == TYPE_DISK) {
|
|
|
7711c0 |
int max_transfer_blk = blk_get_max_transfer(s->qdev.conf.blk);
|
|
|
7711c0 |
int max_io_sectors_blk =
|
|
|
7711c0 |
max_transfer_blk / s->qdev.blocksize;
|
|
|
7711c0 |
|
|
|
7711c0 |
- max_io_sectors =
|
|
|
7711c0 |
- MIN_NON_ZERO(max_io_sectors_blk, max_io_sectors);
|
|
|
7711c0 |
-
|
|
|
7711c0 |
- /* min_io_size and opt_io_size can't be greater than
|
|
|
7711c0 |
- * max_io_sectors */
|
|
|
7711c0 |
- if (min_io_size) {
|
|
|
7711c0 |
- min_io_size = MIN(min_io_size, max_io_sectors);
|
|
|
7711c0 |
- }
|
|
|
7711c0 |
- if (opt_io_size) {
|
|
|
7711c0 |
- opt_io_size = MIN(opt_io_size, max_io_sectors);
|
|
|
7711c0 |
- }
|
|
|
7711c0 |
+ bl.max_io_sectors =
|
|
|
7711c0 |
+ MIN_NON_ZERO(max_io_sectors_blk, bl.max_io_sectors);
|
|
|
7711c0 |
}
|
|
|
7711c0 |
- /* required VPD size with unmap support */
|
|
|
7711c0 |
- buflen = 0x40;
|
|
|
7711c0 |
- memset(outbuf + 4, 0, buflen - 4);
|
|
|
7711c0 |
-
|
|
|
7711c0 |
- outbuf[4] = 0x1; /* wsnz */
|
|
|
7711c0 |
-
|
|
|
7711c0 |
- /* optimal transfer length granularity */
|
|
|
7711c0 |
- outbuf[6] = (min_io_size >> 8) & 0xff;
|
|
|
7711c0 |
- outbuf[7] = min_io_size & 0xff;
|
|
|
7711c0 |
-
|
|
|
7711c0 |
- /* maximum transfer length */
|
|
|
7711c0 |
- outbuf[8] = (max_io_sectors >> 24) & 0xff;
|
|
|
7711c0 |
- outbuf[9] = (max_io_sectors >> 16) & 0xff;
|
|
|
7711c0 |
- outbuf[10] = (max_io_sectors >> 8) & 0xff;
|
|
|
7711c0 |
- outbuf[11] = max_io_sectors & 0xff;
|
|
|
7711c0 |
-
|
|
|
7711c0 |
- /* optimal transfer length */
|
|
|
7711c0 |
- outbuf[12] = (opt_io_size >> 24) & 0xff;
|
|
|
7711c0 |
- outbuf[13] = (opt_io_size >> 16) & 0xff;
|
|
|
7711c0 |
- outbuf[14] = (opt_io_size >> 8) & 0xff;
|
|
|
7711c0 |
- outbuf[15] = opt_io_size & 0xff;
|
|
|
7711c0 |
-
|
|
|
7711c0 |
- /* max unmap LBA count, default is 1GB */
|
|
|
7711c0 |
- outbuf[20] = (max_unmap_sectors >> 24) & 0xff;
|
|
|
7711c0 |
- outbuf[21] = (max_unmap_sectors >> 16) & 0xff;
|
|
|
7711c0 |
- outbuf[22] = (max_unmap_sectors >> 8) & 0xff;
|
|
|
7711c0 |
- outbuf[23] = max_unmap_sectors & 0xff;
|
|
|
7711c0 |
-
|
|
|
7711c0 |
- /* max unmap descriptors, 255 fit in 4 kb with an 8-byte header */
|
|
|
7711c0 |
- outbuf[24] = 0;
|
|
|
7711c0 |
- outbuf[25] = 0;
|
|
|
7711c0 |
- outbuf[26] = 0;
|
|
|
7711c0 |
- outbuf[27] = 255;
|
|
|
7711c0 |
-
|
|
|
7711c0 |
- /* optimal unmap granularity */
|
|
|
7711c0 |
- outbuf[28] = (unmap_sectors >> 24) & 0xff;
|
|
|
7711c0 |
- outbuf[29] = (unmap_sectors >> 16) & 0xff;
|
|
|
7711c0 |
- outbuf[30] = (unmap_sectors >> 8) & 0xff;
|
|
|
7711c0 |
- outbuf[31] = unmap_sectors & 0xff;
|
|
|
7711c0 |
-
|
|
|
7711c0 |
- /* max write same size */
|
|
|
7711c0 |
- outbuf[36] = 0;
|
|
|
7711c0 |
- outbuf[37] = 0;
|
|
|
7711c0 |
- outbuf[38] = 0;
|
|
|
7711c0 |
- outbuf[39] = 0;
|
|
|
7711c0 |
-
|
|
|
7711c0 |
- outbuf[40] = (max_io_sectors >> 24) & 0xff;
|
|
|
7711c0 |
- outbuf[41] = (max_io_sectors >> 16) & 0xff;
|
|
|
7711c0 |
- outbuf[42] = (max_io_sectors >> 8) & 0xff;
|
|
|
7711c0 |
- outbuf[43] = max_io_sectors & 0xff;
|
|
|
7711c0 |
+ buflen += scsi_emulate_block_limits(outbuf + buflen, &bl);
|
|
|
7711c0 |
break;
|
|
|
7711c0 |
}
|
|
|
7711c0 |
case 0xb1: /* block device characteristics */
|
|
|
7711c0 |
diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c
|
|
|
7711c0 |
index 6d6db69..f218cef 100644
|
|
|
7711c0 |
--- a/hw/scsi/scsi-generic.c
|
|
|
7711c0 |
+++ b/hw/scsi/scsi-generic.c
|
|
|
7711c0 |
@@ -16,6 +16,7 @@
|
|
|
7711c0 |
#include "qemu-common.h"
|
|
|
7711c0 |
#include "qemu/error-report.h"
|
|
|
7711c0 |
#include "hw/scsi/scsi.h"
|
|
|
7711c0 |
+#include "hw/scsi/emulation.h"
|
|
|
7711c0 |
#include "sysemu/block-backend.h"
|
|
|
7711c0 |
#include "sysemu/blockdev.h"
|
|
|
7711c0 |
|
|
|
7711c0 |
@@ -182,7 +183,7 @@ static void scsi_handle_inquiry_reply(SCSIGenericReq *r, SCSIDevice *s)
|
|
|
7711c0 |
/* Also take care of the opt xfer len. */
|
|
|
7711c0 |
stl_be_p(&r->buf[12],
|
|
|
7711c0 |
MIN_NON_ZERO(max_transfer, ldl_be_p(&r->buf[12])));
|
|
|
7711c0 |
- } else if (page == 0x00 && s->needs_vpd_bl_emulation) {
|
|
|
7711c0 |
+ } else if (s->needs_vpd_bl_emulation && page == 0x00) {
|
|
|
7711c0 |
/*
|
|
|
7711c0 |
* Now we're capable of supplying the VPD Block Limits
|
|
|
7711c0 |
* response if the hardware can't. Add it in the INQUIRY
|
|
|
7711c0 |
@@ -210,9 +211,24 @@ static void scsi_handle_inquiry_reply(SCSIGenericReq *r, SCSIDevice *s)
|
|
|
7711c0 |
}
|
|
|
7711c0 |
}
|
|
|
7711c0 |
|
|
|
7711c0 |
-static int scsi_emulate_block_limits(SCSIGenericReq *r)
|
|
|
7711c0 |
+static int scsi_generic_emulate_block_limits(SCSIGenericReq *r, SCSIDevice *s)
|
|
|
7711c0 |
{
|
|
|
7711c0 |
- r->buflen = scsi_disk_emulate_vpd_page(&r->req, r->buf);
|
|
|
7711c0 |
+ int len;
|
|
|
7711c0 |
+ uint8_t buf[64];
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+ SCSIBlockLimits bl = {
|
|
|
7711c0 |
+ .max_io_sectors = blk_get_max_transfer(s->conf.blk) / s->blocksize
|
|
|
7711c0 |
+ };
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+ memset(r->buf, 0, r->buflen);
|
|
|
7711c0 |
+ stb_p(buf, s->type);
|
|
|
7711c0 |
+ stb_p(buf + 1, 0xb0);
|
|
|
7711c0 |
+ len = scsi_emulate_block_limits(buf + 4, &bl);
|
|
|
7711c0 |
+ assert(len <= sizeof(buf) - 4);
|
|
|
7711c0 |
+ stw_be_p(buf + 2, len);
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+ memcpy(r->buf, buf, MIN(r->buflen, len + 4));
|
|
|
7711c0 |
+
|
|
|
7711c0 |
r->io_header.sb_len_wr = 0;
|
|
|
7711c0 |
|
|
|
7711c0 |
/*
|
|
|
7711c0 |
@@ -254,13 +270,12 @@ static void scsi_read_complete(void * opaque, int ret)
|
|
|
7711c0 |
* resulted in sense error but would need emulation.
|
|
|
7711c0 |
* In this case, emulate a valid VPD response.
|
|
|
7711c0 |
*/
|
|
|
7711c0 |
- if (s->needs_vpd_bl_emulation) {
|
|
|
7711c0 |
- int is_vpd_bl = r->req.cmd.buf[0] == INQUIRY &&
|
|
|
7711c0 |
- r->req.cmd.buf[1] & 0x01 &&
|
|
|
7711c0 |
- r->req.cmd.buf[2] == 0xb0;
|
|
|
7711c0 |
-
|
|
|
7711c0 |
- if (is_vpd_bl && sg_io_sense_from_errno(-ret, &r->io_header, &sense)) {
|
|
|
7711c0 |
- len = scsi_emulate_block_limits(r);
|
|
|
7711c0 |
+ if (s->needs_vpd_bl_emulation &&
|
|
|
7711c0 |
+ r->req.cmd.buf[0] == INQUIRY &&
|
|
|
7711c0 |
+ (r->req.cmd.buf[1] & 0x01) &&
|
|
|
7711c0 |
+ r->req.cmd.buf[2] == 0xb0) {
|
|
|
7711c0 |
+ if (sg_io_sense_from_errno(-ret, &r->io_header, &sense)) {
|
|
|
7711c0 |
+ len = scsi_generic_emulate_block_limits(r, s);
|
|
|
7711c0 |
/*
|
|
|
7711c0 |
* No need to let scsi_read_complete go on and handle an
|
|
|
7711c0 |
* INQUIRY VPD BL request we created manually.
|
|
|
7711c0 |
diff --git a/include/hw/scsi/emulation.h b/include/hw/scsi/emulation.h
|
|
|
7711c0 |
new file mode 100644
|
|
|
7711c0 |
index 0000000..09fba1f
|
|
|
7711c0 |
--- /dev/null
|
|
|
7711c0 |
+++ b/include/hw/scsi/emulation.h
|
|
|
7711c0 |
@@ -0,0 +1,16 @@
|
|
|
7711c0 |
+#ifndef HW_SCSI_EMULATION_H
|
|
|
7711c0 |
+#define HW_SCSI_EMULATION_H 1
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+typedef struct SCSIBlockLimits {
|
|
|
7711c0 |
+ bool wsnz;
|
|
|
7711c0 |
+ uint16_t min_io_size;
|
|
|
7711c0 |
+ uint32_t max_unmap_descr;
|
|
|
7711c0 |
+ uint32_t opt_io_size;
|
|
|
7711c0 |
+ uint32_t max_unmap_sectors;
|
|
|
7711c0 |
+ uint32_t unmap_sectors;
|
|
|
7711c0 |
+ uint32_t max_io_sectors;
|
|
|
7711c0 |
+} SCSIBlockLimits;
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+int scsi_emulate_block_limits(uint8_t *outbuf, const SCSIBlockLimits *bl);
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+#endif
|
|
|
7711c0 |
diff --git a/include/hw/scsi/scsi.h b/include/hw/scsi/scsi.h
|
|
|
7711c0 |
index ee3a411..acef25f 100644
|
|
|
7711c0 |
--- a/include/hw/scsi/scsi.h
|
|
|
7711c0 |
+++ b/include/hw/scsi/scsi.h
|
|
|
7711c0 |
@@ -189,7 +189,6 @@ void scsi_device_report_change(SCSIDevice *dev, SCSISense sense);
|
|
|
7711c0 |
void scsi_device_unit_attention_reported(SCSIDevice *dev);
|
|
|
7711c0 |
void scsi_generic_read_device_inquiry(SCSIDevice *dev);
|
|
|
7711c0 |
int scsi_device_get_sense(SCSIDevice *dev, uint8_t *buf, int len, bool fixed);
|
|
|
7711c0 |
-int scsi_disk_emulate_vpd_page(SCSIRequest *req, uint8_t *outbuf);
|
|
|
7711c0 |
int scsi_SG_IO_FROM_DEV(BlockBackend *blk, uint8_t *cmd, uint8_t cmd_size,
|
|
|
7711c0 |
uint8_t *buf, uint8_t buf_size);
|
|
|
7711c0 |
SCSIDevice *scsi_device_find(SCSIBus *bus, int channel, int target, int lun);
|
|
|
7711c0 |
--
|
|
|
7711c0 |
1.8.3.1
|
|
|
7711c0 |
|