sdk/emulator/qemu.git
16 years agoFix undeclared symbol warnings from sparse
blueswir1 [Sun, 26 Oct 2008 13:43:07 +0000 (13:43 +0000)]
Fix undeclared symbol warnings from sparse

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5539 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix incorrect use of pstrcpy (malc)
blueswir1 [Sun, 26 Oct 2008 10:22:11 +0000 (10:22 +0000)]
Fix incorrect use of pstrcpy (malc)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5538 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix undefined pthread_sigmask warning on FreeBSD (Juergen Lock)
blueswir1 [Sun, 26 Oct 2008 09:54:50 +0000 (09:54 +0000)]
Fix undefined pthread_sigmask warning on FreeBSD (Juergen Lock)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5537 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoChange freeing method because the allocation function was changed in r5532
blueswir1 [Sat, 25 Oct 2008 13:48:59 +0000 (13:48 +0000)]
Change freeing method because the allocation function was changed in r5532

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5536 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoSilence warnings about unused variables
blueswir1 [Sat, 25 Oct 2008 11:47:20 +0000 (11:47 +0000)]
Silence warnings about unused variables

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5535 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoSuppress a GCC warning about unused function
blueswir1 [Sat, 25 Oct 2008 11:26:41 +0000 (11:26 +0000)]
Suppress a GCC warning about unused function

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5534 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix GCC 4 signedness warning
blueswir1 [Sat, 25 Oct 2008 11:25:48 +0000 (11:25 +0000)]
Fix GCC 4 signedness warning

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5533 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoReplace uses of strndup (a GNU extension) with Qemu pstrdup
blueswir1 [Sat, 25 Oct 2008 11:23:27 +0000 (11:23 +0000)]
Replace uses of strndup (a GNU extension) with Qemu pstrdup

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5532 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoReplace uses of strncpy (a GNU extension) with Qemu pstrcpy
blueswir1 [Sat, 25 Oct 2008 11:21:28 +0000 (11:21 +0000)]
Replace uses of strncpy (a GNU extension) with Qemu pstrcpy

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5531 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix undefined pthread_sigmask warning on OpenBSD
blueswir1 [Sat, 25 Oct 2008 11:19:14 +0000 (11:19 +0000)]
Fix undefined pthread_sigmask warning on OpenBSD

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5530 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoUse snprintf to please OpenBSD linker
blueswir1 [Sat, 25 Oct 2008 11:18:12 +0000 (11:18 +0000)]
Use snprintf to please OpenBSD linker

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5529 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix a bad memcpy length (Bruce Rogers).
balrog [Sat, 25 Oct 2008 00:10:20 +0000 (00:10 +0000)]
Fix a bad memcpy length (Bruce Rogers).

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5528 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix whitespace in migration code.
aliguori [Fri, 24 Oct 2008 22:10:31 +0000 (22:10 +0000)]
Fix whitespace in migration code.

Replace tabs with spaces.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5527 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix possibly SEGV in tcp migration error case.
aliguori [Fri, 24 Oct 2008 22:08:22 +0000 (22:08 +0000)]
Fix possibly SEGV in tcp migration error case.

Spotted by hpoussin.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5526 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoLive migration for Win32 (Hervé Poussineau)
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.

Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5525 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix windows build after migration changes
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

16 years agoAdd missing return statement (fixes compiler warning).
aurel32 [Fri, 24 Oct 2008 13:12:52 +0000 (13:12 +0000)]
Add missing return statement (fixes compiler warning).

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5523 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agohw/pc: don't register the memory hole as unassigned twice
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.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5522 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix typos in PPC TCG conversion.
pbrook [Fri, 24 Oct 2008 12:03:16 +0000 (12:03 +0000)]
Fix typos in PPC TCG conversion.

Signed-off-by: Paul Brook <paul@codesourcery.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5521 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoETRAX-FS: Drop DMA polling for ethernet.
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

16 years agoprotect exec-all.h frm multiple inclusion (Glauber Costa)
aliguori [Thu, 23 Oct 2008 13:52:00 +0000 (13:52 +0000)]
protect exec-all.h frm multiple inclusion (Glauber Costa)

Signed-off-by: Glauber Costa <glommer@redhat.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5519 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdditional exclusive load/store instruction are v6K, not v6T2.
pbrook [Wed, 22 Oct 2008 21:42:54 +0000 (21:42 +0000)]
Additional exclusive load/store instruction are v6K, not v6T2.

Signed-off-by: Paul Brook <paul@codesourcery.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5518 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix ARMv6t2 strex instructions.
pbrook [Wed, 22 Oct 2008 20:35:54 +0000 (20:35 +0000)]
Fix ARMv6t2 strex instructions.

Signed-off-by: Paul Brook <paul@codesourcery.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5517 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoETRAX-FS: Add support for passing kernel command lines
edgar_igl [Wed, 22 Oct 2008 19:58:32 +0000 (19:58 +0000)]
ETRAX-FS: Add support for passing kernel command lines

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5516 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoETRAX-FS: Correct booting of elf linux images from ram.
edgar_igl [Wed, 22 Oct 2008 19:35:08 +0000 (19:35 +0000)]
ETRAX-FS: Correct booting of elf linux images from ram.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5515 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix ARMv6 translation table base address calculation.
pbrook [Wed, 22 Oct 2008 19:22:30 +0000 (19:22 +0000)]
Fix ARMv6 translation table base address calculation.

Signed-off-by: Paul Brook <paul@codesourcery.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5514 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoUse load address when loading ELF images.
pbrook [Wed, 22 Oct 2008 18:20:20 +0000 (18:20 +0000)]
Use load address when loading ELF images.

Signed-off-by: Paul Brook <paul@codesourcery.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5513 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoOptimize redundant cp15 coprocessor access control register writes.
pbrook [Wed, 22 Oct 2008 16:14:08 +0000 (16:14 +0000)]
Optimize redundant cp15 coprocessor access control register writes.

Signed-off-by: Paul Brook <paul@codesourcery.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5512 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoUpdate old fashioned function prototypes.
pbrook [Wed, 22 Oct 2008 15:55:18 +0000 (15:55 +0000)]
Update old fashioned function prototypes.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5511 c046a42c-6fe2-441c-8c8c-71466251a162

16 years ago* Use function pointers for symbol lookup (currently for elf32 and elf64,
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

16 years agoKeep usb host scanning from leaking file descriptors
aliguori [Tue, 21 Oct 2008 16:34:20 +0000 (16:34 +0000)]
Keep usb host scanning from leaking file descriptors

If the first case does not succeed, then the usb scanning code will leak file
descriptors on every scan.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5509 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-ppc: convert branch related instructions to TCG
aurel32 [Tue, 21 Oct 2008 16:31:31 +0000 (16:31 +0000)]
target-ppc: convert branch related instructions to TCG

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5508 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix broken USB support for Linux host (Bjorn Danielsson)
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().

Signed-off-by: Bjorn Danielsson <bdq@dax.nu>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5507 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-ppc: convert logical instructions to TCG
aurel32 [Tue, 21 Oct 2008 11:31:27 +0000 (11:31 +0000)]
target-ppc: convert logical instructions to TCG

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5506 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-ppc: convert crf related instructions to TCG
aurel32 [Tue, 21 Oct 2008 11:31:14 +0000 (11:31 +0000)]
target-ppc: convert crf related instructions to TCG

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5505 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoTCG: add tcg_const_local_tl()
aurel32 [Tue, 21 Oct 2008 11:30:45 +0000 (11:30 +0000)]
TCG: add tcg_const_local_tl()

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5504 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-ppc: use the new TCG logical operations
aurel32 [Tue, 21 Oct 2008 11:29:55 +0000 (11:29 +0000)]
target-ppc: use the new TCG logical operations

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5503 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-alpha: use the new TCG logical operations
aurel32 [Tue, 21 Oct 2008 11:29:11 +0000 (11:29 +0000)]
target-alpha: use the new TCG logical operations

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5502 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoTCG: add logical operations found on alpha and powerpc processors
aurel32 [Tue, 21 Oct 2008 11:28:59 +0000 (11:28 +0000)]
TCG: add logical operations found on alpha and powerpc processors

- andc_i32/i64 t0, t1, t2
- eqv_i32/i64 t0, t1, t2
- nand_i32/i64 t0, t1, t2
- nor_i32/i64 t0, t1, t2
- orc_i32/i64 t0, t1, t2

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5501 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-ppc: Convert XER accesses to TCG
aurel32 [Tue, 21 Oct 2008 11:28:46 +0000 (11:28 +0000)]
target-ppc: Convert XER accesses to TCG

Define XER bits as a single register and access them individually to
avoid defining 5 32-bit registers (TCG doesn't permit to map 8-bit
registers).

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5500 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoadded explicit license
bellard [Fri, 17 Oct 2008 17:31:57 +0000 (17:31 +0000)]
added explicit license

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5499 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoallow SLIRP to make an ARP request to get the client MAC address. It is useful if...
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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5498 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoscsi-generic: correct error management
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...

Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5497 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoi386/SVM: return amount of ASIDs
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.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5496 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoPPC: fix dcbi instruction
aurel32 [Wed, 15 Oct 2008 22:25:21 +0000 (22:25 +0000)]
PPC: fix dcbi instruction

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5495 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoPPC: convert SPE logical instructions to TCG
aurel32 [Wed, 15 Oct 2008 17:00:45 +0000 (17:00 +0000)]
PPC: convert SPE logical instructions to TCG

(Nathan Froyd)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5494 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoppc: convert integer load/store to TCG
aurel32 [Wed, 15 Oct 2008 17:00:37 +0000 (17:00 +0000)]
ppc: convert integer load/store to TCG

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5493 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-ppc: fix a TCG local variable creation
aurel32 [Wed, 15 Oct 2008 17:00:29 +0000 (17:00 +0000)]
target-ppc: fix a TCG local variable creation

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5492 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoPPC: convert SPE effective address computation to TCG
aurel32 [Wed, 15 Oct 2008 17:00:18 +0000 (17:00 +0000)]
PPC: convert SPE effective address computation to TCG

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5491 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoPPC: convert effective address computation to TCG
aurel32 [Tue, 14 Oct 2008 19:55:54 +0000 (19:55 +0000)]
PPC: convert effective address computation to TCG

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5490 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agogdbstub: remove unused local variable
aurel32 [Tue, 14 Oct 2008 19:23:35 +0000 (19:23 +0000)]
gdbstub: remove unused local variable

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5489 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-i386: Add Core Duo Definition
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.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5488 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix previous commit (spotted by Robert Riebisch).
aliguori [Tue, 14 Oct 2008 18:14:47 +0000 (18:14 +0000)]
Fix previous commit (spotted by Robert Riebisch).

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5487 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoDefine O_DSYNC as O_SYNC if necessary.
aliguori [Tue, 14 Oct 2008 18:00:38 +0000 (18:00 +0000)]
Define O_DSYNC as O_SYNC if necessary.

O_DSYNC isn't available on OS X.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5486 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoExpand cache= option and use write-through caching by default
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

16 years agolinux-user: implement msg* syscalls
aurel32 [Mon, 13 Oct 2008 21:08:55 +0000 (21:08 +0000)]
linux-user: implement msg* syscalls

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@5484 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agolinux-user: fix and cleanup IPCOP_msg* ipc calls handling
aurel32 [Mon, 13 Oct 2008 21:08:44 +0000 (21:08 +0000)]
linux-user: fix and cleanup IPCOP_msg* ipc calls handling

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@5483 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoopen() can also return EPERM for O_RDWR on a readonly device
aurel32 [Mon, 13 Oct 2008 21:08:34 +0000 (21:08 +0000)]
open() can also return EPERM for O_RDWR on a readonly device

Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5482 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFreeBSD also has clock_gettime
aurel32 [Mon, 13 Oct 2008 21:08:25 +0000 (21:08 +0000)]
FreeBSD also has clock_gettime

Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5481 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agolinux-user: fix getdents* syscalls
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).

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@5480 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agolinux-user: Add readahead syscall
aurel32 [Mon, 13 Oct 2008 21:08:07 +0000 (21:08 +0000)]
linux-user: Add readahead syscall

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@5479 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoIntroduce TCP live migration protocol
aliguori [Mon, 13 Oct 2008 03:14:31 +0000 (03:14 +0000)]
Introduce TCP live migration protocol

This patch introduces a tcp protocol for live migration.  It can be used as
follows:

qemu-system-x86_64 -hda ~/images/linux-test.img -monitor stdio
 <vm runs for a while>
(qemu) migrate tcp:localhost:1025

On the same system:

qemu-system-x86_64 -hda ~/images/linux-test.img -incoming
tcp:localhost:1025

The monitor can be interacted with while waiting for an incoming live
migration.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5478 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoIntroduce ethernet announcement function.
aliguori [Mon, 13 Oct 2008 03:13:12 +0000 (03:13 +0000)]
Introduce ethernet announcement function.

This patch adds an ethernet announce function that will minimize downtime
when doing a live migration.  This code originates from KVM.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5477 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoIntroduce UI for live migration
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

16 years agoIntroduce a buffered file wrapper for QEMUFile
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

16 years agoFix some issues with QEMUFile
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

16 years agoSH4: Implement MOVUA.L
aurel32 [Sun, 12 Oct 2008 23:32:59 +0000 (23:32 +0000)]
SH4: Implement MOVUA.L

 * target-sh4/translate.c (_decode_opc): Implement
   MOVUA.L.

(Vladimir Prus)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5473 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoSH4: fix single-stepping
aurel32 [Sun, 12 Oct 2008 23:32:48 +0000 (23:32 +0000)]
SH4: fix single-stepping

* target-sh/translate.c (gen_intermediate_code_internal): If
  singlestep is enabled, update PC before stopping.

(Vladimir Prus)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5472 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoSH4: Fix swap.b
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.

(Vladimir Prus)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5471 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoMake sure to initialize fd_sets in aio.c
aliguori [Sun, 12 Oct 2008 21:19:57 +0000 (21:19 +0000)]
Make sure to initialize fd_sets in aio.c

This was spotted by valgrind.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5470 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agohw/apic.c: use functions from host-utils.h
aurel32 [Sun, 12 Oct 2008 20:16:03 +0000 (20:16 +0000)]
hw/apic.c: use functions from host-utils.h

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5469 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoCOPYING: update from FSF
aurel32 [Sun, 12 Oct 2008 17:54:42 +0000 (17:54 +0000)]
COPYING: update from FSF

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5468 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoDefine macro QEMU_GNUC_PREREQ and use it
aurel32 [Sun, 12 Oct 2008 16:15:04 +0000 (16:15 +0000)]
Define macro QEMU_GNUC_PREREQ and use it

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5467 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoOnly use __builtin_* with GCC >= 3.4
aurel32 [Sun, 12 Oct 2008 11:44:36 +0000 (11:44 +0000)]
Only use __builtin_* with GCC >= 3.4

Fix gcc 3.3 builds, broken in revision 5465.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5466 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agohw/apic.c: use __builtin funtions instead of assembly code
aurel32 [Sun, 12 Oct 2008 00:53:17 +0000 (00:53 +0000)]
hw/apic.c: use __builtin funtions instead of assembly code

Suggested by malc.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5465 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoOptimize some host-utils function with gcc builtins
aurel32 [Sun, 12 Oct 2008 00:53:08 +0000 (00:53 +0000)]
Optimize some host-utils function with gcc builtins

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5464 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoGet rid of sys/poll.h
aurel32 [Sun, 12 Oct 2008 00:52:58 +0000 (00:52 +0000)]
Get rid of sys/poll.h

(C.W. Betts)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5463 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoCRIS: Initialize the arch version preg to v32.
edgar_igl [Sat, 11 Oct 2008 19:36:17 +0000 (19:36 +0000)]
CRIS: Initialize the arch version preg to v32.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5462 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoCRIS: Handle GDB writes to pregs.
edgar_igl [Sat, 11 Oct 2008 19:32:21 +0000 (19:32 +0000)]
CRIS: Handle GDB writes to pregs.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5461 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd feature_to_c.sh.
pbrook [Sat, 11 Oct 2008 18:23:22 +0000 (18:23 +0000)]
Add feature_to_c.sh.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5460 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd GDB XML register description support.
pbrook [Sat, 11 Oct 2008 17:55:29 +0000 (17:55 +0000)]
Add GDB XML register description support.

Signed-off-by: Paul Brook <paul@codesourcery.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5459 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix some debugging mistakes/leftovers
malc [Sat, 11 Oct 2008 17:37:25 +0000 (17:37 +0000)]
Fix some debugging mistakes/leftovers

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5458 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoUse the adequate CFLAGS for confiugure tests.
balrog [Sat, 11 Oct 2008 12:00:42 +0000 (12:00 +0000)]
Use the adequate CFLAGS for confiugure tests.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5457 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd a configure check for zlib (Ryota OZAKI).
balrog [Sat, 11 Oct 2008 09:56:04 +0000 (09:56 +0000)]
Add a configure check for zlib (Ryota OZAKI).

This patch makes configure check zlib devel files installed.
Current configure doesn't check that, so make will fail if they
are not installed.

Signed-off-by: Ryota Ozaki <ozaki.ryota@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5456 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoCorrect SCSI error reporting (Laurent Vivier)
blueswir1 [Sat, 11 Oct 2008 09:33:03 +0000 (09:33 +0000)]
Correct SCSI error reporting (Laurent Vivier)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5455 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoIncrease write buffer size in pflash emulation (Thomas Petazzoni).
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

16 years agoUpdate (thanks to Edgar, Thiemo, malc, Paul, Laurent and Andrzej)
blueswir1 [Thu, 9 Oct 2008 18:52:04 +0000 (18:52 +0000)]
Update (thanks to Edgar, Thiemo, malc, Paul, Laurent and Andrzej)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5453 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix IDE DIAGNOSE for packet devices (Vincent Sanders)
aliguori [Thu, 9 Oct 2008 14:19:34 +0000 (14:19 +0000)]
Fix IDE DIAGNOSE for packet devices (Vincent Sanders)

The DIAGNOSE command in the qemu IDE implementation has an error when
use dfor packet devices.

The status register value is dependant on the drive being a packet
device or not, this patch corrects the returned status.

From the ATA/PI specification (V6 draft):

"If the device implements the PACKET command feature set, the device
SHALL clear bits 6,5,4,3,2 and 0 in the Status register to zero."

A selection of physical devices have been checked and do conform to
the specifications behaviour.

Signed-off-by: Vincent Sanders <vince@simtec.co.uk>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5452 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix IO performance regression in sparc
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

16 years agoCRIS: linux-user signals dont need ERP compensation after break anymore.
edgar_igl [Wed, 8 Oct 2008 14:39:08 +0000 (14:39 +0000)]
CRIS: linux-user signals dont need ERP compensation after break anymore.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5450 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoCRIS: linux-user ERP compensation not needed anymore.
edgar_igl [Wed, 8 Oct 2008 14:26:58 +0000 (14:26 +0000)]
CRIS: linux-user ERP compensation not needed anymore.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5449 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoCRIS: Partial EXS reg support and fixes for SPC.
edgar_igl [Wed, 8 Oct 2008 14:22:17 +0000 (14:22 +0000)]
CRIS: Partial EXS reg support and fixes for SPC.

* Add partial support for the EXS (exception status) register.
* Update SPC after each singlestep exception.
* Remove special treatment of break 8.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5448 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoCRIS: Correct typos.
edgar_igl [Wed, 8 Oct 2008 08:28:16 +0000 (08:28 +0000)]
CRIS: Correct typos.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5447 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoCRIS: Make local objects static.
edgar_igl [Tue, 7 Oct 2008 22:54:52 +0000 (22:54 +0000)]
CRIS: Make local objects static.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5446 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoCRIS: Fix brk 8 and add S-flag emulation.
edgar_igl [Tue, 7 Oct 2008 22:48:41 +0000 (22:48 +0000)]
CRIS: Fix brk 8 and add S-flag emulation.

* break 8 sets ERP to the current insn.
* First shot at S flag single-stepping.
* Make it easier to use the local disasm.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5445 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoadd help text for --enable-sparse (Gerd Hoffman)
aliguori [Tue, 7 Oct 2008 21:22:41 +0000 (21:22 +0000)]
add help text for --enable-sparse (Gerd Hoffman)

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5444 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agomachine struct - specify max_cpus at the per machine level (Jes Sorensen)
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.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5443 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agomachine struct - use C99 initializers (Jes Sorensen)
aliguori [Tue, 7 Oct 2008 20:34:35 +0000 (20:34 +0000)]
machine struct - use C99 initializers (Jes Sorensen)

Modify all the machine struct declarations to use C99 initializers.
This patch has no functional changes.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5442 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd USB sys file-system support (v8) (TJ)
aliguori [Tue, 7 Oct 2008 20:06:37 +0000 (20:06 +0000)]
Add USB sys file-system support (v8) (TJ)

This patch adds support for host USB devices discovered via:

/sys/bus/usb/devices/* and opened from /dev/bus/usb/*/*
/dev/bus/usb/devices and opened from /dev/bus/usb/*/*

in addition to the existing discovery via:

/proc/bus/usb/devices and opened from /proc/bus/usb/*/*

Signed-off-by: TJ <linux@tjworld.net>
Signed-off-by: Anthony Liguori <aliguori>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5441 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd sparse checker support to the build system (Gerd Hoffman)
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.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5440 c046a42c-6fe2-441c-8c8c-71466251a162