summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* target-cris/opcode-cris.h: rename REG_PC/SP to CRIS_REG_PC/SPPeter Maydell2011-08-201-6/+6
| | | | | | | | | | | | The REG_PC constant used in opcode-cris.h can clash with a similar define in system include files. In particular the Ubuntu Lucid SPARC signal.h will define REG_PC, and since qemu-common.h now includes signal.h this was causing compile failures. Rename the constants to avoid this issue. (NB that REG_SP is not actually used within QEMU.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@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>
* qapi: fix build issue due to missing newline in generated headerMichael Roth2011-08-121-1/+1
| | | | | | | | | Fixes a build issue on RHEL5, and potentially other distros, where gcc will generate an error due to us not writing a trailing "\n" when generating *qmp-commands.h Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* memory: correct documentation typosAvi Kivity2011-08-121-4/+4
| | | | | | | Noted by Drew Jones. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* memory: add API for creating ROM/device regionsAvi Kivity2011-08-122-2/+78
| | | | | | | | ROM/device regions act as mapped RAM for reads, can I/O memory for writes. This allow emulation of flash devices. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* memory: reclaim resources when a memory region is destroyed for goodAvi Kivity2011-08-122-0/+25
| | | | | Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* build: Move QEMU_INCLUDES before QEMU_CFLAGSJiri Denemark2011-08-121-4/+4
| | | | | | | | | | | This patch fixes build when any of the include paths from QEMU_CFLAGS contains a header file with similar name to a header file in qemu sources. I hit it with error.h included by qapi/qapi-types-core.h. GCC decided to use /usr/include/alsa/error.h instead of qemu's error.h. Tested-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* configure: Disable guest_agent for mingw32Stefan Weil2011-08-121-0/+1
| | | | | | | | | | | | | | | | | guest_agent is not supported for mingw32, so the default value should be 'no', not 'yes'. This removes the dependencies to glib-2.0 and python which makes native and cross builds for w32 much easier (no need to get and install these extra packages). It also avoids the problems caused by different bitfield alignment which is required by glib-2.0. It is still possible to set guest_agent=yes via configure option. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi: add special traces for common commandsPaolo Bonzini2011-08-122-0/+21
| | | | | | | 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-125-112/+111
| | | | | | | | | | | | | 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-124-4/+9
|\
| * fix QLIST usage for RAM listPaolo Bonzini2011-08-122-2/+2
| | | | | | | | | | | | | | Spotted while reviewing the migration thread patches. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * 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-1211-854/+1024
|\ \
| * | 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-083-0/+54
| | | | | | | | | | | | | | | | | | 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-083-1/+34
| | | | | | | | | | | | 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-083-1/+72
| | | | | | | | | | | | | | | | | | This include readdir, telldir, seekdir, rewinddir. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
OpenPOWER on IntegriCloud