qemu-irix/hw/scsi
Paolo Bonzini 0eb2baeb44 scsi-generic: let guests recognize readonly=on on passthrough devices
Passed-through SCSI devices can be opened with the readonly=on option.
When this happens, Linux filters away write commands so that the guest
cannot overwrite the contents of the device.

However, the guest does not know that the device is read-only, and
accepts writes.  The writes only fail later when the page cache is
flushed.

This patch modifies scsi-generic to modify the MODE SENSE data and
set the read-only bit in the device-specific parameters, so that
the guest OS treats the disk as write protected.

Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-09-25 12:04:41 +02:00
..
Makefile.objs
esp-pci.c
esp.c
lsi53c895a.c
megasas.c megasas: Add write function to handle write access to PCI BAR 3 2015-07-27 23:05:49 +02:00
mfi.h
scsi-bus.c scsi: create restart bottom half in the right AioContext 2015-08-14 23:40:32 +02:00
scsi-disk.c scsi-disk: identify AIO callbacks more clearly 2015-08-14 23:40:32 +02:00
scsi-generic.c scsi-generic: let guests recognize readonly=on on passthrough devices 2015-09-25 12:04:41 +02:00
spapr_vscsi.c
srp.h
vhost-scsi.c vhost-scsi: fix wrong vhost-scsi firmware path 2015-09-09 15:34:55 +02:00
viosrp.h
virtio-scsi-dataplane.c virtio-scsi-dataplane: fix memory leak for VirtIOSCSIVring 2015-03-26 14:23:16 +01:00
virtio-scsi.c virtio: avoid leading underscores for helpers 2015-09-10 11:06:05 +03:00
vmw_pvscsi.c pci: Don't register a specialized 'config_write' if default behavior is intended 2015-06-19 12:17:49 +02:00
vmw_pvscsi.h