Commit Graph

1339 Commits

Author SHA1 Message Date
Anthony Liguori 5a93d5c2ab Merge remote-tracking branch 'mjt/trivial-patches' into staging
# By Stefan Weil (6) and others
# Via Michael Tokarev
* mjt/trivial-patches:
  aio / timers: use g_usleep() not sleep()
  adlib: sort offsets in portio registration
  qmp: fix integer usage in examples
  tci: Remove function tcg_out64 (fix broken build)
  target-arm: Report unimplemented opcodes (LOG_UNIMP)
  pflash_cfi02.c: fix debug macro
  configure: Remove unneeded redirections of stderr (pkg-config --exists)
  configure: Remove unneeded redirections of stderr (pkg-config --cflags, --libs)
  configure: Don't write .pyc files by default (python -B)
  curl: qemu_bh_new() can never return NULL
  slirp/arp_table.c: Avoid shifting into sign bit of signed integers
  configure: disable clang -Wstring-plus-int warning
  rdma: silly ipv6 bugfix
  misc: Fix some typos in names and comments
  slirp: Port redirection option behave differently on Linux and Windows

Message-id: 1378119695-14568-1-git-send-email-mjt@msgid.tls.msk.ru
Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
2013-09-03 12:31:44 -05:00
Richard Henderson c72b26ec92 configure: Allow x32 as a host
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-09-02 09:08:30 -07:00
Stefan Weil 65d5d3f922 configure: Remove unneeded redirections of stderr (pkg-config --exists)
Predicate options (--exists, --atleast-version, ...) of pkg-config dont't
print error messages to stderr, so redirecting stderr is not necessary.

Combining a predicate option with --modversion is not necessary for tests.
Instead of testing with --modversion, --exists can be used.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-09-01 19:26:08 +04:00
Stefan Weil ca871ec861 configure: Remove unneeded redirections of stderr (pkg-config --cflags, --libs)
For existing libraries, pkg-config --cflags and pkg-config --libs won't
print error messages to stderr, so redirecting stderr is not necessary.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-09-01 19:26:00 +04:00
Stefan Weil 1d984a67a9 configure: Don't write .pyc files by default (python -B)
When a Python script is run, Python normally writes bytecode into a .pyc file.
QEMU's build process uses several Python scripts which are called from
configure or make.

The generated .pyc files take disk space without being of much use, because
those scripts are short, not time critical and only called a few times.

Python's option -B disables writing of .pyc files. QEMU now uses "python -B"
as default, but it is still possible to choose a different call by passing
--python=PYTHON to configure.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-09-01 19:14:49 +04:00
Peter Maydell 714290979a configure: disable clang -Wstring-plus-int warning
Some versions of clang will warn about adding integers to strings:

disas/i386.c:4753:23: error: adding 'char' to a string does not append
      to the string [-Werror,-Wstring-plus-int]
      oappend ("%es:" + intel_syntax);
               ~~~~~~~^~~~~~~~~~~~~~
disas/i386.c:4753:23: note: use array indexing to silence this warning
      oappend ("%es:" + intel_syntax);
                      ^
               &      [             ]

disas/i386.c uses this idiom to to skip a "%" prefix if using intel
rather than AT&T syntax. This seems like a reasonable  thing to do,
and I don't think anybody contributing to QEMU is likely to believe
that '+' is a string concatenation operator in C, so just disable
-Wstring-plus-int.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-09-01 19:06:26 +04:00
Alex Bligh cd758dd0ac aio / timers: Add prctl(PR_SET_TIMERSLACK, 1, ...) to reduce timer slack
Where supported, called prctl(PR_SET_TIMERSLACK, 1, ...) to
set one nanosecond timer slack to increase precision of timer
calls.

Signed-off-by: Alex Bligh <alex@alex.org.uk>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-08-22 19:10:27 +02:00
Alex Bligh 4e0c6529fc aio / timers: add ppoll support with qemu_poll_ns
Add qemu_poll_ns which works like g_poll but takes a nanosecond
timeout.

Signed-off-by: Alex Bligh <alex@alex.org.uk>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-08-22 19:10:26 +02:00
Anthony Liguori 64160cd2a3 xtensa queue 2013-07-29
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.13 (GNU/Linux)
 
 iQIcBAABAgAGBQJR9oJeAAoJEFH5zJH4P6BEqzQQAIdlk2X1s6xrPhxiuC0xQmK6
 eHoYVVqVy8wQiXXY+NgbTK6VsbEI/2B58lngFKkUiXQggWHIDUytYpcwymZqVSRS
 9r+VEwy/sa6R/hAGkl7Igs++bsPEkwQqH2b0kDwX+Mi0sCYXZ6Ihe+kqGBkIjzUO
 QXvk3LIVF+ESCeroFUOifgAYncMVDN6er8THJnNHUvfP2lAobkYbh4jbBhmOyKJ6
 kjh0I/rndEyyF0gVfhzPJpdb5whXBlIwjN1CjvoER3Ax24rnfJcBTuDvhV/vtuZY
 dPEOiN/ZDyCeowIMuFDxbtdA5oH2nc6Sm2mqk6iB669ki87vn5vLI6nSAp2C5zAY
 CMPP9JNkhWsBcvjPQOMws/aloru5G2g7ljp7Drd4Ij/gwvlEpAozFtzjhc7QbcMc
 6h7spZ01pRqqICimgUHVf6hYZNeRvhQvzybTA9ccIa0yhyTKTpzQwhNWl+6a2O0x
 4w6SV3RJ9Z+eftS3MOlMpe7raJMg0F5rJQak73hkc07jDB8iaUsJk/8ZAPzT3Y8x
 HwbCE6bGU/ipO8xcGpPC4Lc+vY0+CQXJWRq/x/AiY8SAR6QwRvb9h+Sw0T/5/nYg
 0D12NV5C33ou5RACXdp76Mpxig2rnusWsAj+XSEU8QLB2/TrJ2hMGIdCXUyajCGy
 pr3+BwxWdZkKH7N3oi61
 =JPm8
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'filippov/tags/20130729-xtensa' into staging

xtensa queue 2013-07-29

* filippov/tags/20130729-xtensa:
  target-xtensa: check register window inline
  target-xtensa: don't generate dead code to access invalid SRs
  tests/tcg/xtensa: Fix out-of-tree build
  target-xtensa: avoid double-stopping at breakpoints
  target-xtensa: add fallthrough markers
  target-xtensa: add extui unit test

Conflicts:
	configure

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-05 08:06:25 -05:00
Michael Tokarev e8ef31a351 qemu-ga: build it even if !system
Move qemu-ga build check out of if softmmu.. into its own section.
We want to build qemu-ga for _guest_ even if system build isn't
done.  It is controlled separately using --enable-guest-agent.
Additionally, give error message if guest agent is requested but
not supported.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-08-02 18:02:08 +04:00
Markus Armbruster 98626572f1 tests: QAPI schema parser tests
The parser handles erroneous input badly.  To be improved shortly.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-id: 1374939721-7876-2-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-29 10:37:10 -05:00
Andreas Färber aaa2ebc567 tests/tcg/xtensa: Fix out-of-tree build
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2013-07-29 18:35:45 +04:00
Eduardo Otubo 7d7b2ad436 seccomp: no need to check arch in syscall whitelist
v2 update:
- set libseccomp 2.1.0 as requirement on configure script.

Since libseccomp 2.0 there's no need to check the architecture type
anymore.

Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1374518017-10424-2-git-send-email-otubo@linux.vnet.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-26 16:54:08 -05:00
Anthony Liguori f0ef1cf4d6 Merge remote-tracking branch 'rth/tcg-next' into staging
# By Claudio Fontana (1) and others
# Via Richard Henderson
* rth/tcg-next:
  tcg: Remove temp_buf
  tcg/aarch64: Implement tlb lookup fast path
  tcg/aarch64: implement ldst 12bit scaled uimm offset

Message-id: 1373919944-8521-1-git-send-email-rth@twiddle.net
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-26 13:04:21 -05:00
Anthony Liguori 874ec3c5b3 Merge remote-tracking branch 'riku/linux-user-for-upstream' into staging
* riku/linux-user-for-upstream: (21 commits)
  linux-user: Handle compressed ISA encodings when processing MIPS exceptions
  linux-user: Unlock mmap_lock when resuming guest from page_unprotect
  linux-user: Reset copied CPUs in cpu_copy() always
  linux-user: Fix epoll on ARM hosts
  linux-user: fix segmentation fault passing with h2g(x) != x
  linux-user: Fix pipe syscall return for SPARC
  linux-user: Fix target_stat and target_stat64 for OpenRISC
  linux-user: Avoid conditional cpu_reset()
  configure: Make NPTL non-optional
  linux-user: Enable NPTL for x86-64
  linux-user: Add i386 TLS setter
  linux-user: Clean up handling of clone() argument order
  linux-user: Add missing 'break' in i386 get_thread_area syscall
  linux-user: Enable NPTL for m68k
  linux-user: Enable NPTL for SPARC targets
  linux-user: Enable NPTL for OpenRISC
  linux-user: Move includes of target-specific headers to end of qemu.h
  configure: Enable threading for unicore32-linux-user
  configure: Enable threading on all ppc and mips linux-user targets
  configure: Don't say target_nptl="no" if there is no linux-user target
  ...

Conflicts:
	linux-user/main.c

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 15:56:06 -05:00
Michael R. Hines 2da776db48 rdma: core logic
Code that does need to be visible is kept
well contained inside this file and this is the only
new additional file to the entire patch.

This file includes the entire protocol and interfaces
required to perform RDMA migration.

Also, the configure and Makefile modifications to link
this file are included.

Full documentation is in docs/rdma.txt

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Chegu Vinod <chegu_vinod@hp.com>
Tested-by: Chegu Vinod <chegu_vinod@hp.com>
Tested-by: Michael R. Hines <mrhines@us.ibm.com>
Signed-off-by: Michael R. Hines <mrhines@us.ibm.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
2013-07-23 11:12:00 +02:00
Peter Maydell 24cb36a61c configure: Make NPTL non-optional
Now all linux-user targets support building with NPTL, we can make it
mandatory. This is a good idea because:
 * NPTL is no longer new and experimental; it is completely standard
 * in practice, linux-user without NPTL is nearly useless for
   binaries built against non-ancient glibc
 * it allows us to delete the rather untested code for handling
   the non-NPTL configuration

Note that this patch leaves the CONFIG_USE_NPTL ifdefs in the
bsd-user codebase alone. This makes no change for bsd-user, since
our configure test for NPTL had a "#include <linux/futex.h>"
which means bsd-user would never have been compiled with
CONFIG_USE_NPTL defined, and it still is not.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2013-07-22 21:54:52 +03:00
Peter Maydell 2667e71c3d linux-user: Enable NPTL for x86-64
Add x86-64 implementation of cpu_set_tls() (like the kernel, we
just have to call do_arch_prctl() to set FS); this allows us to
enable NPTL.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2013-07-22 21:54:46 +03:00
Alexander Graf bc22eb447c linux-user: Add i386 TLS setter
We can easily set the TLS on i386. Add code to do so.

Signed-off-by: Alexander Graf <agraf@suse.de>
[PMM: also remove "target_nptl=no" line from configure, for
 consistency with other patches in this series]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2013-07-22 21:54:42 +03:00
Peter Maydell 1ccd9374af linux-user: Enable NPTL for m68k
For m68k, per-thread data is a purely kernel construct with no
CPU level support. Implement it via a field in the TaskState structure,
used by cpu_set_tls() and the set_thread_area/get_thread_area
syscalls. This allows us to enable compilation with NPTL.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by:  Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2013-07-22 21:54:20 +03:00
Peter Maydell f5147c93d0 linux-user: Enable NPTL for SPARC targets
Provide the missing cpu_set_tls(), and resolve the FIXME in
cpu_clone_regs() by clearing the carry flag for the child.
This allows us to turn on building with NPTL for SPARC.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2013-07-22 21:54:15 +03:00
Peter Maydell 442a59c8dd linux-user: Enable NPTL for OpenRISC
The OpenRISC kernel ignores CLONE_SETTLS in its copy_thread()
implementation, so a cpu_set_tls() implementation is a no-op.
cpu_clone_regs() was setting the syscall return value in the
wrong register -- it is gpr[11], not gpr[2]. With these two
things fixed, we can compile with NPTL enabled.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Jia Liu <proljc@gmail.com>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2013-07-22 21:54:12 +03:00
Peter Maydell 790d440605 configure: Enable threading for unicore32-linux-user
unicore32-linux-user provides cpu_set_tls(), so the failure
to enable target_nptl was presumably an oversight. Enable it.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2013-07-22 21:54:02 +03:00
Peter Maydell d769c64147 configure: Enable threading on all ppc and mips linux-user targets
Though threading (target_nptl) was enabled on the base PPC and MIPS
targets, it wasn't enabled for the variants mipsn32, mipsn32el,
mips64, mips64el, ppc64 or ppc46abi32 (probably an oversight).
Enable threading consistently on all these targets.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2013-07-22 21:53:54 +03:00
Peter Maydell fa78f3dbe4 configure: Don't say target_nptl="no" if there is no linux-user target
For architectures with no linux-user target, don't claim no NPTL
support. This has no behavioural change, but it means that we
won't accidentally add a new linux-user target without threading
support in future (because attempting to do so would be a compile
failure rather than a silent lack of support).

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2013-07-22 21:53:46 +03:00
Peter Maydell aa004f5f9c configure: Flip default of target_nptl
Most targets either (a) support threading or (b) don't have a
linux-user/bsd-user target, so make it default to 'yes', with those
targets that don't support threading having to specifically say so.

This is a mechanical no-behaviour-change commit; some of the
"no" entries it adds will be taken out in later patches.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2013-07-22 21:53:29 +03:00
Bharata B Rao 0c14fb47ec gluster: Add discard support for GlusterFS block driver.
Implement bdrv_aio_discard for gluster.

Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-19 12:29:21 +08:00
Bharata B Rao e01bee0881 gluster: Use pkg-config to configure GlusterFS block driver
Use pkg-config to determine the version and library dependency
for GlusterFS block driver.

Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-19 12:29:21 +08:00
Peter Maydell 0d185e6388 configure: Provide more helpful message if libvte not present
If the system has GTK but not libvte, it's more helpful to
tell the user that libvte is missing than to simply say that
GTK is not present.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1374162121-31582-1-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18 11:21:42 -05:00
Richard Henderson f290e4988d Merge git://github.com/hw-claudio/qemu-aarch64-queue into tcg-next 2013-07-15 13:21:10 -07:00
Jani Kokkonen c6d8ed24b4 tcg/aarch64: Implement tlb lookup fast path
Supports CONFIG_QEMU_LDST_OPTIMIZATION

Signed-off-by: Jani Kokkonen <jani.kokkonen@huawei.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com>
2013-07-15 13:13:46 +02:00
Richard Henderson 964c6fa16f configure: Simplify alternate .text segment
For bsd-user and linux-user emulation modes QEMU needs to be linked at an
alternate .text segment address, so that it's out of the way of the guest
executable.  Instead of including modified linker scripts for each arch,
just set the address with -Ttext-segment if supported, or by using sed to
edit the default linker script.

Cc: Ed Maste <emaste@freebsd.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Acked-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Ed Maste <emaste@freebsd.org>
Message-id: 1371867016-7660-1-git-send-email-rth@twiddle.net
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-09 13:13:20 -05:00
Peter Maydell 464e3671f9 configure: Add signed*signed check to [u]int128_t test
clang 3.3 with -fsanitize=undefined will fail to link code containing an
int128_t * int128_t multiply (http://llvm.org/bugs/show_bug.cgi?id=16404)
so add this to our configure test for whether [u]int128_t are usable.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-21 22:54:24 +04:00
Andreas Färber f2c4ddd9c3 configure: Fix "ERROR: ERROR: " for missing/incompatible DTC
error_exit already prepends "ERROR: ", so no need to print it manually.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-21 22:52:50 +04:00
Peter Maydell e169e1e1ae configure: Require libfdt for arm, ppc, microblaze softmmu targets
A number of our softmmu targets (PPC, ARM, Microblaze) now more or
less require flattened device tree support for various board models
to work correctly.  Make libfdt mandatory if the target list includes
these, rather than building unhelpful half-functional binaries.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Tested-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Message-id: 1369409217-7553-2-git-send-email-peter.maydell@linaro.org
2013-06-14 15:34:19 +01:00
Peter Crosthwaite 96ce654576 configure: dtc: Probe for libfdt_env.h
Currently QEMU provides a local clone of the file libfdt_env.h in
/include. This file is supposed to come with the libfdt package and is
only needed for broken installs of libfdt. Now that we have submodule
dtc, just ignore these broken installs and prompt for the dtc submodule
install instead. QEMU's local libfdt_env.h is removed accordingly.

Manifests as a bug when building QEMU with modern libfdt. The new
version of libfdt does not compile when QEMUs libfdt_env.h takes
precedence over the hosts.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 9b6a3a52e3f46cfbc1ded9ab56385ec045e46705.1369628289.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-14 15:33:12 +01:00
Paolo Bonzini c02a9552a4 build: drop TARGET_TYPE
Just use the TARGET_NAME free string.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1370349928-20419-6-git-send-email-pbonzini@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-14 15:33:12 +01:00
Paolo Bonzini 2e59915d43 main: use TARGET_ARCH only for the target-specific #define
Everything else needs to match the executable name, which is
TARGET_NAME.

Before:
    $ sh4eb-linux-user/qemu-sh4eb --help
    usage: qemu-sh4 [options] program [arguments...]
    Linux CPU emulator (compiled for sh4 emulation)

After:
    $ sh4eb-linux-user/qemu-sh4eb --help
    usage: qemu-sh4eb [options] program [arguments...]
    Linux CPU emulator (compiled for sh4eb emulation)

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1370349928-20419-5-git-send-email-pbonzini@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-14 15:33:11 +01:00
Paolo Bonzini c1799a8462 build: rename TARGET_ARCH2 to TARGET_NAME
Do not introduce any new use yet.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1370349928-20419-3-git-send-email-pbonzini@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-14 15:33:10 +01:00
Anthony Liguori 301255e630 Merge remote-tracking branch 'mjt/trivial-patches-next' into staging
# By Michael Tokarev (4) and others
# Via Michael Tokarev
* mjt/trivial-patches-next: (26 commits)
  piix: fix some printf errors when debug is enabled
  cputlb: fix debug logs
  create qemu_openpty_raw() helper function and move it to a separate file
  main-loop: do not include slirp/slirp.h, use libslirp.h instead
  libcacard/vscclient: fix leakage of socket on error paths
  linux-headers: Update to v3.10-rc5
  KVM: PPC: Add dummy kvm_arch_init_irq_routing()
  KVM: S390: Add dummy kvm_arch_init_irq_routing()
  KVM: ARM: Add dummy kvm_arch_init_irq_routing()
  ivshmem: add missing error exit(2)
  hw/xen: Use g_free instead of free and fix potential memory leaks
  target-sparc: Replace free by g_free
  hw/scsi: Don't increment a boolean value
  device tree: Fix cppcheck warning
  Makefile: Install qemu-img and qemu-nbd man pages only if built
  Unbreak -no-quit for GTK, validate SDL options
  gtk: implement -full-screen
  char/serial: serial_ioport_write: Factor out common code
  char/serial: Use generic Fifo8
  char/serial: cosmetic fixes.
  ...

Message-id: 1371207042-17980-1-git-send-email-mjt@msgid.tls.msk.ru
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-14 07:51:45 -05:00
Anthony Liguori 5f13731f8c Merge remote-tracking branch 'afaerber/qom-cpu' into staging
# By Andreas Färber (12) and others
# Via Andreas Färber
* afaerber/qom-cpu:
  spapr_rtas: Abstract rtas_start_cpu() with qemu_get_cpu()
  spapr_rtas: Abstract rtas_query_cpu_stopped_state() with qemu_get_cpu()
  memory_mapping: Improve qemu_get_guest_memory_mapping() error reporting
  dump: Abstract dump_init() with cpu_synchronize_all_states()
  cpu: Change default for CPUClass::get_paging_enabled()
  dump: Drop qmp_dump_guest_memory() stub and build for all targets
  memory_mapping: Drop qemu_get_memory_mapping() stub
  cpu: Turn cpu_get_memory_mapping() into a CPUState hook
  memory_mapping: Move MemoryMappingList typedef to qemu/typedefs.h
  cpu: Turn cpu_paging_enabled() into a CPUState hook
  monitor: Simplify do_inject_mce() with qemu_get_cpu()
  target-i386: cpu: Fix potential buffer overrun in get_register_name_32()
  target-i386: Set level=4 on Conroe/Penryn/Nehalem
  target-i386: Update model values on Conroe/Penryn/Nehalem CPU models
  pc: Create pc-*-1.6 machine-types
  pc: Fix crash when attempting to hotplug CPU with negative ID
  dump: Move stubs into libqemustub.a
2013-06-14 07:51:30 -05:00
Claudio Fontana 1f0803137d configure: permit compilation on arm aarch64
support compiling on aarch64.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Message-id: 51A5C5ED.90103@huawei.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-12 16:20:23 +01:00
Jani Kokkonen 6a91c7c978 tcg/aarch64: implement user mode qemu ld/st
also put aarch64 in the list of archs that do not need an ldscript.

Signed-off-by: Jani Kokkoken <jani.kokkonen@huawei.com>
Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 51AF40EE.1000104@huawei.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-12 16:20:23 +01:00
Peter Maydell 6692689543 configure: Drop CONFIG_ATFILE test
Nobody uses the CONFIG_ATFILE test now, so just drop it.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Tested-by: Claudio Fontana <claudio.fontana@huawei.com>
Message-id: 1370126121-22975-3-git-send-email-peter.maydell@linaro.org
2013-06-12 16:20:22 +01:00
Ed Maste 45f0b0434d configure: Disable host-bsd USB on FreeBSD
It hasn't built since FreeBSD 8.x, and is disabled by a patch in the
FreeBSD ports tree.  FreeBSD is migrating to QEMU's libusb support.

Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-11 23:45:43 +04:00
Ed Maste 224ead2690 configure: remove ${config_host_ld} variable
It was only used in one place (and already expanded in one other).

Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-11 23:45:43 +04:00
Andreas Färber 2a78636bd2 dump: Drop qmp_dump_guest_memory() stub and build for all targets
qmp_dump_guest_memory() calls dump_init() and returns an Error when
cpu_get_dump_info() returns an error, as done by the stub.
So there is no need to have a stub for qmp_dump_guest_memory().

Enable the documentation of the always-present dump-guest-memory command.

That way we can drop CONFIG_HAVE_CORE_DUMP and leave configure
completely out of the picture for target CPU features.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-11 18:16:36 +02:00
Andreas Färber c22d8e0448 memory_mapping: Drop qemu_get_memory_mapping() stub
dump.c:dump_init() never checked for the return code anyway.
If paging is not enabled, it will fall back to an identity map.
If paging is enabled and getting memory mapping list is not
implemented, qemu_get_guest_memory_mapping() will return an error.

Since the targets not implementing memory mapping also don't implement
dump support, we will not reach this code today and can worry about
changing cpu_paging_enabled() default when the need arises.

This allows us to drop CONFIG_HAVE_GET_MEMORY_SUPPORT.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-11 18:10:44 +02:00
Fam Zheng b64ec4e4ad block: add block driver read only whitelist
We may want to include a driver in the whitelist for read only tasks
such as diagnosing or exporting guest data (with libguestfs as a good
example). This patch introduces a readonly whitelist option, and for
backward compatibility, the old configure option --block-drv-whitelist
is now an alias to rw whitelist.

Drivers in readonly list is only permitted to open file readonly, and
returns -ENOTSUP for RW opening.

E.g. To include vmdk readonly, and others read+write:
    ./configure --target-list=x86_64-softmmu \
                --block-drv-rw-whitelist=qcow2,raw,file,qed \
                --block-drv-ro-whitelist=vmdk

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-06-04 12:11:58 +02:00
Peter Maydell 25b483381a configure: Report unknown target names more helpfully
If the user specifies a target list themselves, check each entry
to make sure it's a target we recognise. This allows us to print
a helpful error message, rather than falling through (where we
would probably eventually end up hitting the uninformative
"ERROR: Unsupported target CPU").

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1369062976-301-3-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-03 13:24:45 -05:00
Peter Maydell 6e92f823b6 configure: Autogenerate default target list
Autogenerate the default target list based on what files exist
in default-configs; this allows us to remove one of the places
that has to be kept up to date with a complete list of every
target we support.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1369062976-301-2-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-03 13:24:45 -05:00
Alexey Kardashevskiy a585140dd5 qemu: fix out of tree cross compile
The symlink to "asm" platform linux headers is made in the build tree by
the configure script but gcc is not told to look for them there.

The patch fixes this.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-01 14:25:39 +04:00
Ed Maste cfeda5f4b8 configure: try pkg-config ncurses first
When probing for ncurses, try pkg-config first rather than after
explicit -lncurses and -lcurses.  This fixes static linking in the case
that ncurses has additional dependencies, such as -ltinfo (as on FreeBSD).

Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-01 14:25:38 +04:00
Ed Maste cbc8d595ef configure: remove confusing file manipulation
The configure script had some code to manipulate config-host.ld~ (i.e.,
a common backup filename), comparing it with the newly-generated file.
I believe the sense of the comparison was backwards.

Since it seemed to serve little purpose anyway, remove it to avoid any
confusion.

Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-01 14:25:38 +04:00
Michael Tokarev a3605bf696 don't run pkg-config for features explicitly disabled
We test pkg-config for curses and curl even if those are explicitly
disabled.  Move these tests inside `if "$feature" != "no"' sections.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-01 14:25:38 +04:00
Laszlo Ersek 5a699bbbf3 configure: don't save any fixed local_statedir for win32
... because now we can get the dynamic value with
qemu_get_local_state_pathname().

The only user of the fixed value was the guest agent, which we've moved to
qemu_get_local_state_pathname() in the previous patch.

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-05-30 11:37:37 -05:00
Brad Smith 4f6ab397b6 Remove OSS support for OpenBSD
Remove the OSS support for OpenBSD. The OSS API has not been usable
for quite some time.

Signed-off-by: Brad Smith <brad@comstyle.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-05-26 11:14:52 +00:00
Stefan Weil 1405b6290f w32: Fix configure test for -march=i486
The latest version of MinGW needs a test for __sync_val_compare_and_swap
to fix a missing symbol linker error.

Reported-by: Igor Mitsyanko <i.mitsyanko@gmail.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Message-id: 1368301619-32097-2-git-send-email-sw@weilnetz.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-15 08:49:28 -05:00
Peter Maydell 2d16c8e988 configure: Detect uuid on MacOSX (fixes compile failure)
Commit 7791dba3ec broke compilation on MacOSX, because it introduced
a new include of util.h. On MacOSX this includes pwd.h which in turn
includes the system uuid/uuid.h, which causes a compile failure if
QEMU was configured without CONFIG_UUID due to a conflict between
the system header and our fallback versions:
  block/vdi.c:124:20: error: static declaration of 'uuid_generate'
  follows non-static declaration
  static inline void uuid_generate(uuid_t out)
                     ^
  /usr/include/uuid/uuid.h:63:6: note: previous declaration is here
  void uuid_generate(uuid_t out);
       ^

Fix this breakage by improving configure's check for uuid to work on
MacOSX (where there is no need to link in a separate libuuid).

Note that if the user explicitly runs configure with '--disable-uuid'
on MacOSX then QEMU will fail to compile.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1368563799-22755-1-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-15 08:49:08 -05:00
Paolo Bonzini 3556c233d9 qom: allow turning cast debugging off
Cast debugging can have a substantial cost (20% or more).  Instead of adding
special-cased "fast casts" in the hot paths, we can just disable it in
releases.  The tracing facilities we just added make it easier to analyze
those problems that cast debugging would reveal.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1368188203-3407-7-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-13 09:52:06 -05:00
Dominik Dingel e89e33e12e S390: BIOS create link to src folder for .img file
For *.img files, there will be a link created directly to the src folder,
like for all other blobs.

Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-06 17:30:00 +02:00
Peter Maydell 8e515b125d configure: Check that "libtool" is not the MacOSX one
The "libtool" binary on MacOSX is not GNU libtool, and doesn't support
anything like the same set of command line options. Test whether we
have accidentally picked this up (by looking for whether it handles
the GNU --version switch), and discard it if so. The fallback machinery
for the "we don't have a libtool" case will work fine. This fixes a
failure in "make install" on MacOSX.

Reported-by: Peter Cheung <mcheung63@hotmail.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1367701071-6630-1-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-06 06:52:03 -05:00
Eiichi Tsukata 781e9545db trace: Add ftrace tracing backend
This patch adds a ftrace tracing backend which sends trace event to
ftrace marker file. You can effectively compare qemu trace data and
kernel(especially, kvm.ko when using KVM) trace data.
The ftrace backend is restricted to Linux only.

To try out the ftrace backend:

 $ ./configure --trace-backend=ftrace
 $ make

if you use KVM, enable kvm events in ftrace:

 # sudo echo 1 > /sys/kernel/debug/tracing/events/kvm/enable

After running qemu by root user, you can get the trace:

 # cat /sys/kernel/debug/tracing/trace

Signed-off-by: Eiichi Tsukata <eiichi.tsukata.xh@hitachi.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-05-03 13:58:09 +02:00
Andreas Färber 372e47e9b5 configure: Pick up libseccomp include path
openSUSE 12.3 has seccomp.h in /usr/include/libseccomp-1.0.1,
so add `pkg-config --cflags libseccomp` output to QEMU_CFLAGS.

Cc: qemu-stable@nongnu.org
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-05-01 20:52:26 +04:00
Paolo Bonzini 98af93fde2 audio: replace audio card configuration with default-configs
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1366303444-24620-6-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-29 12:16:37 -05:00
Paolo Bonzini f6547f07d4 audio: remove CONFIG_* symbols
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1366303444-24620-5-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-29 12:16:36 -05:00
Paolo Bonzini ffa48cf5ab audio: remove HAS_AUDIO
Several targets can have wavcapture/-soundhw support via PCI cards.
HAS_AUDIO is a useless limitation, remove it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1366303444-24620-4-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-29 12:16:36 -05:00
Paolo Bonzini 36cd6f6f20 audio: remove the need for audio card CONFIG_* symbols
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1366303444-24620-3-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-29 12:16:36 -05:00
Richard Henderson df5e0ef711 tcg-arm: Convert to CONFIG_QEMU_LDST_OPTIMIZATION
Move the slow path out of line, as the TODO's mention.
This allows the fast path to be unconditional, which can
speed up the fast path as well, depending on the core.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-04-27 02:16:45 +02:00
Christian Borntraeger 9933c30509 s390-ccw.img: build s390-ccw rom on s3900 system by default
Lets build the s390-ccw rom if on s390. Also fix the separate build
folder case.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26 20:18:24 +02:00
Richard W.M. Jones 4fc16838b8 block/ssh: Require libssh2 >= 1.2.8.
libssh2 >= 1.2.8 is required to enable this block device (because
that version introduced the libssh2_session_handshake call).

Change the test to use pkg-config exclusively.  If the user requests
--enable-libssh2 and the minimum version is not available, then the
following error is displayed:

  $ ./configure --enable-libssh2

  ERROR: libssh2 >= 1.2.8 required for --enable-libssh2

If --enable-libssh2 is not specified, then the feature is silently
disabled if sufficiently new libssh2 is not available.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-04-26 13:26:27 +02:00
Marc-André Lureau 37746c5eac build-sys: must link with -fstack-protector
It is needed to give that flag to the linker as well, but latest
libtool 2.4.2 still swallows that argument, so let's pass it with
libtool -Wc argument.

qemu-1.4.0/stubs/arch-query-cpu-def.c:6: undefined reference to `__stack_chk_guard'

Signed-off-by: Marc-André Lureau <mlureau@redhat.com>
Reviewed-by: Alon Levy <alevy@redhat.com>
2013-04-24 11:47:38 +03:00
Gerd Hoffmann 3f5cc97e2b usb-host: raise libusbx minimum version to 1.0.13
Allows to remove one FIXME.  Makes LIBUSB_LOG_LEVEL_WARNING build errors
go away.  And starting with that version libusb has a LIBUSBX_API_VERSION
define which allows to easily #ifdef version dependencies should that
need arrive in the future.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-04-23 08:43:10 +02:00
Nicholas Bellinger 5e9be92d77 vhost-scsi: new device supporting the tcm_vhost Linux kernel module
The WWPN specified in configfs is passed to "-device vhost-scsi-pci".
The tgpt field of the SET_ENDPOINT ioctl is obsolete now, so it is not
available from the QEMU command-line.  Instead, I hardcode it to zero.

Changes in Patch-v2:
   - Add vhost_scsi_get_features() in order to determine feature bits
     supports by host kernel (mst + nab)
   - Re-enable usage of DEFINE_VIRTIO_COMMON_FEATURES, and allow
     EVENT_IDX to be disabled by host in vhost_scsi_get_features()
   - Drop unused hotplug bit in DEFINE_VHOST_SCSI_PROPERTIES

Changes in Patch-v1:
   - Set event_idx=off by default (nab, thanks asias)
   - Disable hotplug feature bit for v3.9 tcm_vhost kernel code, need to
     re-enable in v3.10 (nab)
   - Update to latest qemu.git/master HEAD

Changes in WIP-V3:
   - Drop ioeventfd vhost_scsi_properties (asias, thanks stefanha)
   - Add CONFIG_VHOST_SCSI (asias, thanks stefanha)
   - Add hotplug feature bit

Changes in WIP-V2:
   - Add backend guest masking support (nab)
   - Bump ABI_VERSION to 1 (nab)
   - Set up set_guest_notifiers (asias)
   - Set up vs->dev.vq_index (asias)
   - Drop vs->vs.vdev.{set,clear}_vhost_endpoint (asias)
   - Drop VIRTIO_CONFIG_S_DRIVER check in vhost_scsi_set_status (asias)

Howto:
   Use the latest seabios, at least commit b44a7be17b
   git clone git://git.seabios.org/seabios.git
   make
   cp out/bios.bin /usr/share/qemu/bios.bin
   qemu -device vhost-scsi-pci,wwpn=naa.6001405bd4e8476d,event_idx=off
...

Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Asias He <asias@redhat.com>
[ Rebase on top of VirtIOSCSICommon patch, fix bugs in feature
  negotiation and irqfd masking - Paolo ]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-19 16:18:11 +02:00
Paolo Bonzini 09dada4003 configure: remove duplicate test
We already had a test to add -march=i486 when needed.  Make the
existing test independent of vhost-net, so that it is also used
under Win32.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-18 14:12:31 +02:00
Paolo Bonzini 15c08efebd configure: CONFIG_NO_XEN is duplicated
We already define it in Makefile.target.  But we need to avoid a
curious double negation in order to eliminate it.

Tested-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-18 14:12:31 +02:00
Paolo Bonzini 2b6b7099fb configure: eliminate target_libs_softmmu
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-18 14:12:31 +02:00
Paolo Bonzini f544a488e5 configure: move common libraries to config-host.mak
Move -lm to the end of the line, so that it can be picked up as a
dependency by pixman in the static build case.

Reviewed-by: Peter Maydell <peter.maydell@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-18 14:12:31 +02:00
Paolo Bonzini 727e52838c configure: move CONFIG_QEMU_LDST_OPTIMIZATION to config-host.mak
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-18 14:12:31 +02:00
Paolo Bonzini 918fc54caf elfload: use abi_llong/ullong instead of target_llong/ullong
The alignment is a characteristic of the ABI, not the CPU.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-18 14:12:31 +02:00
Paolo Bonzini 6cfd9b5251 elfload: only give abi_long/ulong the alignment specified by the target
Previously, this was done for target_long/ulong, and propagated to
abi_long/ulong via a typedef.  But target_long/ulong should not
have any specific alignment, it is never used to access guest
memory.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-18 14:12:31 +02:00
Paolo Bonzini f8fd4fc4cd elfload: use abi_int/uint instead of target_int/uint
The alignment is a characteristic of the ABI, not the CPU.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-18 14:12:31 +02:00
Paolo Bonzini 1ddd592fd3 elfload: use abi_short/ushort instead of target_short/ushort
The alignment is a characteristic of the ABI, not the CPU.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-18 14:12:31 +02:00
Paolo Bonzini 5b5e303701 configure: QEMU_INCLUDES are the same for all subtargets
Reviewed-by: Peter Maydell <peter.maydell@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-18 14:12:31 +02:00
Peter Crosthwaite a540f158db configure/Make: Build libfdt from submodule DTC
Configure to use the DTC submodule to build libfdt when no system libfdt
is found. Prompt to install the DTC submodule if --enable-fdt is set but
no DTC can be found.

DTC has no out-of-tree build capability, so the configure will symlink
the Makefile and scripts directory in the out of tree build directory
and pass in all the needed DTC arguments to make out of tree build happen.
Ideally we fix the DTC make to support out of tree, but did it this way to
avoid commits to DTC.

Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-18 13:50:53 +02:00
Peter Crosthwaite 79f3b12f70 configure: Put cross compile flags in EXTRA_CFLAGS
The cross compile CFLAGS are needed to properly build pixman (and any other
submodules). Only the EXTRA_CFLAGS set is passed to submodules not QEMU_CFLAGS,
so put the cross compile flags in EXTRA_CFLAGS instead.

Signed-off-by: Peter Crosthwaite peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-18 13:50:53 +02:00
Markus Armbruster e6f53fd514 Fix warnings suppressors to honor --disable-werror
Replace

    #pragma GCC diagnostic ignored FOO
    [Troublesome code...]
    #pragma GCC diagnostic error FOO

by

    #pragma GCC diagnostic push
    #pragma GCC diagnostic ignored FOO
    [Troublesome code...]
    #pragma GCC diagnostic pop

Broken in commit 3f4349d, commit 092bb30, and commit c95e308.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1366113066-1340-1-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-17 10:28:04 -05:00
Anthony Liguori c4efe1cada qtest: add libqos including PCI support
This includes basic PCI support for the PC platform.  Enough
abstraction should be present to support non-PC platforms too.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1366123521-4330-3-git-send-email-aliguori@us.ibm.com
2013-04-17 10:26:05 -05:00
Gerd Hoffmann 2b2325ff64 use libusb for usb-host
Reimplement usb-host on top of libusb.
Reasons to do this:

 (1) Largely rewritten from scratch, nice opportunity to kill historical
     cruft.
 (2) Offload usbfs handling to libusb.
 (3) Have a single portable code base instead of bsd + linux variants.
 (4) Bring usb-host support to any platform supported by libusbx.

For now this goes side-by-side to the existing code.  That is only to
simplify regression testing though, at the end of the day I want remove
the old code and support libusb exclusively.  Merge early in 1.5 cycle,
remove the old code after 1.5 release or something like this.

Thanks to qdev the old and new code can coexist nicely on linux.  Just
use "-device usb-host-linux" to use the old linux driver instead of the
libusb one (which takes over the "usb-host" name).

The bsd driver isn't qdev'ified so it isn't that easy for bsd.
I didn't bother making it runtime switchable, so you have to rebuild
qemu with --disable-libusb to get back the old code.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-04-16 12:04:09 +02:00
Anthony Liguori 4ceb193d30 Merge remote-tracking branch 'bonzini/hw-dirs' into staging
* bonzini/hw-dirs:
  exec: remove useless declarations from memory-internal.h
  memory: move core typedefs to qemu/typedefs.h
  include: avoid useless includes of exec/ headers
  sysemu: avoid proliferation of include/ subdirectories
  tpm: reorganize headers and split hardware part
  configure: fix TPM logic
  acpi.h: make it self contained
  acpi: move declarations from pc.h to acpi.h
  hw: Add lost ARM core again
  Fix failure to create q35 machine
  Add linux-headers to QEMU_INCLUDES
  arm: fix location of some include files

Conflicts:
	configure

aliguori: trivial conflict in configure output

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-15 17:06:04 -05:00
Richard Henderson 1e6e9aca15 tcg-ppc64: Use getauxval for ISA detection
Glibc 2.16 includes an easy way to get feature bits previously
buried in /proc or the program startup auxiliary vector.  Use it.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-04-15 20:09:54 +02:00
Paolo Bonzini 3b8acc11d3 configure: fix TPM logic
A non-native i386 or x86_64 emulator should not have TPM passthrough
support, since the TPM is only present for those hosts.

Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-15 15:16:41 +02:00
Jan Kiszka fd123245b9 Add linux-headers to QEMU_INCLUDES
virtio/dataplane/vring.c requires the Linux headers and is built for all
targets. So we need to add the corresponding include to QEMU_INCLUDES to
avoid that outdated distribution headers are used.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-15 15:16:22 +02:00
Richard W.M. Jones 9a2d462e7b block: ssh: Use libssh2_sftp_fsync (if supported by libssh2) to flush to disk.
libssh2_sftp_fsync is an extension to libssh2 to support fsync(2) over
sftp, which is itself an extension of OpenSSH.

If both libssh2 and the ssh daemon support it, this will allow
bdrv_flush_to_disk to commit changes through to disk on the remote
server.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-04-15 10:18:05 +02:00
Richard W.M. Jones 0a12ec87a5 block: Add support for Secure Shell (ssh) block device.
qemu-system-x86_64 -drive file=ssh://hostname/some/image

QEMU will ssh into 'hostname' and open '/some/image' which is made
available as a standard block device.

You can specify a username (ssh://user@host/...) and/or a port number
(ssh://host:port/...).  You can also use an alternate syntax using
properties (file.user, file.host, file.port, file.path).

Current limitations:

- Authentication must be done without passwords or passphrases, using
  ssh-agent.  Other authentication methods are not supported.

- Uses a single connection, instead of concurrent AIO with multiple
  SSH connections.

This is implemented using libssh2 on the client side.  The server just
requires a regular ssh daemon with sftp-server support.  Most ssh
daemons on Unix/Linux systems will work out of the box.

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-04-15 10:18:05 +02:00
Peter Maydell c30d1aea14 cpu-exec: Allow "-d exec" in non-debug builds (drop CONFIG_DEBUG_EXEC)
The CONFIG_DEBUG_EXEC define compiles out a single qemu_log_mask()
call, which is a pretty trivial cost even for something in the main
cpu_exec() loop.  Having this be conditionally defined means that
'-d exec' on a non-debug build will silently do nothing.  Drop the
define and the configure machinery that sets it, in favour of just
always allowing this log option to be enabled at runtime.  As a
concession to the mainloopiness, we use qemu_loglevel_mask()+qemu_log()
rather than qemu_log_mask() to avoid the function call overhead.

Note that DEBUG_DISAS is always defined, so removing the
'|| defined(CONFIG_DEBUG_EXEC)' from those conditionals makes
no behavioural change for that logging.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-04-12 14:33:21 +02:00
Anthony Liguori 47b5264eb3 Merge remote-tracking branch 'bonzini/hw-dirs' into staging
# By Paolo Bonzini
# Via Paolo Bonzini
* bonzini/hw-dirs: (35 commits)
  hw: move private headers to hw/ subdirectories.
  MAINTAINERS: update for source code movement
  hw: move last file to hw/arm/
  hw: move hw/kvm/ to hw/i386/kvm
  hw: move ARM CPU cores to hw/cpu/, configure with default-configs/
  hw: move other devices to hw/misc/, configure with default-configs/
  hw: move NVRAM interfaces to hw/nvram/, configure with default-configs/
  hw: move GPIO interfaces to hw/gpio/, configure with default-configs/
  hw: move interrupt controllers to hw/intc/, configure with default-configs/
  hw: move DMA controllers to hw/dma/, configure with default-configs/
  hw: move VFIO and ivshmem to hw/misc/
  hw: move PCI bridges to hw/pci-* or hw/ARCH
  hw: move SD/MMC devices to hw/sd/, configure with default-configs/
  hw: move timer devices to hw/timer/, configure with default-configs/
  hw: move ISA bridges and devices to hw/isa/, configure with default-configs/
  hw: move char devices to hw/char/, configure via default-configs/
  hw: move more files to hw/xen/
  hw: move SCSI controllers to hw/scsi/, configure via default-configs/
  hw: move SSI controllers to hw/ssi/, configure via default-configs/
  hw: move I2C controllers to hw/i2c/, configure via default-configs/
  ...

Message-id: 1365442249-18259-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-08 13:12:33 -05:00
Paolo Bonzini 6e7907468f hw: move virtio devices to hw/ subdirectories
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08 18:13:12 +02:00
Peter Maydell 7c2acc7062 configure: Don't fall back to gthread coroutine backend
The gthread coroutine backend is broken and does not produce a working
QEMU; it is only useful for some very limited debugging situations.
Clean up the backend selection logic in configure so that it now runs
"if on windows use windows; else prefer ucontext; else sigaltstack".

To do this we refactor the configure code to separate out "test
whether we have a working ucontext", "pick a default if user didn't
specify" and "validate that user didn't specify something invalid",
rather than having all three of these run together. We also simplify
the Makefile logic so it just links in the backend the configure
script selects.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1365419487-19867-3-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-08 10:38:44 -05:00
Peter Maydell 76ad07a493 configure: Provide and use convenience error reporting function
Provide a convenience function for reporting an error and exiting,
and update various places in the configure script to use it.
This allows us to be a little more consistent about how format
our error messages and makes the calling code shorter.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1365419487-19867-2-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-08 10:38:44 -05:00