sim-card
/
qemu
Archived
10
0
Fork 0
Commit Graph

17099 Commits

Author SHA1 Message Date
Pavel Borzenkov c18a1c8805 vmdk: remove unneeded variable assignment
Spotted by Clang Analyzer

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-10-26 13:36:35 +01:00
Stefan Weil bff39b6360 device_tree: Fix potential memory leak
cppcheck error report:

device_tree.c:156: error: Memory leak: dupname

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-10-26 13:36:34 +01:00
Stefan Weil 0ec024f636 main-loop: Add missing include file
stdint.h defines the POSIX data types and is needed
for MinGW-w64 (and maybe other hosts).

v2: Instead of adding stdint.h directly, qemu-common.h is now
included and duplicate include statements were removed.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-10-25 15:38:08 -05:00
Stefan Weil d300854b1c target-sparc: Fix use of g_new0 / g_free
g_malloc0 needs g_free instead of free.
While fixing this, I also replaced g_malloc0 by g_new0
as was suggested by Stuart Brady.

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-25 19:30:33 +00:00
Stefan Weil f37e2a6bb3 target-sparc: Fix order of function parameters
The MinGW-w64 gcc complains about wrong parameters for
gen_helper_fpadd16_s and three other functions.

gen_helper_fpadd16_s is declared like this (hidden in lots of macros):

static inline void
 gen_helper_fpadd16s(TCGv_i32 retval, TCGv_ptr arg1,
                     TCGv_i32 arg2, TCGv_i32 arg3);

So it looks like cpu_env should be the 2nd parameter.

Please review this patch as I have no environment to test it
(maybe the 1st parameter should be cpu_dst?).

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-25 19:30:00 +00: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
Stefan Weil d9676f82e5 libcacard: Fix wrong assertion (reported by cppcheck)
assert("...") will never do anything. This assertion handles a case
which should never occur, so it must be assert(!"...").

Cc: Alon Levy <alevy@redhat.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2011-10-25 15:44:03 +02:00
Alon Levy e7c5e89318 libcacard/vscclient: fix error paths for socket creation
Signed-off-by: Alon Levy <alevy@redhat.com>
2011-10-25 15:44:02 +02:00
Alon Levy 7fc7e5844c libcacard/cac: fix typo in cac_delete_pki_applet_private
Signed-off-by: Alon Levy <alevy@redhat.com>
2011-10-25 15:44:02 +02:00
Gerd Hoffmann 08cc67f32e spice: fix file handle cleanup
Setting both read and write handlers to NULL in qemu_set_fd_handler
is not enougth to make qemu purge the file handle from the list.
We must set opaque to NULL too.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-10-25 14:00:54 +02: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
Alon Levy 3bb781f3ed ui/spice-core: fix segfault in monitor
Fix segfault if a qxl device is present but no spice command line
argument is given.

RHBZ 743251.

Signed-off-by: Alon Levy <alevy@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
Jan Kiszka f9ab6091b0 spice: Convert core to QEMU thread API
No need to use pthread directly, we have proper abstractions for
identity checking.

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
Yonit Halperin 026f773f56 spice: support the new migration interface (spice 0.8.3)
- call spice_server_migrate_(start|end|connect).
- register spice_migrate_connect completion callback

Signed-off-by: Yonit Halperin <yhalperi@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-10-25 14:00:53 +02:00
Yonit Halperin edc5cb1a52 spice: turn client_migrate_info to async
RHBZ 737921
Spice client is required to connect to the migration target before/as migration
starts. Since after migration starts, the target qemu is blocked and cannot accept new spice client
we trigger the connection to the target upon client_migrate_info command.
client_migrate_info completion cb will be called after spice client has been
connected to the target (or a timeout). See following patches and spice patches.

Signed-off-by: Yonit Halperin <yhalperi@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-10-25 14:00:53 +02:00
Gerd Hoffmann afe2df69cf migration: add status query functions
Add migration_is_active and migration_has_failed functions
to query migration state.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-10-25 13:59:25 +02:00
Avi Kivity 21e87c4625 i386: wire up MSR_IA32_MISC_ENABLE
It's needed for its default value - bit 0 specifies that "rep movs" is
good enough for memcpy, and Linux may use a slower memcpu if it is not set,
depending on cpu family/model.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-10-24 21:33:32 -02:00
Liu, Jinsong aa82ba549a kvm: support TSC deadline MSR with subsection
KVM add emulation of lapic tsc deadline timer for guest.
This patch is co-operation work at qemu side.

Use subsections to save/restore the field (mtosatti).

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-10-24 21:29:07 -02:00
Marcelo Tosatti 38d2c27ea6 Revert "kvm: support TSC deadline MSR"
This reverts commit bfc2455ddb.
New patch with subsections will follow.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-10-24 21:27:16 -02:00
Avi Kivity 1cae88b9f4 kvm: avoid reentring kvm_flush_coalesced_mmio_buffer()
mmio callbacks invoked by kvm_flush_coalesced_mmio_buffer() may
themselves indirectly call kvm_flush_coalesced_mmio_buffer().
Prevent reentering the function by checking a flag that indicates
we're processing coalesced mmio requests.

Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-24 21:26:53 -02:00
Jan Kiszka 626c427624 kvm: Add top-like kvm statistics script
Taken from original qemu-kvm/kvm/kvm_stat.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-24 21:26:53 -02:00
Jan Kiszka 5f6caa4f2b kvm: Add tool for querying VMX capabilities
Taken from original qemu-kvm/kvm/scripts/vmxcap.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-24 21:26: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
Fabien Chouteau db418a0a7e Add stdio char device on windows
Simple implementation of an stdio char device on Windows.

Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-23 15:44:15 +00:00
Blue Swirl 070af38404 Sparc: split CWP and PSTATE op helpers
Move CWP and PSTATE op helpers to win_helper.c.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-23 15:10:18 +00:00
Blue Swirl 2ffd9176b1 Sparc: avoid AREG0 for lazy condition code helpers
Make lazy condition code helpers take a parameter for CPUState instead
of relying on global env.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-23 15:09:37 +00:00
Blue Swirl cffc581873 Sparc: split lazy condition code handling op helpers
Move lazy condition code handling op helpers to cc_helper.c.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-23 15:09:28 +00:00
Blue Swirl 2e2f4ade86 Sparc: avoid AREG0 for float and VIS ops
Make floating point and VIS ops take a parameter for CPUState instead
of relying on global env.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-23 15:09:13 +00:00
Blue Swirl 1bccec25e1 Sparc: split FPU and VIS op helpers
Move FPU op helpers to fop_helper.c. Move VIS op helpers to vis_helper.c,
compile it only for Sparc64.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-23 15:08:56 +00:00
Blue Swirl 99ca02195c Sparc: fix coding style
Before the next patches, fix coding style of the areas affected.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-23 15:08:45 +00:00
Blue Swirl bc2653195a Sparc: avoid AREG0 for raise_exception and helper_debug
Make raise_exception() and helper_debug() take a parameter for
CPUState instead of relying on global env. Move the functions
to helper.c.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-23 15:08:22 +00:00
Blue Swirl 2336c1f197 Sparc: move trivial functions from op_helper.c
These functions don't need access to CPUState or already pass it,
so relocating them from op_helper.c to helper.c and int64_helper.c
is trivial.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-23 15:08:10 +00:00
Blue Swirl ab3b491f21 Sparc: split helper.c
Move CPU init to cpu_init.c and interrupt handling to int32_helper.c
for Sparc32 and int64_helper.c for Sparc64.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-23 15:07:52 +00:00
Blue Swirl c65f6fd4bc Sparc: fix coding style
Before the next patch, fix coding style of the areas affected.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-23 15:05:30 +00: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 99435906cc simplify main loop functions
Provide a clean example of how to use the main loop in the tools.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-10-21 18:14:31 +02:00
Paolo Bonzini be08e65e01 Revert to a hand-made select loop
This reverts commit c82dc29a91
and 4d88a2ac86.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-10-21 18:14:30 +02:00
Paolo Bonzini d3b12f5dec main-loop: create main-loop.c
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-10-21 18:14:30 +02:00
Paolo Bonzini 44a9b356ad main-loop: create main-loop.h
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-10-21 18:14:30 +02:00
Paolo Bonzini fbdc14ebf8 qemu-timer: do not use RunState change handlers
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-10-21 18:14:30 +02:00
Paolo Bonzini 2ff68d0738 qemu-timer: move more stuff out of qemu-timer.c
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-10-21 18:14:30 +02:00
Paolo Bonzini 4260a73911 qemu-timer: use atexit for quit_timers
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-10-21 18:14:30 +02:00
Paolo Bonzini a5c57d64aa qemu-timer: do not refer to runstate_is_running()
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-10-21 18:14:30 +02:00