Ian Jackson [Thu, 16 Oct 2008 09:29:00 +0000 (10:29 +0100)]
enable usb uhci save/restore
enables the usb uhci save and restore functions that
for some reasons were commented out.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
[ These were commented out in 1e4146791b46f0a798589c58a09f18b2841a9212
aka svn://svn.savannah.nongnu.org/qemu/trunk@3609 c046a42c-6fe2-441c-8c8c-71466251a162
apparently by mistake. This commit reverts 1e414679
-Ian Jackson ]
Ian Jackson [Thu, 16 Oct 2008 09:29:00 +0000 (10:29 +0100)]
enable usb uhci save/restore
enables the usb uhci save and restore functions that
for some reasons were commented out.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
[ These were commented out in 1e4146791b46f0a798589c58a09f18b2841a9212
aka svn://svn.savannah.nongnu.org/qemu/trunk@3609 c046a42c-6fe2-441c-8c8c-71466251a162
apparently by mistake. This commit reverts 1e414679
-Ian Jackson ]
Ian Jackson [Tue, 14 Oct 2008 10:46:53 +0000 (11:46 +0100)]
Fix blktap device backend patch check
Regarding http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1367,
it appears that the expected backend path check is too strict for'
blktap devices. Therefore if the devtype is `vbd' we allow the
backend to be `tap'.
Thanks to report and inspiration from Yosuke Iwamatsu.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Thu, 9 Oct 2008 13:50:51 +0000 (14:50 +0100)]
Fix open_disk for blktap disks to use real bdrv_new
If blktap drives are registered properly, qemu code is much less likely
to get confused by them. Use bdrv_new(), assign a device name and create
an entry in drives_table for them.
aliguori [Wed, 8 Oct 2008 19:50:24 +0000 (19:50 +0000)]
Fix IO performance regression in sparc
Replace signalfd with signal handler/pipe. There is no way to interrupt
the CPU execution loop when a file descriptor becomes readable. This
results in a large performance regression in sparc emulation during
bootup.
This patch switches us to signal handler/pipe which was originally
suggested by Ian Jackson. The signal handler lets us interrupt the
CPU emulation loop while the write to a pipe lets us avoid the
select/signal race condition.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5451 c046a42c-6fe2-441c-8c8c-71466251a162
aliguori [Tue, 7 Oct 2008 20:39:39 +0000 (20:39 +0000)]
machine struct - specify max_cpus at the per machine level (Jes Sorensen)
Introduce a max_cpus per-machine variable, allowing individual boards
to limit it's number of CPUs. Check requested number of CPUs in setup
code and exit if it exceeds the supported number for the machine.
This also renders the static MAX_CPUS check obsolete, so remove this
from vl.c.
aliguori [Tue, 7 Oct 2008 19:16:17 +0000 (19:16 +0000)]
Add sparse checker support to the build system (Gerd Hoffman)
This adds support for running the sparse checker during the build
process. Left it off by default for now, build becomes very noisy with
sparse checking turned on as it has to complain alot (partly even in the
system headers!). The qemu code base needs quite some cleanups before
we should consider turning it on by default.
aliguori [Mon, 6 Oct 2008 20:21:51 +0000 (20:21 +0000)]
Switch the memory savevm handler to be "live"
This patch replaces the static memory savevm/loadvm handler with a "live" one.
This handler is used even if performing a non-live migration.
The key difference between this handler and the previous is that each page is
prefixed with the address of the page. The QEMUFile rate limiting code, in
combination with the live migration dirty tracking bits, is used to determine
which pages should be sent and how many should be sent.
The live save code "converges" when the number of dirty pages reaches a fixed
amount. Currently, this is 10 pages. This is something that should eventually
be derived from whatever the bandwidth limitation is.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5437 c046a42c-6fe2-441c-8c8c-71466251a162
aliguori [Mon, 6 Oct 2008 14:53:52 +0000 (14:53 +0000)]
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
aliguori [Mon, 6 Oct 2008 13:55:43 +0000 (13:55 +0000)]
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
aliguori [Mon, 6 Oct 2008 13:52:44 +0000 (13:52 +0000)]
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
malc [Thu, 2 Oct 2008 20:02:27 +0000 (20:02 +0000)]
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)
Ian Jackson [Thu, 2 Oct 2008 13:22:41 +0000 (14:22 +0100)]
Avoid trusting client-controlled areas of xenstore.
Various parts of xenstore, specifically /local/GUEST/devices, are
writeable by the guest. Information from these areas must be used
with care, to avoid the guest tricking qemu-dm into improperly using
its privileged access to dom0 resources.
To this end:
* Variables and functions referring to client-controlled data have
had `danger' added to their names.
* There is a new sanitisation/checking arrangement for getting
backend paths and information about the configuration of device
backends, given the frontend information. This is so that when
qemu is providing a data path which is parallel to the PV
frontend/backend arrangements, it only uses the configuration from
a genuine backend which is really configured to serve qemu's own
guest.
* For information which should be read from or written to the `vm'
tree, we obtain the guest's uuid from the hypervisor (the `label'
as the hypercall interface calls it) rather than reading it from
the guest-controlled areas of xenstore.
* The `phantom vbd' feature is disabled. It relies on
guest-controlled xenstore areas indicating device paths on the
guest. We do not believe this feature is currently very relevant.
* We _do_ allow the guest of a stubdom qemu to mess up the
correspondence between pv backends and emulated devices, in the
sense that we don't mind if the guest directs qemu to use a `wrong'
frontend.
aurel32 [Wed, 1 Oct 2008 22:01:37 +0000 (22:01 +0000)]
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.
aurel32 [Wed, 1 Oct 2008 21:45:51 +0000 (21:45 +0000)]
fix default size handling in monitor
If /i format is used once (with x/xp/p command) default_fmt_size is set
to -1 and subsequent commands of the form /x outputs nothing. Included
patched fixes this by setting default_fmt_size only if the command is
not of format /i.
Ian Jackson [Wed, 1 Oct 2008 11:12:57 +0000 (12:12 +0100)]
vnc integer overflow check fix overzealous zero checking
In a83c1174b942d0f0f0e05927eb5b69fe8489b7ab, we arranged to avoid
integer overflow and calls to realloc(nonzero,0). However
vs->depth==0 is legitimate on entry to vnc_dpy_resize_shared.
We need to move the check for vs->depth until after vnc_colourdepth.