Commit Graph

12374 Commits

Author SHA1 Message Date
Corentin Chary 6f9c78c149 vnc: add lossy option
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-26 17:23:53 -05:00
Corentin Chary 2f24e2ed11 vnc: JPEG should be disabled if the client don't set tight quality
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-26 17:23:53 -05:00
Corentin Chary 2f6f5c7a00 vnc: tight: add JPEG and gradient subencoding with smooth image detection
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-26 17:23:53 -05:00
Juan Quintela f58ae59c02 Initial documentation for migration
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26 16:19:51 -05:00
Juan Quintela 5ee84c3375 ide: fix migration in the middle of a bmdma transfer
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-26 16:19:51 -05:00
Juan Quintela 50641c5ce2 ide: fix migration in the middle of pio operation
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26 16:19:51 -05:00
Juan Quintela 811814bd28 vmstate: add subsections code
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-26 16:19:51 -05:00
Juan Quintela 57338424aa Revert "ide save/restore current transfer fields"
This reverts commit 42ee76fe82.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26 16:19:51 -05:00
Juan Quintela 3abb62601b Revert "ide save/restore pio/atapi cmd transfer fields and io buffer"
This reverts commit ed487bb1d6.

The conflicts are due to commit 4fc8d6711a
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-26 16:19:50 -05:00
Anthony Liguori 7ed6184bf2 Merge remote branch 'mst/for_anthony' into staging 2010-07-26 08:05:27 -05:00
Edgar E. Iglesias cdcf9153e5 etrax: Update ethernet mgm-ctrl reg on writes
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-25 21:03:56 +02:00
Jun Koi 728d803baa target-i386: use gen_update_cc_op()
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-25 17:04:07 +02:00
Shahar Havivi d092c108ff Close socket file descriptor when qemu_accept fails
Signed-off-by: Shahar Havivi <shaharh@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-07-25 17:03:51 +02:00
Jun Koi 01cc7ac69e add cscope.* to .gitignore
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-25 17:03:49 +02:00
Stefan Weil 08dc07a32b slirp: Remove declarations which are no longer needed
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-25 16:59:41 +02:00
Stefan Weil b6dce92e89 slirp: Replace u_int8_t, u_int16_t, u_int32_t, u_int64_t by standard int types
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-25 16:59:41 +02:00
Stefan Weil 1fc3dc2930 tests: Replace u_int8_t, u_int16_t, u_int32_t, u_int64_t by standard int types
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-25 16:59:40 +02:00
Stefan Weil 2ee9fb4801 block: Replace u_int8_t, u_int16_t, u_int32_t, u_int64_t by standard int types
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-25 16:59:38 +02:00
Aurelien Jarno 5dc5d9f055 mips: more fixes to the MIPS interrupt glue logic
Commit 36388314fe 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-25 16:54:02 +02:00
Edgar E. Iglesias a5efa6441c microblaze: Remove unused members from the disas context
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2010-07-25 00:09:41 +02:00
Edgar E. Iglesias 4b5ef0b50d microblaze: Speed up base + index addressing mode
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-24 23:25:49 +02:00
Edgar E. Iglesias b2565c694a microblaze: Use setcond for conditional branches
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-24 21:51:51 +02:00
Edgar E. Iglesias 61204ce8ec microblaze: Improve branch with small immediates
Slight improvements of conditional branches with small
immediate offsets.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2010-07-24 21:24:59 +02:00
Jun Koi 04906034f5 remove dead code
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-24 14:42:29 +02:00
Jun Koi 5779406a24 use symbol for DisasContext->is_jmp
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-24 14:34:15 +02:00
Edgar E. Iglesias 36388314fe mips: Correct MIPS interrupt glue logic for icount
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-24 13:40:05 +02:00
Edgar E. Iglesias b2178704e4 microblaze: Pass a ucontext * as 3rd sighandler arg
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-23 09:30:37 +02:00
Stefan Weil 24ab68ac72 Declare code_gen_ptr, code_gen_max_blocks 'static'
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-22 05:52:10 +02:00
Jan Kiszka e8637c9013 scsi: Dequeue requests before invoking completion callback
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-22 05:52:10 +02:00
Izumi Tsutsui 9651ac55e5 e1000: Fix wrong microwire EEPROM state initialization
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-22 05:52:10 +02:00
Jan Kiszka 3c638d0690 Rework debug exception processing for gdb use
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-22 05:52:09 +02:00
Jan Kiszka 472fb0c479 Rename tcg_cpu_exec and tcg_has_work
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-22 05:52:09 +02:00
Jan Kiszka 345f4426a9 Drop redundant global cur_cpu variable
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-22 05:52:09 +02:00
Jan Kiszka 6cabe1f303 Fix qemu_wait_io_event processing in io-thread mode
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>
2010-07-22 05:52:09 +02:00
Jan Kiszka c629a4bc97 Fix cpu_exit for tcp_cpu_exec
If a cpu_exit request is pending, ensure that we leave the CPU loop
quickly. For this purpose, keep the global exit_request pending until
we are about to leave tcg_cpu_exec. Also, immediately break out of the
SMP loop if the request is set, do not run till the end of the chain.
This preserves the VCPU scheduling order in SMP mode.

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-22 05:52:09 +02:00
Jan Kiszka f8ca7b43a5 Init qemu_system_cond
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-22 05:52:09 +02:00
Jan Kiszka b0052d1531 Fix cpu_unlink_tb race
If a signal hit after the env->exit_request check but before cpu_exec
updated env->current_tb, cpu_unlink_tb called from the signal hander
will not unlink the current TB. This may leave us stuck in a guest loop
if no further unlink is invoked.

Fix this by reordering current_tb update and exit_request check,
additionally enforcing the correct order via a compiler barrier.

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-22 05:52:09 +02:00
Jan Kiszka 1d93f0f03d Introduce proper compiler barrier
Define barrier() as optimization barrier and replace (potentially
unreliable) asm("") fences.

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-22 05:52:08 +02:00
Amit Shah 1e29a009e3 virtio-serial: Fix compat property name
Starting with qemu -M pc-0.12 -device virtio-serial

results in

-device virtio-serial: Property 'virtio-serial-pci.max_nr_ports' not found

The property name 'max_ports' is incorrectly named 'max_nr_ports'. Fix
that.

Also fix the ppc440 machine type bamboo-0.12 which has this typo.

Reported-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-07-22 05:52:08 +02:00
Laurent Vivier 6d1db8c34e linux-user: display cpu list.
As it is done for qemu-system with "-cpu ?", when cpu_list_id() is missing
for a target, call cpu_list() instead.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-07-22 05:52:08 +02:00
Bob Breuer 9a62fb241c Sparc32: reserve addresses for unimplemented devices on SS-20
Use empty_slot to reserve addresses for several unimplemented devices so they won't fault.
 - BPP (parallel port), DBRI (audio), SX (pixel processor), and vsimms (framebuffer)
OBP for SS-20 either assumes these devices exist or probes without expecting faults.

Signed-off-by: Bob Breuer <breuerr@mc.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-07-20 21:12:01 +00:00
Michael S. Tsirkin d154e0bafb vhost: fix miration during device start
We need to know ring layout to allocate log buffer.
So init rings first.

Also fixes a theoretical memory-leak-on-error.

https://bugzilla.redhat.com/show_bug.cgi?id=615228

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Gerd Hoffmann <kraxel@redhat.com>
2010-07-19 14:20:00 +03:00
Michael S. Tsirkin 55e8d1ce6b e1000: secrc support
Add support for secrc field. Reportedly needed by old RHEL guests.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-07-19 13:49:19 +03:00
Michael S. Tsirkin b0b900070c e1000: fix access 4 bytes beyond buffer end
We do range check for size, and get size as buffer,
but copy size + 4 bytes (4 is for FCS).
Let's copy size bytes but put size + 4 in length.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-07-19 13:49:19 +03:00
Aurelien Jarno 488243b0e9 target-ppc: fix power mode checking on 7400/7410
Only the PowerPC 7440/7450 family don't support DOZE mode. PowerPC
7400 and 7410 support it.
2010-07-19 00:33:29 +02:00
Aurelien Jarno 3fc00a7bde target-mips: fix xtlb exception for loongson
Loongson 2E and 2F use the same entry for xtlb and tlb exception, at
offset 0x000.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-07-17 16:13:12 +02:00
Anthony Liguori 08218b3527 Merge remote branch 'origin/master' into staging 2010-07-16 08:01:16 -05:00
Edgar E. Iglesias 187b4e08d3 microblaze: Correct signal frame setup.
Pass the context in r7.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-07-15 15:32:51 +02:00
Anthony Liguori c84995c50b Merge remote branch 'origin/master' into staging 2010-07-15 08:19:53 -05:00
Anthony Liguori c7ba56c4f0 Merge remote branch 'kwolf/for-anthony' into staging 2010-07-15 08:17:57 -05:00