aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2011-08-20Make glib mandatory and fixup utils appropriatelyAnthony Liguori4-4/+7
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-21Reorder default ram_size initializationJan Kiszka1-5/+5
code_gen_alloc depends on it, and that is now called earlier via configure_accelerator. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-08-20scsi-disk: fix DPRINTFBlue Swirl1-2/+2
The variable 'status' does not exist anymore, adjust DPRINTF accordingly. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-08-20target-cris/opcode-cris.h: rename REG_PC/SP to CRIS_REG_PC/SPPeter Maydell1-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>
2011-08-16scsi: do not overwrite memory on REQUEST SENSE commands with a large bufferPaolo Bonzini1-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>
2011-08-14hw/scsi-bus.c: Fix use of uninitialised variablePeter Maydell1-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>
2011-08-12qapi: fix build issue due to missing newline in generated headerMichael Roth1-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>
2011-08-12memory: correct documentation typosAvi Kivity1-4/+4
Noted by Drew Jones. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-12memory: add API for creating ROM/device regionsAvi Kivity2-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>
2011-08-12memory: reclaim resources when a memory region is destroyed for goodAvi Kivity2-0/+25
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-12build: Move QEMU_INCLUDES before QEMU_CFLAGSJiri Denemark1-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>
2011-08-12configure: Disable guest_agent for mingw32Stefan Weil1-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>
2011-08-12scsi: add special traces for common commandsPaolo Bonzini2-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>
2011-08-12scsi: report unit attention on resetPaolo Bonzini4-6/+7
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-12scsi: add support for unit attention conditionsPaolo Bonzini3-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>
2011-08-12scsi: add a bunch more common sense codesPaolo Bonzini2-0/+42
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-12scsi: move handling of REQUEST SENSE to common codePaolo Bonzini3-25/+12
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-12scsi: move handling of REPORT LUNS and invalid LUNs to common codePaolo Bonzini4-29/+177
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-12scsi: move request parsing to common codePaolo Bonzini4-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>
2011-08-12scsi: push lun field to SCSIDevicePaolo Bonzini3-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>
2011-08-12scsi: introduce SCSICommandPaolo Bonzini2-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>
2011-08-12scsi: pass cdb already to scsi_req_newPaolo Bonzini6-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>
2011-08-12scsi: move request-related callbacks from SCSIDeviceInfo to SCSIReqOpsPaolo Bonzini4-40/+29
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-12scsi: introduce SCSIReqOpsPaolo Bonzini4-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>
2011-08-12scsi: move sense handling to generic codePaolo Bonzini5-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>
2011-08-12scsi: pass status when completingPaolo Bonzini4-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>
2011-08-12vscsi: always use get_sensePaolo Bonzini1-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>
2011-08-12scsi-disk: no need to call scsi_req_data on a short readPaolo Bonzini1-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>
2011-08-12pc: make vgabios exit port more usefulAnthony Liguori1-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>
2011-08-12Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori4-4/+9
2011-08-12Merge remote-tracking branch 'aneesh/for-upstream-1' into stagingAnthony Liguori11-854/+1024
2011-08-12Merge remote-tracking branch 'spice/spice.v41' into stagingAnthony Liguori2-7/+14
2011-08-12Merge remote-tracking branch 'kraxel/usb.23' into stagingAnthony Liguori6-146/+134
2011-08-12Merge remote-tracking branch 'kraxel/seabios' into stagingAnthony Liguori2-0/+0
2011-08-12fix QLIST usage for RAM listPaolo Bonzini2-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>
2011-08-11hw/qdev: Don't crash if qdev_create(NULL, ...) failsPeter Maydell1-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>
2011-08-11scsi-bus: use DO_UPCASTZhi Yong Wu1-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>
2011-08-11etrax-ser: printf -> qemu_log.Edgar E. Iglesias1-4/+6
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-08-11etrax: QDevify the Ethernet MAC.Edgar E. Iglesias3-31/+67
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-08-10ui/spice-core: report compiled-version in info spice/query-spiceAlon Levy1-0/+8
Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-10seabios: update to masterGerd Hoffmann2-0/+0
commit 8e301472e324b6d6496d8b4ffc66863e99d7a505 user visible changes in seabios: * ahci is enabled by default (and thus in this build). * bootorder support for ahci. * two-pass pci allocator (orders bars by size for better packing). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-10qxl: unbreak after memory API conversionAlon Levy1-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>
2011-08-10qxl: allowing the command rings to be not empty when spice worker is stopped ↵Yonit Halperin1-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>
2011-08-10usb-hid: remove usb_hid_datain_cbGerd Hoffmann2-17/+0
No users left, all migrated over to hw/hid.[ch]. Yea! Zap it! Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-10milkymist-softusb: use hid code directlyMichael Walle1-84/+38
Remove the dummy USB device and use the HID code directly. Use the HID code for the mouse support, too. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-10usb-hid: use hid vmstate macroMichael Walle1-39/+2
Use new hid vmstate macro. Version stays the same, because there is no reordering of the fields. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-10hid: introduce hid vmstate macrosMichael Walle2-0/+78
Add VMSTATE macros to describe a HIDState. Based on usb-hid.c descriptions. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-10hid: register kbd hander in init()Michael Walle1-2/+3
Register the keyboard event handler in hid's init() instead of its reset() function. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-10usb/hid: add hid_pointer_activate, use itGerd Hoffmann3-4/+13
HID reorganziation broke the usb tablet in windows xp. The reason is that xp activates idle before it starts polling, which creates a chicken-and-egg issue: We don't call hid_pointer_poll because there are no pending events. We don't get any events because the activation code in hid_pointer_poll is never executed and thus all pointer events are routed to the PS/2 mouse by qemu. Fix this by creating a hid_pointer_activate function and call it from usb-hid when the guest sets the idle state. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-09Merge remote-tracking branch 'pm-arm/for-upstream' into pmEdgar E. Iglesias3-42/+121