summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-07-27Update version for 0.13.0-rc0v0.13.0-rc0Anthony Liguori1-1/+1
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26vnc: better default values for VNC optionsCorentin Chary1-7/+7
vnc_jpeg and vnc_png are now "auto" by default, this means that if the dependencies are installed (libjpeg or libpng), then they will be enabled. vnc_thread is disabled by default. It should be enabled by default as soon as it's stable enougth. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26vnc: tight: split send_sub_rectCorentin Chary1-25/+55
Split send_sub_rect in send_sub_rect_jpeg and send_sub_rect_nojpeg to remove all these #ifdef CONFIG_JPEG. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26vnc: tight: fix rgb_prepare_rowCorentin Chary1-5/+10
rgb_prepare_row bpp depends on the server display surface, not the client. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26vnc: add missing lock for vnc_cursor_define()Corentin Chary1-0/+2
All vnc_write() calls must be locked (except the ones present before the protocol initialization). Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26vnc: threaded VNC serverCorentin Chary7-26/+682
Implement a threaded VNC server using the producer-consumer model. The main thread will push encoding jobs (a list a rectangles to update) in a queue, and the VNC worker thread will consume that queue and send framebuffer updates to the output buffer. The threaded VNC server can be enabled with ./configure --enable-vnc-thread. If you don't want it, just use ./configure --disable-vnc-thread and a syncrhonous queue of job will be used (which as exactly the same behavior as the old queue). If you disable the VNC thread, all thread related code will not be built and there will be no overhead. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26qemu-thread: add qemu_mutex/cond_destroy and qemu_mutex_exitCorentin Chary2-0/+26
Add some missing functions in qemu-thread. Currently qemu-thread is only used for io-thread but it will used by the vnc server soon and we need those functions instead of calling pthread directly. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26vnc: fix tight png memory leakCorentin Chary1-0/+3
The tight.png buffer was never released. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26vnc: encapsulate encoding membersCorentin Chary5-156/+163
This will allow to implement the threaded VNC server in a more cleaner way. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26vnc: tight: stop using qdict for palette stuffCorentin Chary4-129/+235
Profiling with callgrind seems to show that a lot of time is spent in the palette code (mostly due to memory allocation and qdict to int conversion). This patch adds a VncPalette implementation. The palette is stored in a hash table, like qdict, but which does way less memory allocations, and doesn't suffer from the QObject overhead. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26vnc: tight: specific zlib level and filters for each compression levelCorentin Chary1-1/+18
Disable png filters for lower compression levels. This should lower the CPU consumption and reduce encoding time. This isn't in tight_conf because: * tight_conf structure must not change, because it's shared with other tight implementations (libvncserver, etc..). * it'd exceed the 80 col limit. * PNG_ macros are only defined if CONFIG_VNC_PNG is defined Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26vnc: tight add PNG encodingCorentin Chary6-54/+342
Introduce a new encoding: VNC_ENCODING_TIGHT_PNG [1] (-269) with a new tight filter VNC_TIGHT_PNG (0x0A). When the client tells it supports the Tight PNG encoding, the server will use tight, but will always send encoding pixels using PNG instead of zlib. If the client also told it support JPEG, then the server can send JPEG, because PNG will only be used in the cases zlib was used in normal tight. This encoding was introduced to speed up HTML5 based VNC clients like noVNC [2], but can also be used on devices like iPhone where PNG can be rendered in hardware. [1] http://wiki.qemu.org/VNC_Tight_PNG [2] http://github.com/kanaka/noVNC/ Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26vnc: tight: remove a memleak in send_jpeg_rect()Corentin Chary1-2/+3
buf was never freed. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26vnc: tight: don't forget do at the last colorCorentin Chary1-1/+1
While using indexed colors, the last color was never added to the palette. Triggered with ubuntu livecd. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26vnc: rename vnc-encoding-* vnc-enc-*Corentin Chary6-9/+9
For the same reason that we don't use vnc-authentication-sasl.c but vnc-auth-sals.c. Because it's tooooo long. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26ui: move all ui components in ui/Corentin Chary31-44/+18
Move sdl, vnc, curses and cocoa UI into ui/ to cleanup the root directory. Also remove some unnecessary explicit targets from Makefile. aliguori: fix build when srcdir != objdir Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26vnc: add lossy optionCorentin Chary4-0/+15
The lossy option can be used to enable lossy compression methods like gradient or jpeg. This patch disable them by default. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26vnc: JPEG should be disabled if the client don't set tight qualityCorentin Chary1-1/+1
Disable JPEG compression by default and only enable it if the VNC client has sent the requested quality. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26vnc: tight: add JPEG and gradient subencoding with smooth image detectionCorentin Chary5-1/+601
Add gradient filter and JPEG compression with an heuristic to detect how lossy the comppression will be. This code has been adapted from libvncserver/tight.c. JPEG support can be enabled/disabled at compile time with --enable-vnc-jpeg and --disable-vnc-jpeg. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26Initial documentation for migrationJuan Quintela1-0/+303
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26ide: fix migration in the middle of a bmdma transferJuan Quintela1-0/+30
It reintroduces Revert "ide save/restore pio/atapi cmd transfer fields and io buffer" but using subsections. Added bonus is the addition of ide_dummy_transfer_stop to transfer_end_table, that was missing. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26ide: fix migration in the middle of pio operationJuan Quintela2-1/+94
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26vmstate: add subsections codeJuan Quintela2-1/+91
This commit adds subsections for each device section. Subsections is the way to handle information that don't need to be sent to de destination of a migration because its values are not needed. It is the way to handle optional information. Notice that only the source can decide if the information is optional or not. The destination needs to understand all subsections that it receives to have a sucessful load. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26Revert "ide save/restore current transfer fields"Juan Quintela1-6/+2
This reverts commit 42ee76fe82093ba914f0dc83d2decbcf68866144. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26Revert "ide save/restore pio/atapi cmd transfer fields and io buffer"Juan Quintela2-65/+2
This reverts commit ed487bb1d69040b9dac64a4fc076d8dd82b131d6. The conflicts are due to commit 4fc8d6711aff7a9c11e402c3d77b481609f9f486 that is a fix to the ide_drive_pre_save() function. It reverts both (and both are reinstantiated later in the series) Conflicts: hw/ide/core.c Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26Merge remote branch 'mst/for_anthony' into stagingAnthony Liguori2-12/+21
2010-07-25etrax: Update ethernet mgm-ctrl reg on writesEdgar E. Iglesias1-0/+1
Some SW drivers dont keep track of what they've written and depend on the HW latching write contents for later read+modify+write sequences. Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
2010-07-25target-i386: use gen_update_cc_op()Jun Koi1-32/+8
This patch simplifies target-i386/translate.c a bit by replacing some code with gen_update_cc_op() Signed-off-by: Jun Koi <junkoi2004@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-07-25Close socket file descriptor when qemu_accept failsShahar Havivi1-2/+3
Signed-off-by: Shahar Havivi <shaharh@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-07-25add cscope.* to .gitignoreJun Koi1-0/+1
we have "make cscope", therefore that makes sense to have cscope.* in .gitignore. Signed-off-by: Jun Koi <junkoi2004@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-07-25slirp: Remove declarations which are no longer neededStefan Weil1-33/+0
The previous patches replaced u_int8_t, u_int16_t, u_int32_t, u_int64_t by standard int types from stdint.h, so we can now remove their declarations which are no longer needed. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-07-25slirp: Replace u_int8_t, u_int16_t, u_int32_t, u_int64_t by standard int typesStefan Weil20-116/+110
There is no need to have a second set of integral types. Replace them by the standard types from stdint.h. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-07-25tests: Replace u_int8_t, u_int16_t, u_int32_t, u_int64_t by standard int typesStefan Weil1-12/+12
There is no need to have a second set of integral types. Replace them by the standard types from stdint.h. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-07-25block: Replace u_int8_t, u_int16_t, u_int32_t, u_int64_t by standard int typesStefan Weil1-1/+1
There is no need to have a second set of integral types. Replace them by the standard types from stdint.h. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-07-25mips: more fixes to the MIPS interrupt glue logicAurelien Jarno5-15/+30
Commit 36388314febad3d7675ab919287f03733a560ff6 moved most of the interrupt logic to cpu-exec.c. Remove the remaining useless code and fix software interrupts. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Acked-by: Edgar E. Iglesias <edgar@axis.com> Tested-by: Edgar E. Iglesias <edgar@axis.com>
2010-07-25microblaze: Remove unused members from the disas contextEdgar E. Iglesias1-5/+1
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2010-07-24microblaze: Speed up base + index addressing modeEdgar E. Iglesias1-0/+7
Speed up reg + reg addressing mode when any of the regs is r0. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2010-07-24microblaze: Use setcond for conditional branchesEdgar E. Iglesias1-32/+6
Use setcond for evaluating the condition for branches. In the future, we could do better for branches without delay slots. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2010-07-24microblaze: Improve branch with small immediatesEdgar E. Iglesias1-7/+21
Slight improvements of conditional branches with small immediate offsets. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2010-07-24remove dead codeJun Koi1-3/+0
this patch removes unused function cpu_restore_state_copy(). Signed-off-by: Jun Koi <junkoi2004@gmail.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-07-24use symbol for DisasContext->is_jmpJun Koi1-10/+10
This patch replaces constant value assigned for (DisasContext *)->is_jmp with DISAS_TB_JUMP. Signed-off-by: Jun Koi <junkoi2004@gmail.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-07-24mips: Correct MIPS interrupt glue logic for icountEdgar E. Iglesias3-31/+6
When hw interrupt pending bits in CP0_Cause are set, the CPU should see the hw interrupt line as active. The CPU may or may not take the interrupt based on internal state (global irq mask etc) but the glue logic shouldn't care. This fixes MIPS external hw interrupts in combination with -icount. Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
2010-07-23microblaze: Pass a ucontext * as 3rd sighandler argEdgar E. Iglesias1-6/+20
There is disagreement between microblaze glibc and the kernel to what the third arg of signal handlers should point to. Change QEMU linux-user to match the kernel port. glibc patches are pending. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2010-07-22Declare code_gen_ptr, code_gen_max_blocks 'static'Stefan Weil2-4/+2
Both values are only used in exec.c, so there is no need to make them globally available. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-07-22scsi: Dequeue requests before invoking completion callbackJan Kiszka2-1/+12
The request completion callback of the LSI controller may start the next request that can use the same tag as the completed one. As the latter is still enqueued at that point, scsi_send_command will complain about the tag reuse and cancel the completed request. That will cause a double free later on when the completion path cleans up as well. Fix this by dequeuing the request before invoking the callback. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-07-22e1000: Fix wrong microwire EEPROM state initializationIzumi Tsutsui1-9/+8
This change fixes initialization of e1000's microwire EEPROM internal state values so that qemu's e1000 emulation works on NetBSD, which doesn't use Intel's em driver but has its own wm driver for the Intel i8254x Gigabit Ethernet. Previously set_eecd() function in e1000.c clears EEPROM internal state values on SK rising edge during CS==L, but according to FM93C06 EEPROM (which is MicroWire compatible) data sheet, EEPROM internal status should be cleared on CS rise edge regardless of SK input: "... a rising edge on this (CS) signal is required to reset the internal state-machine to accept a new cycle .." and nothing should be changed during CS (chip select) is inactive. Intel's em driver seems to explicitly raise SK output after CS is negated in em_standby_eeprom() so many other OSes that use Intel's driver don't have this problem even on the previous e1000.c implementation, but I can't find any articles that say the MICROWIRE or EEPROM spec requires such sequence, and actually hardware works fine without it (i.e. real i82540EM has been working on NetBSD). This fix also changes initialization to clear each state value in struct eecd_state individually rather than using memset() against the whole structre. The old_eecd member stores the last SK and CS signal levels and it should be preserved even after reset of internal EEPROM state to detect next signal edges for proper EEPROM emulation. Signed-off-by: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-07-22Rework debug exception processing for gdb useJan Kiszka2-12/+16
Guest debugging is currently broken under CONFIG_IOTHREAD. The reason is inconsistent or even lacking signaling the debug events from the source VCPU to the main loop and the gdbstub. This patch addresses the issue by pushing this signaling into a CPUDebugExcpHandler: cpu_debug_handler is registered as first handler, thus will be executed last after potential breakpoint emulation handlers. It sets informs the gdbstub about the debug event source, requests a debug exit of the main loop and stops the current VCPU. This mechanism works both for TCG and KVM, with and without IO-thread. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-07-22Rename tcg_cpu_exec and tcg_has_workJan Kiszka3-7/+7
These functions are also used for kvm under !CONFIG_IOTHREAD, having 'tcg' in their name is just misleading. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-07-22Drop redundant global cur_cpu variableJan Kiszka1-3/+2
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-07-22Fix qemu_wait_io_event processing in io-thread modeJan Kiszka1-4/+9
When checking for I/O events in the tcg CPU loop, make sure that we call qemu_wait_io_event_common for all CPUs, not only the current one. Otherwise pause_all_vcpus may lock up or run_on_cpu requests may starve. Rename qemu_wait_io_event to qemu_tcg_wait_io_event at this chance and purge its argument list as it has no use for it. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>