spapr: Rename 'dprintf' to 'DPRINTF'
'dprintf' is the name of a POSIX standard function so we should not bestealing it for our debug macro. Rename to 'DPRINTF' (in line witha number of other source files.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
spapr-vscsi: fix SOLNT bit in SRP_RSP
The driver calculates SOLNT bit from UCSOLNT and SCSOLNT bits fromthe request. The iu pointer has a type of srp_iu* which points to a union,so cmd and rsp overlap. As the vscsi_send_rsp function callsmemset(iu, 0, sizeof(rsp)), it clears first 36 bytes of both cmd and rsp...
devices: Associate devices to their logical category
The category will be used to sort the devices displayed inthe command line help.
Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>Message-id: 1375107465-25767-4-git-send-email-marcel.a@redhat.com...
pseries: rework PAPR virtual SCSI
The patch reimplements handling of indirect requests in order tosimplify upcoming live migration support.- all pointers (except SCSIRequest*) were replaces with integerindexes and offsets;- DMA'ed srp_direct_buf kept untouched (ie. BE format);...
pseries: savevm support for PAPR virtual SCSI
This patch adds the necessary support for saving the state of the PAPR VIOvirtual SCSI device. This also saves and restores active SCSI requests.
[aik: implemented vscsi_req save/restore]Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>...
scsi/esp: Use QOM realize for scsi esp
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>[AF: Drop sysbus_esp_init()]Signed-off-by: Andreas Färber <afaerber@suse.de>
megasas: Legacy command line handling fix
Only apply legacy command line handling when the device has not beenhot-plugged. Propagate failure of legacy command line handling.
Cc: qemu-stable@nongnu.orgAcked-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
scsi: Improve error propagation for scsi_bus_legacy_handle_cmdline()
Let scsi_bus_legacy_add_drive() and scsi_bus_legacy_handle_cmdline()return an Error**. Prepare qdev initfns for QOM realize error model.
Signed-off-by: Andreas Färber <afaerber@suse.de>
scsi/esp: QOM'ify some more
Introduce type constant and avoid DO_UPCAST().
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>[AF: Renamed parent field]Signed-off-by: Andreas Färber <afaerber@suse.de>
scsi/lsi53c895a: QOM Upcast Sweep
Define and use standard QOM cast macro. Remove usages of DO_UPCAST()and direct -> style upcasting.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
scsi/lsi53c895a: QOM parent field cleanup
Replace direct uses of LSIState::dev with QOM casts and rename it toparent_obj.
Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
scsi/megasas: QOM Upcast Sweep
scsi/megasas: QOM parent field cleanup
Replace direct uses of MegasasState::dev with QOM casts and rename it toparent_obj.
scsi/esp-pci: QOM Upcast Sweep
scsi/esp-pci: QOM parent field cleanup
Replace direct uses of PCIESPState::dev with QOM casts and rename it toparent_obj.
hw: Avoid use of QOM type name macros in VMStateDescriptions
The name field in a VMStateDescription is part of the migration stateversioning, so changing it will break migration. It's therefore abad idea to use a QOM typename macro to initialize it, because in...
hw/s*: pass owner to memory_region_init* functions
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
memory: add owner argument to initialization functions
dma: keep a device alive while it has SGLists
Reviewed-by: Anthony Liguori <aliguori@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scsi: keep device alive while it has requests
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
dma: eliminate DMAContext
The DMAContext is a simple pointer to an AddressSpace that is now alwaysalready available. Make everyone hold the address space directly,and clean up the DMA API to use the AddressSpace directly.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>...
scsi: reset cdrom tray statuses on scsi_disk_reset
Tray statuses should be also reset. Some guests may lock the tray andright after resetting the guest it should be unlocked and closed. Thisis done on power-on, reset and resume from suspend/hibernate on bare-metal....
scsi-generic: fix sign extension of READ CAPACITY data
Issuing the READ CAPACITY command in the guest will cause QEMUto update its knowledge of the maximum accessible LBA in the disk.The recorded maximum LBA will be wrong if the disk is bigger than...
scsi-generic: check the return value of bdrv_aio_ioctl in execute_command
This fixes the bug introduced by this commit ad54ae80c73f.The bdrv_aio_ioctl() still could return null and we should return an errorin that case.
Cc: qemu-stable@nongnu.orgSigned-off-by: Pavel Hrdina <phrdina@redhat.com>...
scsi-disk: scsi-block device for scsi pass-through should not be removable
This patch adds a new SCSI_DISK_F_NO_REMOVABLE_DEVOPS feature. By thisfeature we can set that the scsi-block (scsi pass-through) device will stillbe removable from the guest side, but from monitor it cannot be removed....
vhost-scsi: fix k->set_guest_notifiers() NULL dereference
Coverity picked up a copy-paste bug. In vhost_scsi_start() we check for!k->set_guest_notifiers and error out. The check probably got copiedbut instead of erroring we actually use the function pointer!...
hw/scsi: Don't increment a boolean value
This fixes a warning from cppcheck.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
exec: eliminate qemu_put_ram_ptr
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scsi: add bus_name parameter to scsi_bus_new.
This adds the possibility to create a scsi-bus with a specified name.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Acked-by: Paolo Bonzini <pbonzini@redhat.com>Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>...
virtio-scsi: fix the command line compatibility.
The bus name is wrong since the refactoring.
This keeps the behaviour of the command line.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>Message-id: 1367330931-12994-6-git-send-email-fred.konrad@greensocs.com...
pseries: Convert VIO code to QOM style type safe(ish) casts
Curerntly the pseries VIO device code contains quite a few explicituses of DO_UPCAST and plain C casts. This is (obviously) type unsafe,and not the conventional way of doing things in the QOM model. This...
virtio: cleanup: init and exit function.
This clean the init and the exit functions and rename virtio_common_cleanupto virtio_cleanup.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Message-id: 1366791683-5350-7-git-send-email-fred.konrad@greensocs.com...
virtio: remove the function pointer.
This remove the function pointer in VirtIODevice, and use onlyVirtioDeviceClass function pointer.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Message-id: 1366791683-5350-5-git-send-email-fred.konrad@greensocs.com...
virtio: remove virtiobindings.
This remove virtio-bindings, and use class instead.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Message-id: 1366791683-5350-6-git-send-email-fred.konrad@greensocs.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
vhost-scsi: new device supporting the tcm_vhost Linux kernel module
The WWPN specified in configfs is passed to "-device vhost-scsi-pci".The tgpt field of the SET_ENDPOINT ioctl is obsolete now, so it is notavailable from the QEMU command-line. Instead, I hardcode it to zero....
virtio-scsi: create VirtIOSCSICommon
This patch refactors existing virtio-scsi code into VirtIOSCSICommonin order to allow virtio_scsi_init_common() to be used by both internalvirtio_scsi_init() and external vhost-scsi-pci code.
Cc: Michael S. Tsirkin <mst@redhat.com>...
scsi: VMWare PVSCSI paravirtual device implementation
Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>Signed-off-by: Yan Vugenfirer <yan@daynix.com>[ Rename files to vmw_pvscsi, fix setting of hostStatus in pvscsi_request_cancelled - Paolo ]Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scsi: avoid assertion failure on VERIFY command
A verify command is not an actual read (we do not implementcompare mode) and thus does not have an AIOCB attached. Donot crash in scsi_dma_complete.
hw: move private headers to hw/ subdirectories.
Many headers are used only in a single directory. These can bekept in hw/.
hw: move SCSI controllers to hw/scsi/, configure via default-configs/
hw: move target-independent files to subdirectories
This patch tackles all files that are compiled once, movingthem to subdirectories of hw/.
hw: move virtio devices to hw/ subdirectories
hw: make subdirectories for devices
Prepare the new directory structure.