Commit Graph

15818 Commits (83b2f0a0d810922d3d167153ac612dc187ff9d8f)

Author SHA1 Message Date
Stefan Weil 83b2f0a0d8 configure: Disable guest_agent for mingw32
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-12 08:31:29 -05:00
Paolo Bonzini 98254542f9 scsi: add special traces for common commands
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-12 08:31:28 -05:00
Paolo Bonzini c7b488721d scsi: report unit attention on reset
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-12 08:31:28 -05:00
Paolo Bonzini 6dc06f08b3 scsi: add support for unit attention conditions
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-12 08:31:28 -05:00
Paolo Bonzini a872a3049a scsi: add a bunch more common sense codes
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-12 08:31:05 -05:00
Paolo Bonzini 739df2150d scsi: move handling of REQUEST SENSE to common code
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-12 08:31:05 -05:00
Paolo Bonzini fdaef06917 scsi: move handling of REPORT LUNS and invalid LUNs to common code
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-12 08:30:20 -05:00
Paolo Bonzini afa46c468a scsi: move request parsing to common code
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-12 08:29:01 -05:00
Paolo Bonzini 87dcd1b2c2 scsi: push lun field to SCSIDevice
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-12 08:29:01 -05:00
Paolo Bonzini 2599aece1b scsi: introduce SCSICommand
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-12 08:29:01 -05:00
Paolo Bonzini c39ce112b6 scsi: pass cdb already to scsi_req_new
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-12 08:27:37 -05:00
Paolo Bonzini 12010e7b29 scsi: move request-related callbacks from SCSIDeviceInfo to SCSIReqOps
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-12 08:27:37 -05:00
Paolo Bonzini 8dbd457488 scsi: introduce SCSIReqOps
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-12 08:27:36 -05:00
Paolo Bonzini b45ef674f4 scsi: move sense handling to generic code
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-12 08:27:30 -05:00
Paolo Bonzini 682a9b213c scsi: pass status when completing
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-12 08:27:00 -05:00
Paolo Bonzini 05751d3ff7 vscsi: always use get_sense
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-12 08:27:00 -05:00
Paolo Bonzini e44089c79d scsi-disk: no need to call scsi_req_data on a short read
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-12 08:27:00 -05:00
Anthony Liguori 4333979e3d pc: make vgabios exit port more useful
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-12 08:27:00 -05:00
Anthony Liguori 9b024b5f96 Merge remote-tracking branch 'stefanha/trivial-patches' into staging 2011-08-12 08:06:02 -05:00
Anthony Liguori eecaecedec Merge remote-tracking branch 'aneesh/for-upstream-1' into staging 2011-08-12 07:52:53 -05:00
Anthony Liguori 25a263cdec Merge remote-tracking branch 'spice/spice.v41' into staging 2011-08-12 07:51:09 -05:00
Anthony Liguori 7cb78eec5c Merge remote-tracking branch 'kraxel/usb.23' into staging 2011-08-12 07:50:35 -05:00
Anthony Liguori 9c4dd424c3 Merge remote-tracking branch 'kraxel/seabios' into staging 2011-08-12 07:50:16 -05:00
Paolo Bonzini 85d59fef9d fix QLIST usage for RAM list
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-12 13:07:58 +01:00
Peter Maydell e92714c71a hw/qdev: Don't crash if qdev_create(NULL, ...) fails
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-11 14:37:03 +01:00
Zhi Yong Wu 645a8ad6e1 scsi-bus: use DO_UPCAST
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-11 14:37:03 +01:00
Edgar E. Iglesias 8cc7c3952d etrax-ser: printf -> qemu_log.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-08-11 12:02:30 +02:00
Edgar E. Iglesias d949396e53 etrax: QDevify the Ethernet MAC.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-08-11 11:12:16 +02:00
Alon Levy 8df0c7e8fc ui/spice-core: report compiled-version in info spice/query-spice
Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-10 18:52:06 +02:00
Gerd Hoffmann d67c3f2cd9 seabios: update to master
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-10 17:34:13 +02:00
Alon Levy c5f3dabba9 qxl: unbreak after memory API conversion
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-10 17:27:21 +02:00
Yonit Halperin be48e99512 qxl: allowing the command rings to be not empty when spice worker is stopped RHBZ #728984
same as 8927cfbba2, 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-10 17:27:13 +02:00
Gerd Hoffmann f3aaaa242e usb-hid: remove usb_hid_datain_cb
No users left, all migrated over to hw/hid.[ch].
Yea!  Zap it!

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-10 14:14:00 +02:00
Michael Walle 4c15ba9cc9 milkymist-softusb: use hid code directly
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-10 14:14:00 +02:00
Michael Walle 1f42d22233 usb-hid: use hid vmstate macro
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-10 14:14:00 +02:00
Michael Walle ccd4ed065b hid: introduce hid vmstate macros
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-10 14:14:00 +02:00
Michael Walle bb0db5273f hid: register kbd hander in init()
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-10 14:14:00 +02:00
Gerd Hoffmann 21635e121a usb/hid: add hid_pointer_activate, use it
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-10 14:14:00 +02:00
Edgar E. Iglesias b9c6cbff76 Merge remote-tracking branch 'pm-arm/for-upstream' into pm 2011-08-09 19:16:43 +02:00
Edgar E. Iglesias 1da005b374 etrax: Allocate DMA connections at board level.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-08-09 13:42:04 +02:00
Edgar E. Iglesias bbea04df98 etrax: Remove hw/etraxfs.c.
The Bare ETRAX FS board was a fictive machine that I used when
developing the CRIS system emulation. Since we support the
real AXIS-dev88 developer boards, there is no reason to
keep the fictive one around.

This commit also removes the double registration of the axis-dev88
board.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-08-09 12:22:38 +02:00
Avi Kivity 032a7c4e42 lance: unbreak after memory API conversion
The conversion passed the wrong opaque pointer, causing a crash on first use.
Pass the correct opaque.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-08-09 08:57:21 +02:00
Anthony Liguori 986563b173 Merge remote-tracking branch 'qemu-kvm/uq/master' into staging 2011-08-08 14:38:42 -05:00
Aneesh Kumar K.V 930b1e173b hw/9pfs: Update vfs_rename to use coroutines
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>
2011-08-08 23:51:21 +05:30
Aneesh Kumar K.V 2a487e05de hw/9pfs: Add yeild support to rename coroutine
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2011-08-08 23:51:21 +05:30
Venkateswararao Jujjuri ae1ef571fc hw/9pfs: Update v9fs_remove to use coroutines
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2011-08-08 23:50:27 +05:30
Venkateswararao Jujjuri b4b1537b96 hw/9pfs: Add yield support for remove
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2011-08-08 23:48:29 +05:30
Venkateswararao Jujjuri e84861f75e hw/9pfs: Update mkdir to use coroutines
Signed-off-by: Venkateswararao Jujjuri "<jvrao@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2011-08-08 23:46:42 +05:30
Venkateswararao Jujjuri d0884642b8 hw/9pfs: Add yield support for mkdir coroutine
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2011-08-08 23:44:24 +05:30
Aneesh Kumar K.V 1b733fed7f hw/9pfs: Update v9fs_mknod to use coroutines
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2011-08-08 23:42:59 +05:30