Commit graph

5875 commits

Author SHA1 Message Date
Anthony Liguori d439b79d73 Merge remote-tracking branch 'aneesh/for-upstream-7' into staging 2011-10-31 11:06:02 -05:00
Anthony Liguori 96b3d73f5a Merge remote-tracking branch 'qmp/queue/qmp' into staging
Conflicts:
	ui/spice-core.c
2011-10-31 11:02:29 -05:00
Anthony Liguori 3a069ff11b Merge remote-tracking branch 'stefanha/trivial-patches' into staging 2011-10-31 10:23:15 -05:00
Anthony Liguori eca968d0d4 Merge remote-tracking branch 'spice/spice.v45' into staging 2011-10-31 10:12:14 -05:00
Harsh Prateek Bora 2583e44367 hw/9pfs: Replace rwlocks with RCU variants of interfaces.
Use QLIST_INSERT_HEAD_RCU and rcu_read_lock/unlock instead of rwlocks.
Use v9fs_synth_mutex as a write-only mutex to handle concurrent writers.

Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2011-10-31 12:34:18 +05:30
Aneesh Kumar K.V 9db221ae73 hw/9pfs: Add synthetic file system support using 9p
This patch create a synthetic file system with mount tag
v_synth when -virtfs_synth command line option is specified
in qemu. The synthetic file system can be mounted in guest
using 9p using the below command line

mount -t 9p -oversion=9p2000.L,trans=virtio v_synth  <mountpint>

Synthetic file system enabled different qemu subsystem to register
callbacks for read and write events from guest. The subsystem
can create directories and files in the synthetic file system as show
in ex below

    qemu_v9fs_synth_mkdir(NULL, 0777, "test2", &node);
    qemu_v9fs_synth_add_file(node, 0777, "testfile",
                             my_test_read, NULL, NULL);

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2011-10-31 12:34:18 +05:30
Aneesh Kumar K.V cc720ddb54 hw/9pfs: Abstract open state of fid to V9fsFidOpenState
To implement synthetic file system in Qemu we may not really
require file descriptor and Dir *. Make generic code use
V9fsFidOpenState instead.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2011-10-31 12:34:17 +05:30
M. Mohan Kumar 2c74c2cb4b hw/9pfs: Read-only support for 9p export
A new fsdev parameter "readonly" is introduced to control accessing 9p export.
"readonly" can be used to specify the access type. By default "rw" access
is given to 9p export.

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2011-10-31 12:34:17 +05:30
Aneesh Kumar K.V 17b1971f63 hw/9pfs: Fix error handling in local_mknod
Update local_chown to remove unnecessary if loop

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2011-10-31 12:34:15 +05:30
Peter Maydell 03a0e9444c hw/vexpress.c, hw/realview.c: Add PL041 to VExpress, Realview boards
Instantiate the PL041 audio on the Versatile Express and
Realview board models.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-10-31 05:40:29 +01:00
Mathieu Sonet d028d02d0c Add AACI audio playback support to the ARM Versatile/PB platform
This driver emulates the ARM AACI interface (PL041) connected to a LM4549 codec.
It enables audio playback for the Versatile/PB platform.

Limitations:
- Supports only a playback on one channel (Versatile/Vexpress)
- Supports only one TX FIFO in compact-mode or non-compact mode.
- Supports playback of 12, 16, 18 and 20 bits samples.
- Record is not supported.
- The PL041 is hardwired to a LM4549 codec.

Versatile/PB test build:
linux-2.6.38.5
buildroot-2010.11
alsa-lib-1.0.22
alsa-utils-1.0.22
mpg123-0.66

Qemu host: Ubuntu 10.04 in Vmware/OS X

Playback tested successfully with speaker-test/aplay/mpg123.

Signed-off-by: Mathieu Sonet <contact@elasticsheep.com>
[Peter Maydell: fixed typo in code clearing SL1RXBUSY/SL2RXBUSY
 bits, as spotted by Andrzej Zaborowski]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-10-31 05:40:22 +01:00
Aneesh Kumar K.V 7999f7e127 hw/9pfs: Make VirtFS tracing work correctly
this patch fix multiple issues with VirtFS tracing.
a) Add tracepoint to the correct code path. We handle error in complete_pdu
b) Fix indentation in python script
c) Fix variable naming issue in python script

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-30 09:05:28 +00:00
Luiz Capitulino 79627472db qapi: Convert query-pci
This also fixes a bug with the old version: QMP would invert device id
and vendor id. This would look ok on HMP because it was printing
"device:vendor" instead of "vendor:device".

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-27 11:48:47 -02:00
Luiz Capitulino 96637bcdf9 qapi: Convert query-balloon
Please, note that some of the code supporting memory statistics is
still around (eg. virtio_balloon_receive_stats() and reset_stats()).

Also, the qmp_query_balloon() function is synchronous and thus doesn't
make any use of the (not fully working) monitor's asynchronous command
support (the old non-qapi implementation did).

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-27 11:48:47 -02:00
Anthony Liguori e86d9b12b5 Merge remote-tracking branch 'kwolf/for-anthony' into staging 2011-10-26 10:29:24 -05:00
Max Filippov 3899edf7e4 ahci: fix DPRINTF format strings
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-10-26 14:22:40 +01:00
Hervé Poussineau 1ce9c19210 Fix typo: buf -> bus
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-10-26 14:14:19 +01:00
Marc-André Lureau ba43d28916 hda: do not mix output and input stream states, RHBZ #740493
Windows 7 may use the same stream number for input and output.
Current code will confuse streams.

Changes since v1:
- keep running_compat[] for migration version 1
- add running_real[] for migration version 2

Signed-off-by: Marc-Andr? Lureau <marcandre.lureau@redhat.com>
Signed-off-by: malc <av1474@comtv.ru>
2011-10-25 19:15:20 +04:00
Marc-André Lureau 36ac4ad3d0 hda: do not mix output and input streams, RHBZ #740493
Windows 7 may use the same stream number for input and output.
That will result in lot of garbage on playback.

The hardcoded value of 4 needs to be in sync with GCAP streams
description and IN/OUT registers.

Signed-off-by: Marc-Andr? Lureau <marcandre.lureau@redhat.com>
Signed-off-by: malc <av1474@comtv.ru>
2011-10-25 19:15:07 +04:00
Alon Levy 9f0f352d85 qxl: reset update_surface
update init_qxl_ram to reset update_surface to 0. This fixes one case
of breakage when installing an old driver in a vm that had a new driver
installed. The newer driver would know about surface creation and would
change update_surface to !=0, then a reset would happen, all surfaces
are destroyed, then the old driver is initialized and issues an
UPDATE_AREA, and spice server aborts on invalid surface.

RHBZ: 690427

Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-10-25 14:00:54 +02:00
Yonit Halperin 30f6da6656 qxl: fix guest cursor tracking
(1) If the guest cursor command is empty, don't reload it after migration.
(2) Cleaning the guest cursor when it is released by
    the spice server. In addition, explicitly reset the
    cursor in spice upon destroying the primary surface
    (was done by spice-server implicitly). This will prevent
    access to pci memory that was released.

RHBZ: 744518

Signed-off-by: Yonit Halperin <yhalperi@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-10-25 14:00:54 +02:00
Gerd Hoffmann 78e60ba53d qxl: factor out properties
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-10-25 14:00:54 +02:00
Jan Kiszka 4ec8d3077b qxl: Drop phread_yield on OOM
This was only a best-effort attempt, by far not guaranteed to have an
effect. Drop it so that also no direct pthread usage remain in the
device model.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-10-25 14:00:53 +02:00
Jan Kiszka 691f5c7bde qxl: Convert to QEMU thread API
Use QEMU thread API instead of pthread directly. We still need to get
rid of pthread_yield, though, to drop pthread.h inclusion.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-10-25 14:00:53 +02:00
Anthony Liguori 952e849c15 Merge remote-tracking branch 'bonzini/split-main-loop-for-anthony' into staging 2011-10-24 10:51:12 -05:00
Blue Swirl b1f88301b5 m48t59: fix write access
Fix incorrect order of arguments, letting writes to NVRAM succeed.

It looks like guests never write to the device, only read from it, since the bug
originates back to 819385c58b.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-23 14:08:30 +00:00
Blue Swirl 0fb56ffc5e m48t59: drop obsolete address base arithmetic
Remove now incorrect address base arithmetic, missed by
9936d6e423. Fixes Sparc64 boot.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-23 14:07:38 +00:00
Blue Swirl 52ce6f05c1 pci_bridge: fix typo
Reviewed-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-23 14:05:46 +00:00
Paolo Bonzini 0abc2712b8 remove unused function
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-10-21 18:14:29 +02:00
Kevin Wolf 34d4260e18 pc: Fix floppy drives with if=none
Commit 63ffb564 broke floppy devices specified on the command line like
-drive file=...,if=none,id=floppy -global isa-fdc.driveA=floppy because it
relies on drive_get() which works only with -fda/-drive if=floppy.

This patch resembles what we're already doing for IDE, i.e. remember the floppy
device that was created and use that to extract the BlockDriverStates where
needed.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
2011-10-21 17:34:13 +02:00
Kevin Wolf a18e67f5f9 fdc: Fix floppy port I/O
The floppy device was broken by commit 212ec7ba (fdc: Convert to
isa_register_portio_list). While the old interface provided the port number
relative to the floppy drive's io_base, the new one provides the real port
number, so we need to apply a bitmask now to get the register number.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-10-21 17:34:13 +02:00
Kevin Wolf 5cce43bb28 xen_disk: Always set feature-barrier = 1
The synchronous .bdrv_flush callback doesn't exist any more and a device really
shouldn't poke into the block layer internals anyway. All drivers are supposed
to have a correctly working bdrv_flush, so let's just hard-code this.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-10-21 17:34:12 +02:00
Dmitry Koshelev c2e2343e1f hw/arm_gic.c: Fix save/load of irq_target array
irq_target array saving/loading is in the wrong loop.
Version bump.

Signed-off-by: Dmitry Koshelev <karaghiozis@gmail.com>
Acked-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-10-21 17:19:56 +02:00
Peter Maydell f45b885ffc hw/omap2: Wire up the IRQ for the 2430's fifth GPIO module
The OMAP2430 version of the omap-gpio device has five GPIO modules,
not four like the other OMAP2 versions; wire up the fifth module's
IRQ line correctly.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-10-21 17:19:53 +02:00
Anthony Liguori a6e43daa73 Merge remote-tracking branch 'quintela/migration-pull' into staging 2011-10-20 08:46:55 -05:00
Anthony Liguori 46cd37e771 Merge remote-tracking branch 'qemu-kvm-tmp/memory/batch' into staging 2011-10-20 08:43:00 -05:00
Anthony Liguori 1f99b94932 Merge remote-tracking branch 'aneesh/for-upstream-6' into staging
Conflicts:
	trace-events
2011-10-20 08:42:08 -05:00
Juan Quintela 624b9cc209 migration: rename qemu_file_has_error to qemu_file_get_error
Now the function returned errno, so it is better the new name.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
2011-10-20 13:23:52 +02:00
Juan Quintela dcd1d224df migration: change has_error to contain errno values
We normally already have an errno value.  When not, abuse EIO.

Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-10-20 13:23:52 +02:00
Juan Quintela 3a230256e8 ds1225y: Use stdio instead of QEMUFile
QEMUFile * is only intended for migration nowadays.  Using it for
anything else just adds pain and a layer of buffers for no good
reason.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
2011-10-20 13:23:51 +02:00
Avi Kivity d08151bf7c tcx: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:18 +02:00
Avi Kivity fe06bd93e3 tc63963xb: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:18 +02:00
Avi Kivity 9f7adc31ad syborg: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:18 +02:00
Avi Kivity d4edce380c sun4u: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:18 +02:00
Avi Kivity 3150fa5010 sun4m: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:18 +02:00
Avi Kivity eb2fefbc44 strongarm: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:18 +02:00
Avi Kivity 7cc09e6c4b spitz: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:18 +02:00
Avi Kivity 890c2b772d spapr: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:18 +02:00
Avi Kivity 25793bfafa sm501: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:18 +02:00
Avi Kivity ca3dbc2757 s390-virtio: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:17 +02:00