diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2012-02-24 09:33:03 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-02-24 09:33:03 -0600 |
commit | 9ef1300b1b7d36794af30dcaf04e11184eb22dd2 (patch) | |
tree | 6d0973eae1f96b3724a1aed50ee666e9c9e4766c /hw/virtio-scsi.h | |
parent | dcce6675de5a596e486e7dc341c3a7510d22aed6 (diff) | |
parent | eaccf49e9524dbdd43feb6a1cdafddf64252389a (diff) | |
download | hqemu-9ef1300b1b7d36794af30dcaf04e11184eb22dd2.zip hqemu-9ef1300b1b7d36794af30dcaf04e11184eb22dd2.tar.gz |
Merge remote-tracking branch 'bonzini/virtio-scsi' into staging
* bonzini/virtio-scsi:
scsi-block: always use scsi_generic_ops for cache != none
scsi: fix searching for an empty id
scsi: fix wrong return for target INQUIRY
virtio-scsi: add migration support
virtio-scsi: process control queue requests
virtio-scsi: add basic SCSI bus operation
virtio-scsi: Add basic request processing infrastructure
virtio-scsi: Add virtio-scsi stub device
scsi-disk: add migration support
scsi-generic: add migration support
scsi: add SCSIDevice vmstate definitions
scsi-disk: enable scatter/gather functionality
scsi: add scatter/gather functionality
scsi: pass residual amount to command_complete
ahci: use new DMA helpers
dma-helpers: add accounting wrappers
dma-helpers: add dma_buf_read and dma_buf_write
dma-helpers: make QEMUSGList target independent
Diffstat (limited to 'hw/virtio-scsi.h')
-rw-r--r-- | hw/virtio-scsi.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/hw/virtio-scsi.h b/hw/virtio-scsi.h new file mode 100644 index 0000000..4bc889d --- /dev/null +++ b/hw/virtio-scsi.h @@ -0,0 +1,36 @@ +/* + * Virtio SCSI HBA + * + * Copyright IBM, Corp. 2010 + * + * Authors: + * Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> + * + * This work is licensed under the terms of the GNU GPL, version 2. See + * the COPYING file in the top-level directory. + * + */ + +#ifndef _QEMU_VIRTIO_SCSI_H +#define _QEMU_VIRTIO_SCSI_H + +#include "virtio.h" +#include "net.h" +#include "pci.h" + +/* The ID for virtio_scsi */ +#define VIRTIO_ID_SCSI 8 + +struct VirtIOSCSIConf { + uint32_t num_queues; + uint32_t max_sectors; + uint32_t cmd_per_lun; +}; + +#define DEFINE_VIRTIO_SCSI_PROPERTIES(_state, _features_field, _conf_field) \ + DEFINE_VIRTIO_COMMON_FEATURES(_state, _features_field), \ + DEFINE_PROP_UINT32("num_queues", _state, _conf_field.num_queues, 1), \ + DEFINE_PROP_UINT32("max_sectors", _state, _conf_field.max_sectors, 0xFFFF), \ + DEFINE_PROP_UINT32("cmd_per_lun", _state, _conf_field.cmd_per_lun, 128) + +#endif /* _QEMU_VIRTIO_SCSI_H */ |