Commit Graph

658 Commits

Author SHA1 Message Date
Jan Kiszka dae5079aca kvm: Detect availability of kvm_para.h
Will be required for upcoming KVM cpuid leaf. Host kernels >= 2.6.32 as
well as future kvm-kmod releases (more recent than kvm-kmod-2.6.32.3)
do/will provide them.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-12 14:32:19 -06:00
Jan Kiszka ffd8b67f5d kvm: Use kvm-kmod headers if available
Since kvm-kmod-2.6.32.2 we have an alternative source for recent KVM
kernel headers. Use it when available and not overruled by --kerneldir.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-12 14:32:19 -06:00
Paolo Bonzini 59bc10ee01 finish VPATH -> vpath translation
This adds a few more vpath suffixes and points the remaining two paths
explicitly to $(SRC_PATH) in order to eliminate the VPATH assignment
from config-host.mak.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-08 16:55:03 -06:00
Andreas Färber 0e8c9214ba Drop --whole-archive and static libraries
Juan has contributed a cool Makefile infrastructure that enables us to drop
static libraries completely:

Move shared obj-y definitions to Makefile.objs, prefixed {common-,hw-,user-},
and link those object files directly into the executables.

Replace HWLIB by HWDIR, specifying only the directory.

Drop --whole-archive and ARLIBS in Makefiles and configure.

Drop GENERATED_HEADERS dependency in rules.mak, since this rebuilds all
common objects after generating a target-specific header; add dependency
rules to Makefile and Makefile.target instead.

v2:
- Don't try to include /config.mak for user emulators
- Changes to user object paths ("Quickfix for libuser.a drop") were obsoleted
  by "user_only: compile everything with -fpie" (Kirill A. Shutemov)

v3:
- Fix dependency modelling for tools
- Remove comment on GENERATED_HEADERS obsoleted by this patch

Signed-off-by: Andreas Färber <afaerber@opensolaris.org>
Cc: Blue Swirl <blauwirbel@gmail.com>
Cc: Palle Lyckegaard <palle@lyckegaard.dk>
Cc: Ben Taylor <bentaylor.solx86@gmail.com>
Cc: Juan Quintela <quintela@trasno.org>
Cc: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-07 18:08:53 +00:00
Blue Swirl 2bff4b6fbe Compile qemu-nbd also on OpenBSD and Solaris
basename() needs #include <libgen.h>.

No prototype for daemon() is available on Solaris, but link
succeeds.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-12-23 15:34:04 +00:00
Kirill A. Shutemov 299060a06e user_only: compile everything with -fpie
We really need compile _all_ sources for user target with -fpie when
use --enable-user-pie.

It's regression introduced by commit add16157d7.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-12-19 15:16:08 +00:00
Richard Henderson 990b3e1901 target-alpha: Enable softfloat.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-13 20:32:36 +01:00
Anthony Liguori 20ff6c8066 Do not abort on qemu_malloc(0) in production builds
qemu_malloc() does not allow size=0 to be passed in and aborts on this behavior.

Unfortunately, there is good reason to believe that within qemu, there are a
number of, so far, undetected places that assume size=0 can be safely passed.
Since we do not want to abort unnecessarily in production builds, return
qemu_malloc(1) whenever the version file indicates that this is a production
build.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-12 07:59:37 -06:00
Alexander Graf 0e60a699d2 Add KVM support for S390x
S390x was one of the first platforms that received support for KVM back in the
day. Unfortunately until now there hasn't been a qemu implementation that would
enable users to actually run guests.

So let's include support for KVM S390x in qemu!

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-05 17:36:02 +01:00
Alexander Graf 24e804ec14 S/390 host/target build system support
This patch makes configure aware of S390 hosts and guests. When not explicitly
defined using --target-list= no S390 targets will be built though.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-05 17:36:00 +01:00
Andreas Faerber ea5ad306ba Suppress optionrom build on Solaris x86
To avoid the build failing with:

gcc -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-
builtin -I/export/home/andreas/QEMU/qemu   -Wall -Wstrict-prototypes -
Werror -fomit-frame-pointer -fno-builtin -I/export/home/andreas/QEMU/
qemu   -c -o multiboot.o multiboot.S
/var/tmp//ccd3aWyk.s: Assembler messages:
/var/tmp//ccd3aWyk.s:15: Error: value of 512 too large for field of 1
bytes at 0000000000000002
gmake[1]: *** [multiboot.o] Error 1

disable recursion into pc-bios/optionrom, as done for Darwin already.

Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03 15:25:57 -06:00
Kevin Wolf 40ff6d7e8d Don't leak file descriptors
We're leaking file descriptors to child processes. Set FD_CLOEXEC on file
descriptors that don't need to be passed to children to stop this misbehaviour.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03 11:45:50 -06:00
Michael S. Tsirkin be17dc90b5 configure: use correct cflags in compiler checks
linux-user build on fedora 11 breaks because fallocate
is broken on that system if -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
are specified, which is what QEMU uses.

We do have a configure check to catch this and disable fallocate,
however, it turns out that default QEMU_CFLAGS/LDFLAGS were assigned in
script *after* all compiler checks: so during checks we were not running
compiler with same flags that we used for build later.

Fix this by moving QEMU_CFLAGS to before compiler checks, and using
comple_prog when checking for fallocate.  This also fixes the fact that
we do some compiler checks while assigning the flags, right below a
comment that says "no cc tests beyond this point".

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-02 08:57:42 -06:00
Aurelien Jarno afa05235a5 tcg: initial mips support
Based on a patch from Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>

A few words about design choices:
* Two registers, at and t0, are reserved for TCG internal use. They are
  useful for bswap and 64-bit ops.
* Most ops supports a constant argument with value 0, which is actually
  mapped to the zero register.
* While the at register is available for constant loading, ops only
  support a limited range of constants. TCG does a better job doing the
  register allocation and constant loading by itself. There are plenty of
  registers available anyway.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-01 00:06:15 +00:00
Aurelien Jarno a167ba5085 Add support for GNU/kFreeBSD
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-29 18:00:41 +01:00
Paul Brook a992fe3d0f Makefile dependencies for device configs
Add makefile dependencies for target specific device configs.
These will copy the default config if none exists, obsoleting the old
configure time code.  If a config already exists but is older than the
default then print a warning.

Also remove config-devices.h.  Code does not and should not care which
devices are being built.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-11-22 21:24:54 +00:00
Stefan Weil 3a3fb96d0d configure: Fix spelling in comment and rework the comment
* Replace vill -> will.

* Comment was formatted to make it more readable
  and to conform to the coding standard, too.

* Description of foo="" was completed.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-21 00:40:55 +01:00
Aurelien Jarno 86355e0700 qemu-io: build on all platforms
Since c32d766af1, qemu-io should be
portable. It is currently built only on linux and mingw32.

This patch enables qemu-io on all platforms. Tested on FreeBSD.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-21 00:37:14 +01:00
Aurelien Jarno 493abda627 audio: link with -lpulse in addition to -lpulse-simple
Link with -lpulse in addition to -lpulse-simple, needed when --no-add-needed
is passed to the linker (gold default).

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-18 00:25:46 +01:00
Blue Swirl 9cf55765b9 Fix typo
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-11-17 21:27:18 +00:00
Blue Swirl 9c7a420265 Prevent configuring for a user emulator on a different type of OS
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-11-17 20:52:56 +00:00
Anthony Liguori 422c46a81d Add a unit test for JSON support
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-17 08:49:39 -06:00
Anthony Liguori 9c9efb6b29 Add unit test for QFloat
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-17 08:49:38 -06:00
Jan Kiszka 78f5d72602 Cleanup configure checks for dup3 and fallocate
We have a function for this which does not issue annoying warnings.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-17 08:49:38 -06:00
Markus Armbruster eb852011ab Configurable block format whitelist
We have code for a quite a few block formats.  While I trust that all
of these formats are useful at least for some people in some
circumstances, some of them are of a kind that friends don't let
friends use in production.

This patch provides an optional block format whitelist, default off.
If a whitelist is configured with --block-drv-whitelist, QEMU proper
can use only whitelisted formats.  Other programs, like qemu-img, are
not affected.

Drivers for formats off the whitelist still participate in format
probing, to ensure all programs probe exactly the same.  Without that,
QEMU proper would be prone to treat images with a format off the
whitelist as raw when the image's format is probed.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-09 08:43:02 -06:00
Anthony Liguori 2d9f27d2fd Fix the build when srcdir == objdir
You would only see this error on a fresh clone when srcdir == objdir.  configure
will fail because roms/pcbios doesn't exist.

git submodule integration doesn't cleanup very well when switching between
branches so you'll get an roms/pcbios directory from normal operations if you
switch between old branches.

Thanks to a mistake in configure, if you build outside of srcdir, you'll also
get a valid roms/pcbios.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-02 15:50:27 -06:00
Mark McLoughlin dffcb71cb5 build: add CONFIG_LINUX
So I can add a tap-linux.c and use CONFIG_LINUX to pull it in
in Makefile

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-30 08:39:28 -05:00
Mark McLoughlin e1144d006d net: move net-queue.[ch] under net/
[v2: handle building in a separate dir]

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-30 08:39:26 -05:00
Anthony Liguori 102251a4f3 Merge commit 'linux-user/linux-user-for-upstream' into staging 2009-10-21 13:36:49 -05:00
Blue Swirl 747bbdf79f Suppress warnings about 'warn_unused_result' attribute directive
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-18 16:26:06 +00:00
Ulrich Hecht d092793872 implementations of dup3 and fallocate that are good enough to fool LTP
updated fallocate check to new configure, added dup3 check as suggested
by Jan-Simon Möller.

Riku: updated to apply to current git.

Signed-off-by: Ulrich Hecht <uli@suse.de>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
2009-10-15 23:55:55 +03:00
malc a91b857c38 configure: clean temporary executable files even on Windows
Signed-off-by: malc <av1474@comtv.ru>
2009-10-15 01:57:14 +04:00
Stefan Weil f514f41c45 Fix bswap in comment
Replace bsawp -> bswap.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-10-11 21:31:40 +02:00
malc 02d5467e9f Move dependency generation falgs out of configure
Signed-off-by: malc <av1474@comtv.ru>
2009-10-11 17:08:57 +04:00
malc 868dc0b4ad configure: clean up temporary dependency files
Signed-off-by: malc <av1474@comtv.ru>
2009-10-11 07:57:17 +04:00
malc d56316388d Windows Waveform Audio driver (no ADC support yet)
Signed-off-by: malc <av1474@comtv.ru>
2009-10-10 01:18:24 +04:00
Luiz Capitulino 3aa3dcfff6 Introduce QList unit-tests
This suite contains tests to assure that QList API works as expected.

To execute it you should have check installed and build QEMU with
check support enabled (--enable-check-utests) and then run:

$ ./check-qlist

Patchworks-ID: 35333
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:18 -05:00
Juan Quintela 3d0f151783 Generate gdbstub-xml.c only when needed
First user of new config-devices.mak

Patchworks-ID: 35198
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:11 -05:00
Juan Quintela 1f3d3c8fd7 Add new config-devices.mak for each target
We generate config-devices.h from there automatically.
We need to do it in main Makefile, because we are going to need a main
Makefile for them.

Patchworks-ID: 35196
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:10 -05:00
Juan Quintela 91880d96a1 Move generation of config-target.h to Makefile from configure
Patchworks-ID: 35194
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:04 -05:00
Juan Quintela 25be210f69 Rename config.{h, mak} config-target.{h, mak}
Add config.h file that includes config-target.h and config-host.h

Patchworks-ID: 35193
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:03 -05:00
Juan Quintela 1215c6e761 Move generation of config-host.h to Makefile from configure
Use timestamp based appreach to avoid not needed recompilation.
Add it to rules.mak

Many thanks to Paolo Bonzini for helpding the design, and the debug.

Patchworks-ID: 35190
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:03 -05:00
Juan Quintela deed3ccfca Don't include config-host.mak from inside config.mak
Include it directly in Makefile.target

Patchworks-ID: 35189
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:02 -05:00
Juan Quintela ae7489cba3 AIOLIBS is not used anywhere
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-06 14:46:10 -05:00
Juan Quintela a316e3788d Add -Wold-style-* flags
This time, I add them in configure only if target compiler supports it

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-05 09:32:44 -05:00
Juan Quintela b6e31c1239 slirp: It needs to use QEMU_CFLAGS not CFLAGS
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-05 09:32:44 -05:00
Stefan Weil ee682d27a5 Check availability of uuid header / library
If available, the Universally Unique Identifier library
is used by the vdi block driver.

Other parts of QEMU (vl.c) could also use it.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-10-04 13:24:45 +02:00
Blue Swirl fa58948d1f Use GNU ld to link roms on OpenSolaris
OpenSolaris ld seems to miss the equivalent of GNU ld's "-Ttext 0".

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-02 19:38:25 +00:00
Blue Swirl add16157d7 Compile some user files only once for all targets
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-27 16:26:02 +00:00
Blue Swirl b461cdc9b3 Don't compile roms if not building system targets
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-27 14:35:44 +00:00
Blue Swirl 5f6b9e8fd5 Probe for fdatasync()
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-20 06:56:26 +00:00
Andre Przywara e5934d333f fix typo in configure --help
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-09-16 19:57:13 +02:00
Sebastian Herbszt 9332f6a2e2 configure: change "found" to "find"
Change "ERROR: configure was not able to found it" to
"ERROR: configure was not able to find it".

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-13 19:42:03 +00:00
Blue Swirl 50108930b8 Revert "Fix Sparc/Linux host breakage by df70204db53e3611af986f434e74a882bce190ca"
This reverts commit 91b40c5be8.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-13 19:38:48 +00:00
Blue Swirl 91b40c5be8 Fix Sparc/Linux host breakage by df70204db5
While i386, x86_64 and Sparc64/OpenBSD still worked after
df70204db5, Sparc32 and Sparc64 Linux hosts
broke.

Partially revert the commit: make the restored code conditional to
!CONFIG_USER_PIE.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-13 13:33:05 +00:00
Kirill A. Shutemov 34005a0060 Add configure option to compile user targets as PIE
Build uset targers as true PIE if user want to keep qemu
self-virtualizable.

v5:
  - Split into to patches: drop link hack and add PIE support
  - do not build PIE by default and drop toolchain check

v4:
  - Add test for toolchain if it has proper PIE support

v3:
  - One more pice of the hack was removed
  - Description updated

v2:
  - Add configure options do enable/disable PIE for usermode targets.
    Disabling can be useful if you build uswing toolchain which has
    broken PIE support. PIE for usermode targets enabled by default.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-12 13:17:45 +00:00
Kirill A. Shutemov df70204db5 Fix text relocations in linux-user targets
There is a link hack in linux-user which produces an executable that
looks like PIE, but always has text relocations since all object files
isn't position-independent (compiled without -fpic/-fpie). Dynamic loader
has to do more work to load a binary with text relocations.

The best way to keep this functionality is to build a true PIE without
text relocations.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-12 13:15:26 +00:00
Kirill A. Shutemov 5791f45b58 Do not link usermode targets with libhw*.a
Usermode targets are hardware-independed.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Acked-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-12 13:14:59 +00:00
Blue Swirl d741429a9b Add #defines needed by OpenSolaris, fix breakage by the #defines
We need to define _XOPEN_SOURCE and __EXTENSIONS__ macros in order to get
CMSG_ and TIOCWIN macros defined. But then _POSIX_C_SOURCE gets defined, which
is (incorrectly) used as an indicator for existence of posix_memalign() in osdep.c.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-12 12:36:04 +00:00
Blue Swirl 31ff504d2a Fix OpenSolaris build breaking typos
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-12 12:33:07 +00:00
Blue Swirl de5071c551 Fix a Sparse warning about redefinition of offsetof()
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-12 09:58:46 +00:00
Luiz Capitulino 3cfcae3cda configure: fix Linux AIO detection
We should set $linux_aio to 'no' if detection failed, otherwise
its contents will be empty, which is a bug as we test for 'yes'
or 'no'.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-09 17:31:27 -05:00
Juan Quintela 3aefa74455 fix VNC SASL detection
This test was missing the change to != no.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-09 17:31:26 -05:00
Stefan Weil c32d766af1 qemu-io: Improve portability (win32 now supported).
* Add missing include for struct timeval.
* Replace non-portable strsep by local qemu_strsep.
* Use POSIX basename by including libgen.h.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-09 14:57:20 -05:00
Anthony Liguori c34ebfdc87 Bring pcbios, seabios, and vgabios into the tree as git submodules. Right now,
they aren't integrated into the build but we can do that incrementally.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 10:13:29 -05:00
Luiz Capitulino 7b8c51add7 Introduce QDict unit-tests
This suite contains tests to assure that QDict API works as expected.

To execute it you should have check installed and build QEMU with
check support enabled (--enable-check-utests) and then run:

$ ./check-qdict

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:34 -05:00
Luiz Capitulino 5de65a07ee Introduce QString unit-tests
This suite contains tests to assure that QString API works as expected.

To execute it you should have check installed and build QEMU with
check support enabled (--enable-check-utests) and then run:

$ ./check-qstring

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:34 -05:00
Luiz Capitulino 33837ba6c5 Introduce QInt unit-tests
This suite contains tests to assure that QInt API works as expected.

To execute it you should have check installed and build QEMU with
check support enabled (--enable-check-utests) and then run:

$ ./check-qint

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:33 -05:00
Luiz Capitulino 5495ed11b0 Add check support
Check is a unit testing framework for C.

All the QObjects have unit-tests and more will be written for the
future data types.

More info about check can be found at:

http://check.sourceforge.net/

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:33 -05:00
Anthony Liguori 3737c0541a Merge commit 'linux-user/linux-user-for-upstream' into staging 2009-08-27 20:55:01 -05:00
Anthony Liguori 4617e59389 Relax pthreads check to avoid win32
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 20:47:01 -05:00
Gerd Hoffmann 59f2a78793 ide: move code to hw/ide/
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 20:46:50 -05:00
Christoph Hellwig 5c6c3a6c54 raw-posix: add Linux native AIO support
Now that do have a nicer interface to work against we can add Linux native
AIO support.  It's an extremly thing layer just setting up an iocb for
the io_submit system call in the submission path, and registering an
eventfd with the qemu poll handler to do complete the iocbs directly
from there.

This started out based on Anthony's earlier AIO patch, but after
estimated 42,000 rewrites and just as many build system changes
there's not much left of it.

To enable native kernel aio use the aio=native sub-command on the
drive command line.  I have also added an option to qemu-io to
test the aio support without needing a guest.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 20:30:22 -05:00
Juan Quintela dfffc65398 Add sparse to new feature convention
Once there, move to a proper test to see if we are going to use it or not

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 19:33:15 -05:00
Juan Quintela b31a027755 Add kvm to new feature convention
Extra error message is only given if --enable-kvm was given

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 19:33:15 -05:00
Juan Quintela fc321b4b37 Add xen to new feature convention
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 19:33:15 -05:00
Juan Quintela 2df87df749 Add fdt to new feature convention
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 19:33:15 -05:00
Juan Quintela c419815796 Add sdl to new feature convention
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 19:33:14 -05:00
Juan Quintela a25dba179d Rename build_docs to docs
All other features are named foo and enabled with --enable-foo.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 19:33:14 -05:00
Juan Quintela 83a3ab8bb2 Add build_docs to new feature convention
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 19:33:13 -05:00
Juan Quintela a20a6f469b Add bluez to new feature convencion
Once there, remove extra check for package and output if bluez was found or not as the other features

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 19:33:13 -05:00
Juan Quintela b0a47e79d8 Add nptl to new feature convencion
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 19:33:13 -05:00
Juan Quintela 788c8196f7 Add curl to new feature convencion
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 19:33:13 -05:00
Juan Quintela c584a6d061 Add curses to new feature convencion
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 19:33:13 -05:00
Juan Quintela ea784e3b95 Add vnc_sasl to new feature convencion
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 19:33:13 -05:00
Juan Quintela 1be10ad28b Add vnc_tls to new feature convencion
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 19:33:13 -05:00
Juan Quintela dfb278bde1 Add vde to new feature convencion
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 19:33:12 -05:00
Juan Quintela 4ffcedb674 Add brlapi to new feature convencion
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 19:33:12 -05:00
Juan Quintela 249247c9fd Add error message for feature not found
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 19:33:12 -05:00
Juan Quintela e2d52ad32a Add feature configure help
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 19:33:12 -05:00
Juan Quintela 4f78ef9a90 Use the same structure for list of libs in curses and pthread
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 19:33:12 -05:00
Juan Quintela 576edbfa8e Make vnc configure options less verbose.
Rest of libraries don't print themselves

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 19:33:12 -05:00
Riku Voipio c2882b9654 linux-user: add eventfd support
Straightforward implementation. This syscall is rare enough that we
don't need to support the odder cases, just disable it if host glibc
is too old.

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
2009-08-25 17:15:26 +03:00
Christoph Hellwig 4dd75c702c make pthreads mandatory
As requested by Anthony make pthreads mandatory.  This means we will always
have AIO available on posix hosts, and it will also allow enabling the I/O
thread unconditionally once it's ready.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:46:47 -05:00
Anthony Liguori 4a1418e07b Unbreak large mem support by removing kqemu
kqemu introduces a number of restrictions on the i386 target.  The worst is that
it prevents large memory from working in the default build.

Furthermore, kqemu is fundamentally flawed in a number of ways.  It relies on
the TSC as a time source which will not be reliable on a multiple processor
system in userspace.  Since most modern processors are multicore, this severely
limits the utility of kqemu.

kvm is a viable alternative for people looking to accelerate qemu and has the
benefit of being supported by the upstream Linux kernel.  If someone can
implement work arounds to remove the restrictions introduced by kqemu, I'm
happy to avoid and/or revert this patch.

N.B. kqemu will still function in the 0.11 series but this patch removes it from
the 0.12 series.

Paul, please Ack or Nack this patch.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:02:55 -05:00
Zachary Amsden 0953a80f04 Add a configure switch to enable / disable all user targets. I felt compelled to do it for symmetry, mostly it is useful to disable user targets when you don't want to build them.
Signed-off-by: Zachary Amsden <zamsden@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:01:42 -05:00
malc aa0cba4a62 Third attempt to invoke create_config properly
Second attempt failed due to $_ not being standard and as such it's
interpretation by certain shells when they were symlinked to /bin/sh
and invoked as such led to unpredictable results. So instead of trying
to be clever just use /bin/sh directly (That's what direct execution
would have led to anyway)

Hopefully this time nothing will break (Mingw?)

Thanks to Jordan Justen for report and analysis.
[Previous attempt (THISSHELL one) deserves a credit but reporter is
 too humble]

Signed-off-by: malc <av1474@comtv.ru>
2009-08-13 06:41:53 +04:00
malc 971c47ccbb Do not use $SHELL to invoke our scripts
http://www.opengroup.org/onlinepubs/7990989775/xbd/envvar.html

<quote>
SHELL
    A pathname of the user's preferred command language
    interpreter. If this interpreter does not conform to the XSI Shell
    Command Language in the XCU specification, Shell Command Language,
    utilities may behave differently from those described in this
    specification set.
</quote>

So using shells for users who prefer csh variants is a no go.
2009-08-11 23:15:52 +04:00
Juan Quintela f14bfdf952 Move libsunpath to use the same style than everything else
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:
2009-08-10 13:05:48 -05:00
Juan Quintela f622d8a33d convert gprof flags to style of rest of Makefile
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:
2009-08-10 13:05:48 -05:00