summaryrefslogtreecommitdiffstats
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* scsi-disk: fix DPRINTFBlue Swirl2011-08-201-2/+2
| | | | | | | The variable 'status' does not exist anymore, adjust DPRINTF accordingly. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* scsi: do not overwrite memory on REQUEST SENSE commands with a large bufferPaolo Bonzini2011-08-161-1/+2
| | | | | | | | | | Other scsi_target_reqops commands were careful about not using r->cmd.xfer directly, and instead always cap it to a fixed length. This was not done for REQUEST SENSE, and this patch fixes it. Reported-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* hw/scsi-bus.c: Fix use of uninitialised variablePeter Maydell2011-08-141-1/+1
| | | | | | | | | Don't use req before it has been initialised in scsi_req_new(). This fixes a compile failure due to gcc complaining about this. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* scsi: add special traces for common commandsPaolo Bonzini2011-08-121-0/+17
| | | | | | | Can be useful when debugging the device scan phase. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi: report unit attention on resetPaolo Bonzini2011-08-124-6/+7
| | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi: add support for unit attention conditionsPaolo Bonzini2011-08-123-2/+94
| | | | | | | | | Unit attention conditions override any sense data the device already has. Their signaling and clearing is handled entirely by the SCSIBus code, and they are completely transparent to the SCSIDevices. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi: add a bunch more common sense codesPaolo Bonzini2011-08-122-0/+42
| | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi: move handling of REQUEST SENSE to common codePaolo Bonzini2011-08-123-25/+12
| | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi: move handling of REPORT LUNS and invalid LUNs to common codePaolo Bonzini2011-08-124-29/+177
| | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi: move request parsing to common codePaolo Bonzini2011-08-124-30/+38
| | | | | | | | Also introduce the first occurrence of "independent" SCSIReqOps, to handle invalid commands in common code. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi: push lun field to SCSIDevicePaolo Bonzini2011-08-123-4/+3
| | | | | | | | | This will let SCSIBus detect requests sent to an invalid LUN, and handle them itself. However, there will be still support for only one LUN per target Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi: introduce SCSICommandPaolo Bonzini2011-08-122-54/+58
| | | | | | | | | This struct is currently unnamed. Give it a name and use it explicitly to decouple (some parts of) CDB parsing from SCSIRequest. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi: pass cdb already to scsi_req_newPaolo Bonzini2011-08-126-15/+18
| | | | | | | | | | | | Right now the CDB is not passed to the SCSIBus until scsi_req_enqueue. Passing it to scsi_req_new will let scsi_req_new dispatch common requests through different reqops. Moving the memcpy to scsi_req_new is a hack that will go away as soon as scsi_req_new will also take care of the parsing. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi: move request-related callbacks from SCSIDeviceInfo to SCSIReqOpsPaolo Bonzini2011-08-124-40/+29
| | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi: introduce SCSIReqOpsPaolo Bonzini2011-08-124-25/+40
| | | | | | | | | | This will let allow requests to be dispatched through different callbacks, either common or per-device. This patch adjusts the API, the next one will move members to SCSIReqOps. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi: move sense handling to generic codePaolo Bonzini2011-08-124-112/+110
| | | | | | | | | | | | | With this patch, sense data is stored in the generic data structures for SCSI devices and requests. The SCSI layer takes care of storing sense data in the SCSIDevice for the subsequent REQUEST SENSE command. At the same time, get_sense is removed and scsi_req_get_sense can use an entirely generic implementation. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi: pass status when completingPaolo Bonzini2011-08-124-31/+25
| | | | | | | | | | | A small improvement in the SCSI request API. Pass the status at the time the request is completed, so that we can assert that no request is completed twice. This would have detected the problem fixed in the previous patch. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vscsi: always use get_sensePaolo Bonzini2011-08-121-70/+21
| | | | | | | | | | | | vscsi supports autosensing by providing sense data directly in the response. When get_sense was added, the older state machine approach that sent REQUEST SENSE commands separately was left in place. Remove it, all existing SCSIDevices do support autosensing and the next patches will make the support come for free from the SCSIBus. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi-disk: no need to call scsi_req_data on a short readPaolo Bonzini2011-08-121-3/+0
| | | | | | | | | | | | | In fact, if the HBA's transfer_data callback goes on with scsi_req_continue the request will be completed successfully instead of showing a failure. It can even cause a segmentation fault. An easy way to trigger it is "eject -f cd" during installation (during media test if the installer does something like that). Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* pc: make vgabios exit port more usefulAnthony Liguori2011-08-121-2/+2
| | | | | | | | | | | | | | We've always listened on port 501 for vgabios panic messages. In the entire time I've worked on QEMU, I've never actually seen a vgabios panic message :-) If we change the semantics of this port a little bit, it makes it possible to use it for more interesting use-cases. I chose this approach instead of adding a new I/O port because it avoids having a guest visible change. This change allows single-byte access to port 501 and also uses the value written to construct an exit code. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2011-08-122-2/+7
|\
| * hw/qdev: Don't crash if qdev_create(NULL, ...) failsPeter Maydell2011-08-111-1/+6
| | | | | | | | | | | | | | | | | | | | If an attempt to create a qdev device on the default sysbus (by passing NULL as the bus to qdev_create) fails, print a useful error message rather than crashing trying to dereference a NULL pointer. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * scsi-bus: use DO_UPCASTZhi Yong Wu2011-08-111-1/+1
| | | | | | | | | | | | Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | Merge remote-tracking branch 'aneesh/for-upstream-1' into stagingAnthony Liguori2011-08-129-844/+1013
|\ \
| * | hw/9pfs: Update vfs_rename to use coroutinesAneesh Kumar K.V2011-08-082-89/+52
| | | | | | | | | | | | | | | | | | | | | | | | I guess TRENAME 9p operation needs an update. The 9p op should more similar renameat. Otherwise anything other than path cannot track the fid. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Add yeild support to rename coroutineAneesh Kumar K.V2011-08-082-0/+15
| | | | | | | | | | | | Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Update v9fs_remove to use coroutinesVenkateswararao Jujjuri2011-08-082-43/+13
| | | | | | | | | | | | | | | Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Add yield support for removeVenkateswararao Jujjuri2011-08-082-0/+15
| | | | | | | | | | | | | | | Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Update mkdir to use coroutinesVenkateswararao Jujjuri2011-08-081-71/+25
| | | | | | | | | | | | | | | Signed-off-by: Venkateswararao Jujjuri "<jvrao@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Add yield support for mkdir coroutineVenkateswararao Jujjuri2011-08-082-0/+20
| | | | | | | | | | | | | | | Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Update v9fs_mknod to use coroutinesAneesh Kumar K.V2011-08-081-58/+30
| | | | | | | | | | | | Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Add yield support to mknod coroutineAneesh Kumar K.V2011-08-082-0/+23
| | | | | | | | | | | | Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Update v9fs_xattrcreate to use coroutinesAneesh Kumar K.V2011-08-082-38/+26
| | | | | | | | | | | | Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Update v9fs_xattrwalk to coroutinesAneesh Kumar K.V2011-08-081-135/+63
| | | | | | | | | | | | Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Add yield support to xattr related coroutineAneesh Kumar K.V2011-08-082-0/+53
| | | | | | | | | | | | | | | | | | This include llistxattr and lgetxattr. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Update v9fs_setattr to use coroutinesAneesh Kumar K.V2011-08-082-117/+54
| | | | | | | | | | | | Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Add yield support to setattr related coroutinesAneesh Kumar K.V2011-08-082-0/+68
| | | | | | | | | | | | | | | | | | This include chmod, utimensat, chown and truncate. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Update v9fs_getattr to use coroutinesAneesh Kumar K.V2011-08-082-46/+19
| | | | | | | | | | | | Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Add yield support to lstat coroutineAneesh Kumar K.V2011-08-082-0/+33
| | | | | | | | | | | | Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Update v9fs_statfs to use coroutinesAneesh Kumar K.V2011-08-082-70/+44
| | | | | | | | | | | | Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Add yield support to statfs coroutineAneesh Kumar K.V2011-08-082-0/+15
| | | | | | | | | | | | Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Update v9fs_readdir to use coroutinesAneesh Kumar K.V2011-08-081-101/+72
| | | | | | | | | | | | Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Add yield support for readdir related coroutinesAneesh Kumar K.V2011-08-082-0/+71
| | | | | | | | | | | | | | | | | | This include readdir, telldir, seekdir, rewinddir. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Update v9fs_readlink to use coroutineVenkateswararao Jujjuri2011-08-082-60/+17
| | | | | | | | | | | | | | | Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Add yeild support for readlinkVenkateswararao Jujjuri (JV)2011-08-082-0/+45
| | | | | | | | | | | | | | | Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | [virtio-9p] Change all pdu handlers to coroutines.Venkateswararao Jujjuri (JV)2011-08-083-43/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the top level handlers to coroutines and sets the base. It will be followed up with series of patches to convert all filesystem calls to threaded coroutines pushing all blocking clals in VirtFS out of vcpu threads. Signed-off-by: Venkateswararao Jujjuri "<jvrao@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | [virtio-9p] Add infrastructure to support glib threads and coroutines.Venkateswararao Jujjuri (JV)2011-08-083-2/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is originally made by Arun Bharadwaj for glib support. Later Harsh Prateek Bora added coroutines support. This version implemented with suggestions from Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>. Signed-off-by: Arun R Bharadwaj <arun@linux.vnet.ibm.com> Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com> Signed-off-by: Venkateswararao Jujjuri "<jvrao@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* | | Merge remote-tracking branch 'spice/spice.v41' into stagingAnthony Liguori2011-08-121-7/+6
|\ \ \
| * | | qxl: unbreak after memory API conversionAlon Levy2011-08-101-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Break is only noticable with newer spice-server library (0.8.2 release or 0.9.0 and newer on master branch). ioport_write's val was changed from uint32_t to uint64_t, this broke two printfs. Use PRId64 instead of %d. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | qxl: allowing the command rings to be not empty when spice worker is stopped ↵Yonit Halperin2011-08-101-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RHBZ #728984 same as 8927cfbba232e28304734f7afd463c1b84134031, but for qxl_check_state, that was triggered by qxl_pre_load (which calls qxl_hard_reset, which calls qxl_soft_reset), and caused the migration target to crash. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
OpenPOWER on IntegriCloud