aliguori [Fri, 24 Oct 2008 21:55:17 +0000 (21:55 +0000)]
Live migration for Win32 (Hervé Poussineau)
This patch fixes migration so that it works on Win32. This requires using
socket specific calls since sockets cannot be treated like file descriptors
on win32.
aliguori [Fri, 24 Oct 2008 14:11:41 +0000 (14:11 +0000)]
Fix windows build after migration changes
The live migration code broke the windows build. As part of this
change, I've switched the BIOS path to C:\Program Files\Qemu instead of
/c/Program Files/Qemu. The later is only valid when launching from MSYS
but the former is always valid.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5524 c046a42c-6fe2-441c-8c8c-71466251a162
aurel32 [Fri, 24 Oct 2008 13:12:42 +0000 (13:12 +0000)]
hw/pc: don't register the memory hole as unassigned twice
Since revision 5228, we don't register the memory hole (0xa00000 to
0xfffff) anymore. As a consequence, we don't need to register it again
as unassigned.
edgar_igl [Fri, 24 Oct 2008 09:18:39 +0000 (09:18 +0000)]
ETRAX-FS: Drop DMA polling for ethernet.
* Drop DMA poll mode. Instead immediately push rx frames straight into the DMA
without waiting for DMA_run to poll them of the fifo.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5520 c046a42c-6fe2-441c-8c8c-71466251a162
pbrook [Wed, 22 Oct 2008 15:11:31 +0000 (15:11 +0000)]
* Use function pointers for symbol lookup (currently for elf32 and elf64,
could be expanded). This also fixes the bug with mips elf64 symbols
in current Qemu trunk.
* Use quicksort and binary search for symbol lookup.
* Remove unneeded entries from symbol table. This reduced a typical table
size (linux mips kernel) from 1764487 to 11656 entries.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5510 c046a42c-6fe2-441c-8c8c-71466251a162
aliguori [Tue, 21 Oct 2008 16:27:28 +0000 (16:27 +0000)]
Fix broken USB support for Linux host (Bjorn Danielsson)
Make "host:" usb devices work again on systems that have the
file /proc/bus/usb/devices. This was broken in r5441 due to
incorrect logic for the USB_FS_SYS case in usb_host_scan().
bellard [Fri, 17 Oct 2008 17:28:58 +0000 (17:28 +0000)]
allow SLIRP to make an ARP request to get the client MAC address. It is useful if an inbound connection is done to a VM which did not send outbound IP packets
aurel32 [Fri, 17 Oct 2008 08:08:56 +0000 (08:08 +0000)]
scsi-generic: correct error management
this patch allows to fully use a tape device connected to qemu through
the scsi-generic interface.
Previous patch introduced tape SCSI commands management, this one
improve error case management:
- the SCSI controller command completion must be called with the status
value, not the sense value. In the case of scsi-generic, the SCSI status
is given by the field status of sg_io_hdr_t (the value is left shifted
by one regarding status codes defined in /usr/include/scsi/scsi.h)
- when a read is aborted due to a mark/EOF/EOD/EOM, the len reported to
controller can be 0. LSI controller emulation doesn't know how to manage
this. A workaround found is to call the completion routine with
SCSI_REASON_DONE just after calling it with SCSI_REASON_DATA with len=0.
This patch also manages correctly the block size of the tape device.
This patch has been tested with a real tape device "HP C5683A", linux
guest (debian etch) and tools like "mt", "tar" and "btape".
Windows guest is not better supported than before...
aurel32 [Fri, 17 Oct 2008 08:08:48 +0000 (08:08 +0000)]
i386/SVM: return amount of ASIDs
With SVM the TLB supports tagging to distinguish TLB entries from
different virtual CPUs. This tag is called an ASID. The amount of ASIDs is
given in EBX of the SVM-CPUID-leaf. Currently we return 0, which might
break hypervisors. Let's better return something >0 here, say 0x10.
Since we're flushing the complete TLB on every VM entry and exit we're not
making use of the ASID information anyways.
aurel32 [Tue, 14 Oct 2008 19:20:52 +0000 (19:20 +0000)]
target-i386: Add Core Duo Definition
This patch adds a CPU definition for the Core Duo CPU. I tried to
resemble the original as closely as possible and document what features
are missing still. This patch enables the use of a recent CPU definition
on 32 bit platforms.
It also fixes two issues that went along the line:
- invalid xlevel in core2duo spec
While looking though the CPUIDs again, I found that xlevel is actually 8.
- non-PSE36 support
The CoreDuo CPUID does not expose the PSE36 capability, but CPUID
0x80000008 is tied to 36 bits. This broke Windows XP installation for
me, so I just set it to 32 bits width when PSE36 is not available. The
original CPU also exposes 32 bit width in CPUID 0x80000008.
aliguori [Tue, 14 Oct 2008 14:42:54 +0000 (14:42 +0000)]
Expand cache= option and use write-through caching by default
This patch changes the cache= option to accept none, writeback, or writethough
to control the host page cache behavior. By default, writethrough caching is
now used which internally is implemented by using O_DSYNC to open the disk
images. When using -snapshot, writeback is used by default since data integrity
it not at all an issue.
cache=none has the same behavior as cache=off previously. The later syntax is
still supported by now deprecated. I also cleaned up the O_DIRECT
implementation to avoid many of the #ifdefs.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5485 c046a42c-6fe2-441c-8c8c-71466251a162
aurel32 [Mon, 13 Oct 2008 21:08:17 +0000 (21:08 +0000)]
linux-user: fix getdents* syscalls
glibc's structs dirent and dirent64 is different from in-kernel dirent
and dirent64. Kernel headers doesn't provide structs dirent(64) any
more. So we should add it to qemu headers.
To avoid conflict with glibc it called struct linux_dirent(64).
aliguori [Mon, 13 Oct 2008 03:12:02 +0000 (03:12 +0000)]
Introduce UI for live migration
This patch introduces a command line parameter and monitor command for starting
a live migration. The next patch will provide an example of how to use these
parameters.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5476 c046a42c-6fe2-441c-8c8c-71466251a162
aliguori [Mon, 13 Oct 2008 03:10:22 +0000 (03:10 +0000)]
Introduce a buffered file wrapper for QEMUFile
This patch introduces a buffered QEMUFile wrapper. This allows QEMUFile's to be
rate limited. It also makes it easier to implement a QEMUFile that is
asynchronous since the current QEMUFile API requires that all reads and writes
be synchronous.
The only real non-obvious part of the API is the "frozen" concept. If the
backend returns EAGAIN, the QEMUFile is said to be "frozen". This means no
additional output will be sent to the backend until the file is unfrozen.
qemu_file_put_notify can be used to unfreeze a frozen file.
A synchronous interface is also provided to wait for an unfreeze event. This is
used during the final part of live migration when the VM is no longer running.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5475 c046a42c-6fe2-441c-8c8c-71466251a162
aliguori [Mon, 13 Oct 2008 03:07:56 +0000 (03:07 +0000)]
Fix some issues with QEMUFile
This patch allows QEMUFile's read and write operations to return
negative error codes. This is necessary to detect things like closed
streams during live migration.
It also removes unused code for QEMUFileFD write path. Finally, it
makes sure to avoid attempting to flush an output buffer if the file
is only being used for input. This was spotted by Uri Lublin.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5474 c046a42c-6fe2-441c-8c8c-71466251a162
aurel32 [Sun, 12 Oct 2008 23:32:40 +0000 (23:32 +0000)]
SH4: Fix swap.b
The SH4 manual documents the swap.b instruction as follows:
SWAP.B Rm,Rn
Rm → swap lower 2 bytes → Rn
Current QEMU code, in addition to the above, also clears the high
16 bits. The immediate breakage I saw is that htonl function applied
to netmask of 255.255.255.0 gives 0, which breaks all networking.
balrog [Sat, 11 Oct 2008 09:19:57 +0000 (09:19 +0000)]
Increase write buffer size in pflash emulation (Thomas Petazzoni).
The current flash emulation code advertises a write buffer size of 16
bytes (1 << 4, according to offset 0x2A of the CFI table). This is
very small compared to normal write buffer sizes, and makes the
process of writing to the flash very slow (at least from U-Boot).
This patch increases this size to 2048 bytes. Except the modification
of the CFI table, the only other required modification is to use
"value" instead of "cmd" to set pfl->counter, because cmd is truncated
to the 8 lower bits of value, while the number of bytes for a write
can now be greater than 255 bytes.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5454 c046a42c-6fe2-441c-8c8c-71466251a162
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.