summaryrefslogtreecommitdiff
path: root/configure
AgeCommit message (Collapse)AuthorFilesLines
2018-03-12Merge remote-tracking branch ↵Peter Maydell1-2/+7
'remotes/kraxel/tags/audio-20180312-pull-request' into staging modules: use gmodule-export. audio: add driver registry, enable module builds. # gpg: Signature made Mon 12 Mar 2018 10:42:19 GMT # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/audio-20180312-pull-request: audio/sdl: build as module audio/pulseaudio: build as module audio/oss: build as module audio/alsa: build as module build: enable audio modules audio: add module loading support audio: add driver registry modules: use gmodule-export Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-03-12audio/sdl: build as moduleGerd Hoffmann1-1/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180306074053.22856-8-kraxel@redhat.com
2018-03-12audio/pulseaudio: build as moduleGerd Hoffmann1-1/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180306074053.22856-7-kraxel@redhat.com
2018-03-12audio/oss: build as moduleGerd Hoffmann1-1/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180306074053.22856-6-kraxel@redhat.com
2018-03-12audio/alsa: build as moduleGerd Hoffmann1-1/+6
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180306074053.22856-5-kraxel@redhat.com
2018-03-12modules: use gmodule-exportGerd Hoffmann1-1/+1
As we want qemu symbols be exported to modules we should use the gmodule-export-2.0 pkg-config instead of gmodule-2.0. Cc: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180308085301.8875-2-kraxel@redhat.com
2018-03-12sdl: workaround bug in sdl 2.0.8 headersGerd Hoffmann1-0/+1
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892087 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20180307154258.9313-1-kraxel@redhat.com
2018-03-12build: try improve handling of clang warningsGerd Hoffmann1-1/+1
This patch disables the pragma diagnostic -Wunused-but-set-variable for clang in util/coroutine-ucontext.c. This in turn allows us to remove it from the configure check, so the CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE will succeed for clang. With that in place clang builds (linux) will use -Werror by default, which breaks the build due to warning about unaligned struct members. Just turning off this warning isn't a good idea as it indicates portability problems. So make it a warning again, using -Wno-error=address-of-packed-member. That way it doesn't break the build but still shows up in the logs. Now clang builds qemu without errors. Well, almost. There are some left in the rdma code. Leaving that to the rdma people. All others can use --disable-rdma to workarounds this. Cc: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-Id: <20180309135945.20436-1-kraxel@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2018-03-07RISC-V Build InfrastructureMichael Clark1-0/+13
This adds RISC-V into the build system enabling the following targets: - riscv32-softmmu - riscv64-softmmu - riscv32-linux-user - riscv64-linux-user This adds defaults configs for RISC-V, enables the build for the RISC-V CPU core, hardware, and Linux User Emulation. The 'qemu-binfmt-conf.sh' script is updated to add the RISC-V ELF magic. Expected checkpatch errors for consistency reasons: ERROR: line over 90 characters FILE: scripts/qemu-binfmt-conf.sh Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Sagar Karandikar <sagark@eecs.berkeley.edu> Signed-off-by: Michael Clark <mjc@sifive.com>
2018-03-06Fixing WHPX casing to match SDKJustin Terry (VM) via Qemu-devel1-5/+5
Fixes an issue where the SDK that was releases had a different casing for the *.h and *.lib files causing a build break if linked directly from Windows Kits. Signed-off-by: Justin Terry (VM) <juterry@microsoft.com> Message-Id: <1519665216-1078-2-git-send-email-juterry@microsoft.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Justin Terry (VM) via Qemu-devel <qemu-devel@nongnu.org>
2018-03-06Revert "build-sys: compile with -Og or -O1 when --enable-debug"Paolo Bonzini1-13/+2
This reverts commit 906548689e37ab6cca1e93b3f8d9327a4e17e8af. Even with -Og, the debug experience is noticeably worse because gdb shows a lot more "<optimised out>" variables and function arguments. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-03-06build-sys: fix -fsanitize=address checkMarc-André Lureau1-10/+12
Since 218bb57dd79d6843e0592c30a82ea8c1fddc74a5, the -fsanitize=address check fails with: config-temp/qemu-conf.c:3:20: error: integer overflow in expression [-Werror=overflow] return INT32_MIN / -1; Interestingly, UBSAN check doesn't produce a compile time warning. Use a test that doesn't have compile time warnings, and make it specific to UBSAN check. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20180215212552.26997-2-marcandre.lureau@redhat.com> Reviewed-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-03-05Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180305-pull-request' ↵Peter Maydell1-13/+18
into staging ui: build curses, gtk and sdl as modules. # gpg: Signature made Mon 05 Mar 2018 08:48:24 GMT # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/ui-20180305-pull-request: ui/sdl: build as module audio: rename CONFIG_* to CONFIG_AUDIO_* ui/curses: build as module ui/gtk: build as module configure: opengl doesn't depend on x11 configure: add X11 vars to config-host.mak console: add ui module loading support console: add and use qemu_display_find_default egl-headless: switch over to new display registry curses: switch over to new display registry cocoa: switch over to new display registry sdl: switch over to new display registry console: add qemu display registry, add gtk Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-03-05ui/sdl: build as moduleGerd Hoffmann1-1/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180301100547.18962-14-kraxel@redhat.com
2018-03-05audio: rename CONFIG_* to CONFIG_AUDIO_*Gerd Hoffmann1-1/+1
This avoids a name clash for CONFIG_SDL, which is used by both sdl video support and sdl audio support. It also more clear that this is a audio driver configuration. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180301100547.18962-13-kraxel@redhat.com
2018-03-05ui/curses: build as moduleGerd Hoffmann1-3/+3
Also drop curses libs from libs_softmmu. Add CURSES_{CFLAGS,LIBS} variables so we can use them for linking the curses module. Also make target/unicore32/helper.o depend on curses which uses curses directly for some reason ... Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180301100547.18962-12-kraxel@redhat.com
2018-03-05ui/gtk: build as moduleGerd Hoffmann1-3/+2
Also drop gtk and vte libs from libs_softmmu, so the libs are not pulled in unless the gtk module actually gets loaded. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180301100547.18962-11-kraxel@redhat.com
2018-03-05configure: opengl doesn't depend on x11Gerd Hoffmann1-3/+3
So remove x11 from pkg-config check and don't add x11 cflags/libs to opengl cflags/libs. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180301100547.18962-10-kraxel@redhat.com
2018-03-05configure: add X11 vars to config-host.makGerd Hoffmann1-2/+8
Simplifies handling the X11 dependency, also makes ui/Makefile.objs more readable. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180301100547.18962-9-kraxel@redhat.com
2018-03-02qapi: Don't create useless directory qapi-generatedMarkus Armbruster1-1/+0
We used to generate first test and later QGA QAPI code into qapi-generated/. Commit b93b63f574 moved the test code to tests/. Commit 54c2e50205 moved the QGA code to qga/qapi-generated/. The directory has been unused since. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180211093607.27351-30-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Eric Blake <eblake@redhat.com>
2018-03-01cryptodev: add vhost-user as a new cryptodev backendGonglei1-0/+15
Usage: -chardev socket,id=charcrypto0,path=/path/to/your/socket -object cryptodev-vhost-user,id=cryptodev0,chardev=charcrypto0 -device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0 Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com> Signed-off-by: Jay Zhou <jianjay.zhou@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2018-02-23maintainers: Add myself as a OpenBSD maintainerBrad Smith1-0/+1
Add myself as an OpenBSD maintainer and add OpenBSD as maintained. Signed-off-by: Brad Smith <brad@comstyle.com> Reviewed-by: Kamil Rytarowski <n54@gmx.com> Message-id: 20180216164620.GA53727@humpty.home.comstyle.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-02-19hw/rdma: Implementation of generic rdma device layersYuval Shaia1-4/+5
This layer is composed of two sub-modules, backend and resource manager. Backend sub-module is responsible for all the interaction with IB layers such as ibverbs and umad (external libraries). Resource manager is a collection of functions and structures to manage RDMA resources such as QPs, CQs and MRs. Reviewed-by: Dotan Barak <dotanb@mellanox.com> Reviewed-by: Zhu Yanjun <yanjun.zhu@oracle.com> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
2018-02-13build-sys: check static linking of UBSANMarc-André Lureau1-1/+9
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20180208162343.30809-2-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-02-13build-sys: remove useless extra*flags variablesMarc-André Lureau1-6/+0
Only EXTRA_LDFLAGS seems to be used during configure Xen checks. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20180208162343.30809-1-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-02-10oslib-posix: check for posix_memalign in configure scriptAndreas Gustafsson1-0/+19
Check for the presence of posix_memalign() in the configure script, not using "defined(_POSIX_C_SOURCE) && !defined(__sun__)". This lets qemu use posix_memalign() on NetBSD versions that have it, instead of falling back to valloc() which is wasteful when the required alignment is smaller than a page. Signed-off-by: Andreas Gustafsson <gson@gson.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Kamil Rytarowski <n54@gmx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
2018-02-10configure: Allow capstone=git only if git update is not disabledAlexey Kardashevskiy1-1/+1
Even with --disable-git-update, ./configure tries updating the capstone submodule instead of marking it "no"; this disables capstone submodule if git update is disabled. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Thomas Huth <thuth@redhat.com>
2018-02-09Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20180209' into stagingPeter Maydell1-2/+3
s390x updates: - rework interrupt handling for tcg, smp is now considered non-experimental - some general improvements in the flic - improvements in the pci code, and wiring it up in tcg - add PTFF subfunctions for multiple-epoch to the cpu model - maintainership updates - various other fixes and improvements # gpg: Signature made Fri 09 Feb 2018 09:04:34 GMT # gpg: using RSA key DECF6B93C6F02FAF # gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>" # gpg: aka "Cornelia Huck <huckc@linux.vnet.ibm.com>" # gpg: aka "Cornelia Huck <cornelia.huck@de.ibm.com>" # gpg: aka "Cornelia Huck <cohuck@kernel.org>" # gpg: aka "Cornelia Huck <cohuck@redhat.com>" # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0 18CE DECF 6B93 C6F0 2FAF * remotes/cohuck/tags/s390x-20180209: (29 commits) MAINTAINERS: add David as additional tcg/s390 maintainer MAINTAINERS: reorganize s390-ccw bios maintainership MAINTAINERS: add myself as overall s390x maintainer s390x/pci: use the right pal and pba in reg_ioat() s390x/pci: fixup global refresh s390x/pci: fixup the code walking IOMMU tables s390x/cpumodel: model PTFF subfunctions for Multiple-epoch facility s390x/cpumodel: allow zpci features in qemu model s390x/tcg: wire up pci instructions s390x/sclp: fix event mask handling s390x/flic: cache the common flic class in a central function s390x/kvm: cache the kvm flic in a central function s390x/tcg: cache the qemu flic in a central function configure: s390x supports mttcg now s390x/tcg: remove SMP warning s390x/tcg: STSI overhaul s390x: fix size + content of STSI blocks s390x/flic: optimize CPU wakeup for TCG s390x/flic: implement qemu_s390_clear_io_flic() s390x/tcg: implement TEST PENDING INTERRUPTION ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-02-09configure: s390x supports mttcg nowDavid Hildenbrand1-0/+1
s390x is ready. Most likely we are missing some pieces, but it should already be in pretty good shape now. Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20180129125623.21729-16-david@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2018-02-09Fix configure for s390 qemu on alpine and other busybox environmentsAlice Frosi1-2/+2
In alpine docker image the qemu-system-s390x build is broken and it throws this error: qemu-system-s390x: Initialization of device s390-ipl failed: could not load bootloader 's390-ccw.img' The grep command of busybox uses regex. This fails on binary data (e.g. stops on every \0), so it does not identify the string BiGeNdIaN in the test case big/little. Therefore, it assumes that the architecture is little endian. This fix solves the grep problem by printing the content of TMPO with strings Signed-off-by: Alice Frosi <alice@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> [some changes to patch description, add -a option to strings] Message-Id: <20180130133828.77336-2-borntraeger@de.ibm.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2018-02-08tcg: Add generic vector expandersRichard Henderson1-0/+48
Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2018-02-07Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell1-6/+107
* socket option parsing fix (Daniel) * SCSI fixes (Fam) * Readline double-free fix (Greg) * More HVF attribution fixes (Izik) * WHPX (Windows Hypervisor Platform Extensions) support (Justin) * POLLHUP handler (Klim) * ivshmem fixes (Ladi) * memfd memory backend (Marc-André) * improved error message (Marcelo) * Memory fixes (Peter Xu, Zhecheng) * Remove obsolete code and comments (Peter M.) * qdev API improvements (Philippe) * Add CONFIG_I2C switch (Thomas) # gpg: Signature made Wed 07 Feb 2018 15:24:08 GMT # gpg: using RSA key BFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: (47 commits) Add the WHPX acceleration enlightenments Introduce the WHPX impl Add the WHPX vcpu API Add the Windows Hypervisor Platform accelerator. tests/test-filter-redirector: move close() tests: use memfd in vhost-user-test vhost-user-test: make read-guest-mem setup its own qemu tests: keep compiling failing vhost-user tests Add memfd based hostmem memfd: add hugetlbsize argument memfd: add hugetlb support memfd: add error argument, instead of perror() cpus: join thread when removing a vCPU cpus: hvf: unregister thread with RCU cpus: tcg: unregister thread with RCU, fix exiting of loop on unplug cpus: dummy: unregister thread with RCU, exit loop on unplug cpus: kvm: unregister thread with RCU cpus: hax: register/unregister thread with RCU, exit loop on unplug ivshmem: Disable irqfd on device reset ivshmem: Improve MSI irqfd error handling ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org> # Conflicts: # cpus.c
2018-02-07Add the Windows Hypervisor Platform accelerator.Justin Terry (VM)1-1/+47
Introduces the configure support for the new Windows Hypervisor Platform that allows for hypervisor acceleration from usermode components on the Windows platform. Signed-off-by: Justin Terry (VM) <juterry@microsoft.com> Message-Id: <1516655269-1785-2-git-send-email-juterry@microsoft.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-02-07ucontext: annotate coroutine stack for ASANMarc-André Lureau1-0/+30
It helps ASAN to detect more leaks on coroutine stacks, and to get rid of some extra warnings. Before: tests/test-coroutine -p /basic/lifecycle /basic/lifecycle: ==20781==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases! ==20781==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffcb184d000; bottom 0x7ff6c4cfd000; size: 0x0005ecb50000 (25446121472) False positive error reports may follow For details see https://github.com/google/sanitizers/issues/189 OK After: tests/test-coroutine -p /basic/lifecycle /basic/lifecycle: ==21110==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases! OK A similar work would need to be done for sigaltstack & windows fibers to have similar coverage. Since ucontext is preferred, I didn't bother checking the other coroutine implementations for now. Update travis to fix the build with ASAN annotations. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20180116151152.4040-4-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-02-07build-sys: add --enable-sanitizersMarc-André Lureau1-0/+30
Typical slowdown introduced by AddressSanitizer is 2x. UBSan shouldn't have much impact on runtime cost. Enable it by default when --enable-debug, unless --disable-sanitizers. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20180116151152.4040-3-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-02-05configure: allow use of python 3Daniel P. Berrange1-3/+2
Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-Id: <20180116134217.8725-11-berrange@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2018-02-05Drop remaining bits of ia64 host supportPeter Maydell1-5/+0
We dropped support for ia64 host CPUs in the 2.11 release (removing the TCG backend for it, and advertising the support as being completely removed in the changelog). However there are a few bits and pieces of code still floating about. Remove those, too. We can drop the check in configure for "ia64 or hppa host?" entirely, because we don't support hppa hosts either any more. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <1516897189-11035-1-git-send-email-peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-01-31target/hppa: Enable MTTCGRichard Henderson1-0/+1
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2018-01-25ui: deprecate use of SDL 1.2 in favour of 2.0 seriesDaniel P. Berrange1-0/+6
The SDL 2.0 release was made in Aug, 2013: https://www.libsdl.org/release/ That will soon be 4 + 1/2 years ago, which is enough time to consider the 2.0 series widely supported. Thus we deprecate the SDL 1.2 support, which will allow us to delete it in the last release of 2018. By this time, SDL 2.0 will be more than 5 years old. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20180115142533.24585-1-berrange@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-01-22configure: add dependencyKlim Kireev1-0/+27
This dependency is required for adequate Parallels images support. Typically the disk consists of several images which are glued by XML disk descriptor. Also XML hides inside several important parameters which are not available in the image header. The patch also adds clause to checkpatch.pl to understand libxml2 types. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Klim Kireev <klim.kireev@virtuozzo.com> Signed-off-by: Edgar Kaziakhmedov <edgar.kaziakhmedov@virtuozzo.com> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20180112090122.1702-3-klim.kireev@virtuozzo.com CC: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2018-01-16Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell1-2/+14
* QemuMutex tracing improvements (Alex) * ram_addr_t optimization (David) * SCSI fixes (Fam, Stefan, me) * do {} while (0) fixes (Eric) * KVM fix for PMU (Jan) * memory leak fixes from ASAN (Marc-André) * migration fix for HPET, icount, loadvm (Maria, Pavel) * hflags fixes (me, Tao) * block/iscsi uninitialized variable (Peter L.) * full support for GMainContexts in character devices (Peter Xu) * more boot-serial-test (Thomas) * Memory leak fix (Zhecheng) # gpg: Signature made Tue 16 Jan 2018 14:15:45 GMT # gpg: using RSA key 0xBFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: (51 commits) scripts/analyse-locks-simpletrace.py: script to analyse lock times util/qemu-thread-*: add qemu_lock, locked and unlock trace events cpu: flush TB cache when loading VMState block/iscsi: fix initialization of iTask in iscsi_co_get_block_status find_ram_offset: Align ram_addr_t allocation on long boundaries find_ram_offset: Add comments and tracing cpu_physical_memory_sync_dirty_bitmap: Another alignment fix checkpatch: Enforce proper do/while (0) style maint: Fix macros with broken 'do/while(0); ' usage tests: Avoid 'do/while(false); ' in vhost-user-bridge chardev: Clean up previous patch indentation chardev: Use goto/label instead of do/break/while(0) mips: Tweak location of ';' in macros net: Drop unusual use of do { } while (0); irq: fix memory leak cpus: unify qemu_*_wait_io_event icount: fixed saving/restoring of icount warp timers scripts/qemu-gdb/timers.py: new helper to dump timer state scripts/qemu-gdb: add simple tcg lock status helper target-i386: update hflags on Hypervisor.framework ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-01-12ui: deprecate use of GTK 2.x in favour of 3.x seriesDaniel P. Berrange1-0/+6
The GTK 3.0 release was made in Feb, 2011: https://blog.gtk.org/2011/02/10/gtk-3-0-released/ That will soon be 7 years ago, which is enough time to consider the 3.x series widely supported. Thus we deprecate the GTK 2.x support, which will allow us to delete it in the last release of 2018. By this time, GTK 3.x will be almost 8 years old. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 20171212113440.16483-1-berrange@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-01-12build-sys: compile with -Og or -O1 when --enable-debugMarc-André Lureau1-2/+13
When --enable-debug is turned on, configure doesn't set -O level, and uses default compiler -O0 level, which is slow. Instead, use -Og if supported by the compiler (optimize debugging experience), or -O1 (keeps code somewhat debuggable and works around compiler bugs). Unfortunately, gcc has many false-positive maybe-uninitialized errors with Og and O1 (f27 gcc 7.2.1 20170915): /home/elmarco/src/qemu/hw/ipmi/isa_ipmi_kcs.c: In function ‘ipmi_kcs_ioport_read’: /home/elmarco/src/qemu/hw/ipmi/isa_ipmi_kcs.c:279:12: error: ‘ret’ may be used uninitialized in this function [-Werror=maybe-uninitialized] return ret; ^~~ cc1: all warnings being treated as errors make: *** [/home/elmarco/src/qemu/rules.mak:66: hw/ipmi/isa_ipmi_kcs.o] Error 1 make: *** Waiting for unfinished jobs.... /home/elmarco/src/qemu/hw/ide/ahci.c: In function ‘ahci_populate_sglist’: /home/elmarco/src/qemu/hw/ide/ahci.c:903:58: error: ‘tbl_entry_size’ may be used uninitialized in this function [-Werror=maybe-uninitialized] if ((off_idx == -1) || (off_pos < 0) || (off_pos > tbl_entry_size)) { ~~~~~~~~~^~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make: *** [/home/elmarco/src/qemu/rules.mak:66: hw/ide/ahci.o] Error 1 /home/elmarco/src/qemu/hw/display/qxl.c: In function ‘qxl_add_memslot’: /home/elmarco/src/qemu/hw/display/qxl.c:1397:52: error: ‘pci_start’ may be used uninitialized in this function [-Werror=maybe-uninitialized] memslot.virt_end = virt_start + (guest_end - pci_start); ~~~~~~~~~~~~~^~~~~~~~~~~~ /home/elmarco/src/qemu/hw/display/qxl.c:1389:9: error: ‘pci_region’ may be used uninitialized in this function [-Werror=maybe-uninitialized] qxl_set_guest_bug(d, "%s: pci_region = %d", __func__, pci_region); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors There seems to be a long list of related bugs in upstream GCC, some of them are being fixed very recently: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24639 For now, let's workaround it by using Wno-maybe-uninitialized (gcc-only). Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20180104160523.22995-5-marcandre.lureau@redhat.com> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-01-12build-sys: fix qemu-ga -pthread linkingMarc-André Lureau1-0/+1
When linking qemu-ga under some configuration (when gthread-2.0.pc doesn't have -pthread, as happening atm with meson build), you may have this linking issue: /usr/bin/ld: libqemuutil.a(qemu-thread-posix.o): undefined reference to symbol 'pthread_setname_np@@GLIBC_2.12' /usr/lib64/libpthread.so.0: error adding symbols: DSO missing from command line Make sure qemu-ga links with the pthread library, by adding correct flags to libs_qga. This is really a QEMU bug, because it's QEMU code that's using pthread functions, and so we must explicitly link against pthreads. The bug was just masked by the fact that often some pkg-config or another for one of our dependencies will add -pthread to the link line anyway. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20180104160523.22995-2-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-01-11configure: Add aarch64_be-linux-user targetMichael Weiser1-2/+3
Add target aarch64_be-linux-user. This allows a qemu-aarch64_be binary to be built that will run big-endian aarch64 binaries. Signed-off-by: Michael Weiser <michael.weiser@gmx.de> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-id: 20171220212308.12614-5-michael.weiser@gmx.de Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-01-08configure: Fix incorrect string comparison operatorPeter Maydell1-1/+1
In commit c97d6d2cdf97ed we accidentally added code to configure that uses '==' for string equality testing. This is a bashism -- the portable way to write this is '='. This fixes the "Unexpected operator error" complaint produced if the system /bin/sh is dash. Fixes: c97d6d2cdf97ed Reported-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 1515431442-23795-1-git-send-email-peter.maydell@linaro.org
2017-12-22i386: hvf: add code base from Google's QEMU repositorySergio Andres Gomez Del Real1-0/+38
This file begins tracking the files that will be the code base for HVF support in QEMU. This code base is part of Google's QEMU version of their Android emulator, and can be found at https://android.googlesource.com/platform/external/qemu/+/emu-master-dev This code is based on Veertu Inc's vdhh (Veertu Desktop Hosted Hypervisor), found at https://github.com/veertuinc/vdhh. Everything is appropriately licensed under GPL v2-or-later, except for the code inside x86_task.c and x86_task.h, which, deriving from KVM (the Linux kernel), is licensed GPL v2-only. This code base already implements a very great deal of functionality, although Google's version removed from Vertuu's the support for APIC page and hyperv-related stuff. According to the Android Emulator Release Notes, Revision 26.1.3 (August 2017), "Hypervisor.framework is now enabled by default on macOS for 32-bit x86 images to improve performance and macOS compatibility", although we better use with caution for, as the same Revision warns us, "If you experience issues with it specifically, please file a bug report...". The code hasn't seen much update in the last 5 months, so I think that we can further develop the code with occasional visiting Google's repository to see if there has been any update. On top of Google's code, the following changes were made: - add code to the configure script to support the --enable-hvf argument. If the OS is Darwin, it checks for presence of HVF in the system. The patch also adds strings related to HVF in the file qemu-options.hx. QEMU will only support the modern syntax style '-M accel=hvf' no enable hvf; the legacy '-enable-hvf' will not be supported. - fix styling issues - add glue code to cpus.c - move HVFX86EmulatorState field to CPUX86State, changing the the emulation functions to have a parameter with signature 'CPUX86State *' instead of 'CPUState *' so we don't have to get the 'env'. Signed-off-by: Sergio Andres Gomez Del Real <Sergio.G.DelReal@gmail.com> Message-Id: <20170913090522.4022-2-Sergio.G.DelReal@gmail.com> Message-Id: <20170913090522.4022-3-Sergio.G.DelReal@gmail.com> Message-Id: <20170913090522.4022-5-Sergio.G.DelReal@gmail.com> Message-Id: <20170913090522.4022-6-Sergio.G.DelReal@gmail.com> Message-Id: <20170905035457.3753-7-Sergio.G.DelReal@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-12-21rcu: reduce more than 7MB heap memory by malloc_trim()Yang Zhong1-0/+35
Since there are some issues in memory alloc/free machenism in glibc for little chunk memory, if Qemu frequently alloc/free little chunk memory, the glibc doesn't alloc little chunk memory from free list of glibc and still allocate from OS, which make the heap size bigger and bigger. This patch introduce malloc_trim(), which will free heap memory when there is no rcu call during rcu thread loop. malloc_trim() can be enabled/disabled by --enable-malloc-trim/ --disable-malloc-trim in the Qemu configure command. The default malloc_trim() is enabled for libc. Below are test results from smaps file. (1)without patch 55f0783e1000-55f07992a000 rw-p 00000000 00:00 0 [heap] Size: 21796 kB Rss: 14260 kB Pss: 14260 kB (2)with patch 55cc5fadf000-55cc61008000 rw-p 00000000 00:00 0 [heap] Size: 21668 kB Rss: 6940 kB Pss: 6940 kB Signed-off-by: Yang Zhong <yang.zhong@intel.com> Message-Id: <1513775806-19779-1-git-send-email-yang.zhong@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-12-20memfd: fix configure testPaolo Bonzini1-1/+1
Recent glibc added memfd_create in sys/mman.h. This conflicts with the definition in util/memfd.c: /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error: static declaration of memfd_create follows non-static declaration Fix the configure test, and remove the sys/memfd.h inclusion since the file actually does not exist---it is a typo in the memfd_create(2) man page. Cc: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-12-18configure: check $CC available before verifying host CPUDaniel Henrique Barboza1-11/+14
When executing 'configure' in a fresh QEMU clone, in a fresh OS install running in a ppc64le host, this is the error shown: ----- ../configure --enable-trace-backend=simple --enable-debug --target-list=ppc64-softmmu ERROR: Unsupported CPU = ppc64le, try --enable-tcg-interpreter ----- This isn't true, ppc64le host CPU is supported. This happens because, in a fresh install, we don't have a C compiler to autodetect the $cpu variable to "ppc64". This patch moves the CC available check up a bit, just before verifying the host CPU. This ensures that we bail out with a $CC not available error instead of unsupported CPU (the host CPU detection without the compiler wouldn't work properly anyway). It also allows --help to keep working without a C compiler. With this patch, in the same ppc64le host without gcc: $ ../configure --enable-trace-backend=simple --enable-debug --target-list=ppc64-softmmu ERROR: "cc" either does not exist or does not work $ ../configure --help Usage: configure [options] Options: [defaults in brackets after descriptions] Standard options: --help print this message --prefix=PREFIX install in PREFIX [/usr/local] --interp-prefix=PREFIX where to find shared libraries, etc. (...) Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>