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

5423 Commits

Author SHA1 Message Date
aliguori 9366f41860 Introduce v3 of savevm protocol
The current savevm/loadvm protocol has some draw backs.  It does not support
the ability to do progressive saving which means it cannot be used for live
checkpointing or migration.  The sections sizes are 32-bit integers which
means that it will not function when using more than 4GB of memory for a guest.
It attempts to seek within the output file which means it cannot be streamed.
The current protocol also is pretty lax about how it supports forward
compatibility.  If a saved section version is greater than what the restore
code support, the restore code generally treats the saved data as being in
whatever version it supports.  This means that restoring a saved VM on an older
version of QEMU will likely result in silent guest failure.

This patch introduces a new version of the savevm protocol.  It has the
following features:

 * Support for progressive save of sections (for live checkpoint/migration)
 * An asynchronous API for doing save
 * Support for interleaving multiple progressive save sections
   (for future support of memory hot-add/storage migration)
 * Fully streaming format
 * Strong section version checking

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5434 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-06 14:53:52 +00:00
aliguori 74576198d7 Add dirty tracking for live migration
This patch adds a dirty tracking bit for live migration.  We use 0x08 because
kqemu uses 0x04.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5433 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-06 14:02:03 +00:00
aliguori c6ca28d636 Add bdrv_flush_all()
This patch adds a bdrv_flush_all() function.  It's necessary to ensure that all
IO operations have been flushed to disk before completely a live migration.

N.B. we don't actually use this now.  We really should flush the block drivers
using an live savevm callback to avoid unnecessary guest down time.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5432 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-06 13:55:43 +00:00
aliguori d8f4460989 Allow the monitor to be suspended during non-blocking op
Live migration happens in the background, but it is useful to make the monitor
command appear as if it's blocking.  This allows a management tool to
immediately know when the live migration has completed without having to poll
the migration status.

This patch allows the monitor to be suspended from a monitor callback which
will prevent new monitor commands from being executed.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5431 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-06 13:52:44 +00:00
blueswir1 1ed1a78738 Silence some warnings about no value returned from non-void function
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5430 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-05 11:47:55 +00:00
blueswir1 60dd316ea7 Make various generated structures static
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5429 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-05 11:45:25 +00:00
blueswir1 249c4c328c Make target_sigaltstack_used static
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5428 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-05 11:09:37 +00:00
blueswir1 440c7e85cc Export x86_stack_size in qemu.h
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5427 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-05 11:05:14 +00:00
blueswir1 9f106a75de Make ioctl table static
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5426 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-05 10:52:52 +00:00
blueswir1 b39bc503c1 Make bitmask tables static const
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5425 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-05 10:51:10 +00:00
blueswir1 8e853dc780 Make struct_termios_def const
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5424 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-05 10:49:32 +00:00
blueswir1 295e390fff Move wav_start_capture prototype to avoid a warning with -Wmissing-prototypes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5423 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-05 10:30:43 +00:00
blueswir1 8869defe62 Make audio_pcm_opsstatic const
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5422 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-05 10:01:05 +00:00
blueswir1 d4a9eb1fc6 Add some missing static and const qualifiers, reg_names only used if NDEBUG set
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5421 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-05 09:59:14 +00:00
blueswir1 d9b630fdb0 Variable logfilename is not used outside exec.c
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5420 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-05 09:57:08 +00:00
blueswir1 41bd639b26 Variable autostart is not used outside main()
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5419 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-05 09:56:21 +00:00
blueswir1 34a3d2399b Update Sparc docs, add -cpu flag
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5418 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-04 20:43:39 +00:00
balrog 000cacf6f9 Fix crc32w decoding, fix a constant width in blendvpd.
Forced the constant's width to long long so that it doesn't overflow,
problem spotted by C. W. Betts.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5417 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-04 11:33:52 +00:00
blueswir1 9dc63a1efd Make network packet debug functions more accessible
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5416 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-04 07:25:46 +00:00
blueswir1 bdaf78e09b Add some missing static qualifiers
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5415 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-04 07:24:27 +00:00
blueswir1 2bfdab638a Move nographic export to sysemu.h
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5414 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-04 07:22:29 +00:00
blueswir1 3b3fb32229 Use qemu-log.h
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5413 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-04 07:20:07 +00:00
balrog fdb0d09d02 x86 "popcnt" affects flags.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5412 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-04 03:32:00 +00:00
balrog 222a3336ec Implement SSE4.1, SSE4.2 (x86).
This adds support for CPUID_EXT_SSE41, CPUID_EXT_SSE42, CPUID_EXT_POPCNT
extensions.  Most instructions haven't been tested yet.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5411 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-04 03:27:44 +00:00
balrog 06adb549e6 Improve pflash cfi01 debug messages (Thomas Petazzoni).
This patches slightly improves the debugging messages in pflash_read()
and pflash_write().

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5410 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-03 23:09:08 +00:00
balrog 3656744cdd Reset CFI01 flash wcycle after erase confirm (Thomas Petazzoni).
pfl->wcycle was set to 1 when the erase confirm command was set, which
lead to the next command being misinterpreted by Qemu:

pflash_write: Unimplemented flash cmd sequence (offset 00000000,
wcycle 0x1 cmd 0x20 value 0x70)

This patch fixes this issue by resetting pfl->wcycle to 0 on erase
confirm so that the next command is considered as a new one.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5409 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-03 23:00:09 +00:00
blueswir1 f4b1a842d7 Rearrange tick functions
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5408 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-03 19:04:42 +00:00
blueswir1 48585ec51d Fix missing prototype warnings by moving declarations
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5407 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-03 19:02:42 +00:00
blueswir1 3e46b2ef2a Fix warning about unused function
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5406 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-03 19:01:41 +00:00
blueswir1 674a24acf7 Fix warning about missing return value
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5405 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-03 19:00:40 +00:00
malc 3ee1b8550c Optimize 64 bit bswap
Use rldimi instead of rldicr/or pair, saves us one instruction.
Suggested by Hollis Blanchard.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5404 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-02 20:02:31 +00:00
malc bdadc0b5b6 Do not use load_seg_vm to load CS in real mode iret handling
load_seg_vm calls cpu_x86_load_seg_cache which updates hflags of
current env, real hardware doesn't do this, nor the code that handles
real mode lret/lcall/ljmp.

This unbreaks "unreal mode" and makes QEMU the first emulator being
able to run Project Angel demo by IMPACT Studios. (Not that there are
many physical machines out there capable of doing the same)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5403 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-02 20:02:27 +00:00
blueswir1 78f5bf1e6f Include qemu-common.h in order to get prototypes for qemu_malloc etc.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5402 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-02 19:55:50 +00:00
blueswir1 b6c4f71f50 Resurrect the safe part of r5274
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5401 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-02 19:14:17 +00:00
blueswir1 09bc878a13 Make PCI class description tables const
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5400 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-02 18:33:50 +00:00
blueswir1 8662d656ea Make monitor command tables const
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5399 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-02 18:32:44 +00:00
blueswir1 7a786a46b0 Make some i386 disassembler tables const
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5398 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-02 18:29:22 +00:00
blueswir1 c7cd6a3742 Make CPULogItem tables const
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5397 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-02 18:27:46 +00:00
blueswir1 be7fb97f8a Make keysym tables const
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5396 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-02 18:26:42 +00:00
blueswir1 88b4e9dbe2 Make some tables const
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5395 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-02 18:24:21 +00:00
blueswir1 daa41b0010 Sun ss20 OBP does 32bit register access to esp (Robert Reif)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5394 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-02 18:07:56 +00:00
blueswir1 9827e450e4 Fix MXCC printf warning (based on patch by Robert Reif)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5393 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-02 18:06:50 +00:00
ths 012a70458f Add missing parenthesis in qemu_ram_alloc()
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5392 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-02 17:34:21 +00:00
aurel32 ee600be6a6 ppc: fix crash in ppc system single step support
There was a bogus case where two system debug ops get generated.  This
patch removes the broken system debug op. This was a left over after
making some changes to correctly generate debug ops on branch
operations inside gen_goto_tb();

The test case against this patch is to turn on single stepping with
timers, boot a linux kernel, set a breakpoint a do_fork and in gdb
execute "si 3000".  Then qemu-system-ppc will fault executing a debug
op, which should not have been executed.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5391 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-01 22:01:37 +00:00
aurel32 3003b8bbf9 Reset CPU on INIT IPI
INIT IPI should reset CPU. Also non boot CPU should be halted. It will
be un-halted by SIPI.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5390 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-01 22:01:28 +00:00
aurel32 ede46085c2 Fix cscope filelist by removing leading ./
(Ryan Harper, Laurent Desnogues)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5389 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-01 21:46:58 +00:00
aurel32 39b5976356 Add inotify syscall family
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5388 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-01 21:46:50 +00:00
aurel32 04bb9acec6 Add mincore syscall
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5387 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-01 21:46:41 +00:00
aurel32 408321b61f Add fadvise64 stubs
Since these are only hints, we happily fake them for now
to make applications not barf on ENOSYS.

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5386 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-01 21:46:32 +00:00
aurel32 f0f72ffe64 qemu: improve scsi dma speed by increasing the dma buffer size
taken from Xen 17267:f4a92f0db20f, original patch by Samuel Thibault.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5385 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-01 21:46:23 +00:00