summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-10-16target-xtensa: add fsf coreMax Filippov3-0/+384
This is FSF big endian core implemented through linux overlay. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16target-xtensa: add dc232b coreMax Filippov4-0/+713
This is Diamond 232L Standard Core Rev.B (LE), implemented through linux/gdb overlay. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16target-xtensa: extract core configuration from overlayMax Filippov3-13/+554
Introduce overlay_tool.h that defines core configuration blocks from data available in the linux architecture variant overlay. Overlay data is automatically generated in the core configuration process by Tensilica tools and can be directly converted to qemu xtensa core description by overlay_tool.h Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16target-xtensa: implement external interrupt mappingMax Filippov2-0/+15
Xtensa cores may have different mapping of external interrupt pins to internal IRQ numers. Implement API to acquire core IRQ by its external interrupt number. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16target-xtensa: remove hand-written xtensa cores implementationsMax Filippov5-968/+2
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16target-xtensa: increase xtensa options accuracyMax Filippov2-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>
2011-10-15target-xtensa: update qemu-doc.texiMax Filippov2-7/+88
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-15target-xtensa: add MAC16 unit testsMax Filippov2-0/+244
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-15target-xtensa: implement MAC16 optionMax Filippov2-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>
2011-10-15target-xtensa: fix guest hang on masked CCOMPARE interruptMax Filippov4-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>
2011-10-15Drop obsolete nographic timerJan Kiszka1-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>
2011-10-15Move graphic-related coalesced MMIO flushes to affected device modelsJan Kiszka3-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>
2011-10-14Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori12-633/+283
2011-10-14Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori7-32/+10
2011-10-14Merge remote-tracking branch 'kraxel/usb.28' into stagingAnthony Liguori9-84/+180
2011-10-14Merge remote-tracking branch 'qemu-kvm-tmp/memory/batch' into stagingAnthony Liguori37-394/+535
2011-10-14block: drop bdrv_has_async_rw()Stefan Hajnoczi1-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>
2011-10-14block: drop .bdrv_read()/.bdrv_write() emulationStefan Hajnoczi1-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>
2011-10-14block: use coroutine interface for raw formatStefan Hajnoczi1-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>
2011-10-14raw-posix: remove bdrv_read()/bdrv_write()Stefan Hajnoczi1-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>
2011-10-14block: drop emulation functions that use coroutinesStefan Hajnoczi1-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>
2011-10-14block/qcow: Fix use of free() instead of g_free()Stefan Weil1-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>
2011-10-14sheepdog: correct spellingDong Xu Wang1-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>
2011-10-14tcg: Fix spelling in comment (varables -> variables)Stefan Weil1-1/+1
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-10-14remove hpet.hPaolo Bonzini1-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>
2011-10-14arm_pic: Fix typoAndreas Färber1-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>
2011-10-14qemu-char: Fix use of free() instead of g_free()Stefan Weil1-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>
2011-10-14qemu-options: avoid #if in spicevmc texi helpStefan Hajnoczi1-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>
2011-10-14linux-aio: Allow reads beyond the end of growable imagesKevin Wolf1-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>
2011-10-13block: switch bdrv_aio_writev() to coroutinesStefan Hajnoczi1-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>
2011-10-13block: mark blocks dirty on coroutine write completionStefan Hajnoczi1-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>
2011-10-13block: switch bdrv_aio_readv() to coroutinesStefan Hajnoczi1-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>
2011-10-13block: switch bdrv_read()/bdrv_write() to coroutinesStefan Hajnoczi1-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>
2011-10-13block: split out bdrv_co_do_readv() and bdrv_co_do_writev()Stefan Hajnoczi1-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>
2011-10-13block: directly invoke .bdrv_* from emulation functionsStefan Hajnoczi1-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>
2011-10-13block: directly invoke .bdrv_aio_*() in bdrv_co_io_em()Stefan Hajnoczi1-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>
2011-10-13usb-hub: don't trigger assert on packet completion.Gerd Hoffmann1-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>
2011-10-13usb-hid: activate usb tablet / mouse after migration.Gerd Hoffmann1-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>
2011-10-13hw/usb-ohci: Honour endpoint maximum packet sizePeter Maydell1-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>
2011-10-13hw/usb-ohci: Fix OHCI_TD_T1 bit position definitionPeter Maydell1-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>
2011-10-13usb-host: handle USBDEVFS_SETCONFIGURATION returning EBUSYGerd Hoffmann1-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>
2011-10-13usb-host: factor out codeGerd Hoffmann1-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>
2011-10-13usb: fix port resetGerd Hoffmann5-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>
2011-10-13usb-hub: need to check dev->attachedGerd Hoffmann1-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>
2011-10-13usb-storage: fix NULL pointer dereference.Gerd Hoffmann1-1/+4
When a usb packet is canceled we need to check whenever we actually have a scsi request in flight before we try to cancel it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-10-11isa: Remove isa_init_ioport_range and isa_init_ioportRichard Henderson2-16/+5
All users have been converted to either isa_register_ioport or isa_register_old_portio_list. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-11ide: Convert to isa_register_portio_listRichard Henderson5-21/+30
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-11vmport: Convert to isa_register_ioportRichard Henderson1-3/+13
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-11pc: Convert port92 to isa_register_ioportRichard Henderson1-3/+13
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-11vga: Convert to isa_register_portio_listRichard Henderson6-49/+59
[jan: fix cut'n'paste errors] [avi: adjust pci variants not to use isa functions] Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>