summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* target-xtensa: remove hand-written xtensa cores implementationsMax Filippov2011-10-165-968/+2
| | | | | Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* target-xtensa: increase xtensa options accuracyMax Filippov2011-10-162-8/+12
| | | | | | | | | - add separate options for each operation in the MISC_OP; - add an option for MULSH/MULUH; - put S32C1I under conditional store option. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* target-xtensa: update qemu-doc.texiMax Filippov2011-10-152-7/+88
| | | | | Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* target-xtensa: add MAC16 unit testsMax Filippov2011-10-152-0/+244
| | | | | Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* target-xtensa: implement MAC16 optionMax Filippov2011-10-152-1/+137
| | | | | | | | | | See ISA, 4.3.7 for the details. - add ACC and MR special registers; - implement MAC16 and all inner MAC* opcode groups. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* target-xtensa: fix guest hang on masked CCOMPARE interruptMax Filippov2011-10-154-16/+93
| | | | | | | | | | | | QEMU timer is used to post CCOMPARE interrupt when the core is halted. If that CCOMPARE interrupt is masked off then the timer must be rearmed in the callback, otherwise it will be rearmed next time the core goes to halt by the waiti instruction. Add test case into timer testsuite. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Drop obsolete nographic timerJan Kiszka2011-10-151-13/+0
| | | | | | | | | We flush coalesced MMIO in the device models now, and VNC - for which this was once introduced - is also fine without it as it has its own refresh timer. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Move graphic-related coalesced MMIO flushes to affected device modelsJan Kiszka2011-10-153-2/+8
| | | | | | | | | This is conceptually cleaner and will allow us to drop the nographic timer. Moreover, it will be mandatory to fully exploit future per-device coalesced MMIO rings. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori2011-10-1412-633/+283
|\
| * block: drop bdrv_has_async_rw()Stefan Hajnoczi2011-10-141-6/+0
| | | | | | | | | | | | | | | | | | | | Commit cd74d83345e0e3b708330ab8c4cd9111bb82cda6 ("block: switch bdrv_read()/bdrv_write() to coroutines") removed the bdrv_has_async_rw() callers. This patch removes bdrv_has_async_rw() since it is no longer used. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: drop .bdrv_read()/.bdrv_write() emulationStefan Hajnoczi2011-10-141-72/+3
| | | | | | | | | | | | | | | | | | | | There is no need to emulate .bdrv_read()/.bdrv_write() since these interfaces are only called if aio and coroutine interfaces are not present. All valid BlockDrivers must implement either sync, aio, or coroutine interfaces. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: use coroutine interface for raw formatStefan Hajnoczi2011-10-141-24/+8
| | | | | | | | | | | | | | | | | | | | | | The raw format delegates all operations to bs->file (the protocol). Previously this block driver exposed both sync and aio interfaces. Since the block layer now works in terms of coroutines, expose the coroutine interfaces and drop the others. This avoids unnecessary emulation of sync and aio interfaces. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * raw-posix: remove bdrv_read()/bdrv_write()Stefan Hajnoczi2011-10-141-277/+0
| | | | | | | | | | | | | | | | | | | | Block drivers only need to provide one of sync, aio, or coroutine interfaces. Since raw-posix.c provides aio interfaces, simply drop the synchronous interfaces since they can be emulated using aio and coroutines. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: drop emulation functions that use coroutinesStefan Hajnoczi2011-10-141-54/+7
| | | | | | | | | | | | | | | | | | | | Block drivers that implement coroutine functions used to get sync and aio wrappers. This is no longer necessary since all request processing now happens in a coroutine. If a block driver implements the coroutine interface then none of the other interfaces will be invoked. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * linux-aio: Allow reads beyond the end of growable imagesKevin Wolf2011-10-141-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the linux-aio version of commits 22afa7b5 (raw-posix, synchronous) and ba1d1afd (posix-aio-compat). Reads now produce zeros after the end of file instead of failing or resulting in short reads, making linux-aio compatible with the behaviour of synchronous raw-posix requests and posix-aio-compat. The problem can be reproduced like this: dd if=/dev/zero of=/tmp/test.raw bs=1 count=1234 ./qemu-io -k -n -g -c 'read -p 1024 512' /tmp/test.raw Previously, the result of this was 'read failed: Invalid argument', now the read completes successfully. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * block: switch bdrv_aio_writev() to coroutinesStefan Hajnoczi2011-10-131-64/+2
| | | | | | | | | | | | | | | | | | | | | | More sync, aio, and coroutine unification. Make bdrv_aio_writev() go through coroutine request processing. Remove the dirty block callback mechanism which was needed only for aio processing and can be done more naturally in coroutine context. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: mark blocks dirty on coroutine write completionStefan Hajnoczi2011-10-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The aio write operation marks blocks dirty when the write operation completes. The coroutine write operation marks blocks dirty before issuing the write operation. It seems safest to mark the block dirty when the operation completes so that anything tracking dirty blocks will not act before the change has been made to the image file. Make the coroutine write operation dirty blocks on write completion. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: switch bdrv_aio_readv() to coroutinesStefan Hajnoczi2011-10-131-13/+35
| | | | | | | | | | | | | | | | More sync, aio, and coroutine unification. Make bdrv_aio_readv() go through coroutine request processing. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: switch bdrv_read()/bdrv_write() to coroutinesStefan Hajnoczi2011-10-131-50/+62
| | | | | | | | | | | | | | | | | | | | | | The bdrv_read()/bdrv_write() functions call .bdrv_read()/.bdrv_write(). They should go through bdrv_co_do_readv() and bdrv_co_do_writev() instead in order to unify request processing code across sync, aio, and coroutine interfaces. This is also an important step towards removing BlockDriverState .bdrv_read()/.bdrv_write() in the future. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: split out bdrv_co_do_readv() and bdrv_co_do_writev()Stefan Hajnoczi2011-10-131-7/+27
| | | | | | | | | | | | | | | | | | | | The public interface for I/O in coroutine context is bdrv_co_readv() and bdrv_co_writev(). Split out the request processing code into bdrv_co_do_readv() and bdrv_co_writev() so that it can be called internally when we refactor all request processing to use coroutines. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: directly invoke .bdrv_* from emulation functionsStefan Hajnoczi2011-10-131-6/+8
| | | | | | | | | | | | | | | | | | | | | | The emulation functions which supply default BlockDriver .bdrv_*() functions given another implemented .bdrv_*() function should not use public bdrv_*() interfaces. This patch ensures they invoke .bdrv_*() directly to avoid adding an extra layer of coroutine request processing and possibly entering an infinite loop. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: directly invoke .bdrv_aio_*() in bdrv_co_io_em()Stefan Hajnoczi2011-10-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We will unify block layer request processing across sync, aio, and coroutines and this means a .bdrv_co_*() emulation function should not call back into the public interface. There's no need here, just call .bdrv_aio_*() directly. The gory details: bdrv_co_io_em() cannot call back into the public bdrv_aio_*() interface since that will be handled using coroutines, which causes us to call into bdrv_co_io_em() again in an infinite loop :). Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * vvfat: Fix potential buffer overflowKevin Wolf2011-10-111-1/+1
| | | | | | | | | | | | | | path2[PATH_MAX] can be used for the null termination, so make the array big enough to allow this. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block/vvfat: Remove unused codeStefan Weil2011-10-111-56/+0
| | | | | | | | | | | | | | | | The unused code was detected using cppcheck. Cc: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block/vvfat: Fix potential memory leaks and other memory errorsStefan Weil2011-10-111-21/+30
| | | | | | | | | | | | | | | | | | | | | | cppcheck reported memory leaks and mismatched g_malloc() with free() instead of g_free(). Fix these errors. Cc: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * HMP: Print 'io-status' informationLuiz Capitulino2011-10-111-0/+5
| | | | | | | | | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * QMP: query-status: Add 'io-status' keyLuiz Capitulino2011-10-112-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | Contains the I/O status for the given device. The key is only present if the device supports it and the VM is configured to stop on errors. Please, check the documentation being added in this commit for more information. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * scsi: Support I/O statusLuiz Capitulino2011-10-111-0/+2
| | | | | | | | | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * ide: Support I/O statusLuiz Capitulino2011-10-111-0/+2
| | | | | | | | | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * virtio: Support I/O statusLuiz Capitulino2011-10-111-0/+2
| | | | | | | | | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: Keep track of devices' I/O statusLuiz Capitulino2011-10-114-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support to the BlockDriverState type to keep track of devices' I/O status. There are three possible status: BDRV_IOS_OK (no error), BDRV_IOS_ENOSPC (no space error) and BDRV_IOS_FAILED (any other error). The distinction between no space and other errors is important because a management application may want to watch for no space in order to extend the space assigned to the VM and put it to run again. Qemu devices supporting the I/O status feature have to enable it explicitly by calling bdrv_iostatus_enable() _and_ have to be configured to stop the VM on errors (ie. werror=stop|enospc or rerror=stop). In case of multiple errors being triggered in sequence only the first one is stored. The I/O status is always reset to BDRV_IOS_OK when the 'cont' command is issued. Next commits will add support to some devices and extend the query-block/info block commands to return the I/O status information. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * linux-aio: Fix laio_submit error handlingKevin Wolf2011-10-111-2/+2
| | | | | | | | | | | | | | The error handling order was in the wrong order, so that either the ACB would be leaked or the counter would be decremented when it shouldn't. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: allow resizing of images residing on host devicesChristoph Hellwig2011-10-111-3/+21
| | | | | | | | | | | | | | | | | | Allow to resize images that reside on host devices up to the available space. This allows to grow images after resizing the device manually or vice versa. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2011-10-147-32/+10
|\ \
| * | block/qcow: Fix use of free() instead of g_free()Stefan Weil2011-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | cppcheck reported this error: qemu/block/qcow.c:599: error: Mismatching allocation and deallocation: cluster_data Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | sheepdog: correct spellingDong Xu Wang2011-10-141-1/+1
| | | | | | | | | | | | | | | | | | Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | tcg: Fix spelling in comment (varables -> variables)Stefan Weil2011-10-141-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | remove hpet.hPaolo Bonzini2011-10-141-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | It is unused since the HPET and RTC timers were removed (commit 25f3151, 2011-05-31). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | arm_pic: Fix typoAndreas Färber2011-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | interrput -> interrupt Cc: Paul Brook <paul@codesourcery.com> Signed-off-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | qemu-char: Fix use of free() instead of g_free()Stefan Weil2011-10-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cppcheck reported these errors: qemu-char.c:1667: error: Mismatching allocation and deallocation: s qemu-char.c:1668: error: Mismatching allocation and deallocation: chr qemu-char.c:1769: error: Mismatching allocation and deallocation: s qemu-char.c:1770: error: Mismatching allocation and deallocation: chr Tested-by: Dongxu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | qemu-options: avoid #if in spicevmc texi helpStefan Hajnoczi2011-10-141-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | Preprocessor directives cannot be used in STEXI/ETEXI sections since they are not passed through the preprocessor. The spicevmc chardev option help currently uses #if, which is included verbatim in the man page output. Fix this by simply stating that spicevmc chardevs are available only in builds with spice support. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | Merge remote-tracking branch 'kraxel/usb.28' into stagingAnthony Liguori2011-10-149-84/+180
|\ \
| * | usb-hub: don't trigger assert on packet completion.Gerd Hoffmann2011-10-131-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling usb_packet_complete() recursively when passing up the completion event up the chain for devices connected via usb hub will trigger an assert. So don't do that, make the usb hub emulation call the upstream completion callback directly instead. Based on a patch from Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-hid: activate usb tablet / mouse after migration.Gerd Hoffmann2011-10-131-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qemu uses the ps/2 mouse by default. The usb tablet (or mouse) is activated as soon as qemu sees some guest activity on the device, i.e. polling for HID events. That used to work fine for both fresh boot and migration. Remote wakeup support changed the picture though: There will be no polling after migration in case the guest suspended the usb bus, waiting for wakeup events. Result is that the ps/2 mouse stays active. Fix this by activating the usb tablet / mouse in post_load() in case the guest enabled remote wakeup. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | hw/usb-ohci: Honour endpoint maximum packet sizePeter Maydell2011-10-131-10/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Honour the maximum packet size for endpoints; this applies when sending non-isochronous data and means we transfer only as much as the endpoint allows, leaving the transfer descriptor on the list for another go next time around. This allows usb-net to work when connected to an OHCI controller model. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | hw/usb-ohci: Fix OHCI_TD_T1 bit position definitionPeter Maydell2011-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The OHCI Transfer Descriptor T (DataToggle) bits are 24 and 25; fix an error which accidentally overlaid them both on the same bit. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-host: handle USBDEVFS_SETCONFIGURATION returning EBUSYGerd Hoffmann2011-10-131-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | In case the host uses the usb device usbfs will refuse to set the configuration due to the device being busy. Handle this case by disconnection the interfaces, then trying again. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-host: factor out codeGerd Hoffmann2011-10-131-63/+77
| | | | | | | | | | | | | | | | | | | | | | | | Move code to claim usb ports and to disconnect usb interfaces into usb_host_claim_port and usb_host_disconnect_ifaces functions. No functional change. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb: fix port resetGerd Hoffmann2011-10-135-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 891fb2cd4592b6fe76106a69e0ca40efbf82726a removed the implicit detach before (re-)attaching in usb_attach(). Some usb host controllers used that behavior though to do a port reset by a detach+attach sequence. This patch establishes old behavior by adding a new usb_reset() function for port resets and putting it into use, thereby also unifying port reset behavior of all host controllers. The patch also adds asserts to usb_attach() and usb_detach() to make sure the calls are symmetrical. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-hub: need to check dev->attachedGerd Hoffmann2011-10-131-2/+2
| | | | | | | | | | | | | | | | | | | | | commit 891fb2cd4592b6fe76106a69e0ca40efbf82726a did that for all host controllers, the usb hub was left out by accident. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
OpenPOWER on IntegriCloud