summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-05-08Makefile: strip tools and modules tooMichael Tokarev2-5/+13
Commit 52ba784d3 replaced $(STRIP_OPT) with $(STRIP) in some places (for example, Makefile.target), but not all of them. There are a few places remain in main Makefile which still uses $(STRIP_OPT). Replace these places with $(STRIP) too. While at it, simplify variable pattern substitution of the surrounding places, change $(patsubst pat,rep,$(var)) into $(var:pat=rep) which is much easier to read (this is probably a good idea to do everywhere). Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Cc: Fam Zheng <famz@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-08build: simplify Makefile.target around unnest-vars invocationsPaolo Bonzini1-9/+2
No need to save/restore obj-y, we can just build all-obj-y incrementally. Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-08build: simplify Makefile.target a bit, use just one rule for softmmuMichael Tokarev1-15/+11
On win*, we build QEMU_PROGW (GUI) and create a console app QEMU_PROG from it, while on non-win*, we make only QEMU_PROG using the same rules as used for QEMU_PROGW on win*. Make just one rule for building main executable, and an additional rule for win* to make console app from it. Also consolidate tests for $(QEMU_PROGW). Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> [Fix user-mode compilation. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-08build: Fix per-object variables for Makefile.targetPaolo Bonzini1-0/+1
The compiling is done in a subdir, so the extraction of per-object libs and cflags are referencing objects with ../ prefixed. So prefix the per-object variables "foo.o-cflags" and "foo.o-libs" to "../foo.o-cflags" and "../foo.o-libs". Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-08Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' ↵Peter Maydell21-434/+364
into staging Tracing pull request # gpg: Signature made Wed 07 May 2014 18:14:02 BST using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" * remotes/stefanha/tags/tracing-pull-request: configure: Show trace output file conditionally trace: [tracetool] Minimize the amount of per-backend code trace: [simple] Bump up log version number trace: [tracetool] Change format docs to point to the generated file trace: [tracetool] Show list of frontends and backends sorted by name trace: [tracetool] Cosmetic changes trace: [tracetool] Spacing changes trace: [tracetool] Add methods 'Event.copy' and 'Arguments.copy' trace: [tracetool] Add method 'Event.api' to build event names Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-05-08Merge remote-tracking branch 'remotes/spice/tags/pull-spice-7' into stagingPeter Maydell1-1/+9
spice: small fixes # gpg: Signature made Thu 08 May 2014 09:50:21 BST using RSA key ID D3E87138 # 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>" * remotes/spice/tags/pull-spice-7: spice: fix libvirt snapshots spice: fix "info spice" Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-05-08spice: fix libvirt snapshotsGerd Hoffmann1-0/+8
Only notify spice-server about migration events in case we got target host information beforehand. So we kick the seamless spice client migration only in case a actual live migration happens, not when libvirt uses live-migration-to-file for snapshotting. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-05-08spice: fix "info spice"Gerd Hoffmann1-1/+1
In case no listening address was specified, "info spice" reports "0.0.0.0" as address. Which is incorrect in case spice is listening on ipv6. Replace it by a wildcard "*" to indicate it is not limited to a specific address. Note: Being more specific is not possible without extending the spice-server api. The socket is handled by spice-server not qemu, so qemu can't easily figure the actual socket address. Reported-by: David Jaša <djasa@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-05-07Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-05-07' ↵Peter Maydell30-74/+73
into staging trivial patches for 2014-05-07 # gpg: Signature made Wed 07 May 2014 18:01:15 BST using RSA key ID A4C3D7DB # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>" # gpg: aka "Michael Tokarev <mjt@corpit.ru>" # gpg: aka "Michael Tokarev <mjt@debian.org>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D 4324 457C E0A0 8044 65C5 # Subkey fingerprint: 6F67 E18E 7C91 C5B1 5514 66A7 BEE5 9D74 A4C3 D7DB * remotes/mjt/tags/trivial-patches-2014-05-07: (21 commits) libcacard: remove unnecessary EOL from debug prints docs/memory.txt: Fix document on MMIO operations readline: Sort completions before printing them. readline: use g_strndup instead of open-coding it qmp: report path ambiguity error libcacard: replace pstrcpy() with memcpy() glib: move g_poll() replacement into glib-compat.h do not call g_thread_init() for glib >= 2.31 hw/9pfs: Add include file for exported symbol xen: remove unused global, xen_xcg hw: Add missing 'static' attributes qemu-timer: Add missing 'static' attribute ui: Add missing 'static' attribute monitor: Add missing 'static' attribute hw/s390x: Add missing 'static' attribute hw/mips: Add missing 'static' and 'const' attributes hw/9pfs: Add missing 'static' attributes arch_init: Be sure of only one exit entry with DPRINTF() for ram_load() tests/tcg: Fix compilation of test_path qga: Fix typo (plural) in comment ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-05-07Merge remote-tracking branch 'remotes/sstabellini/xen-140507-2' into stagingPeter Maydell21-133/+227
* remotes/sstabellini/xen-140507-2: xen_disk: add discard support pass an inclusive address range to xc_domain_pin_memory_cacheattr xen: factor out common functions xen: move Xen HVM files under hw/i386/xen xen: move Xen PV machine files to hw/xenpv qemu-xen: free all the pirqs for msi/msix when driver unload exec: Limit translation limiting in address_space_translate to xen Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-05-07configure: Show trace output file conditionallyStefan Weil1-0/+2
It is only used with the simple trace backend. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-05-07trace: [tracetool] Minimize the amount of per-backend codeLluís Vilanova19-402/+310
Backends now only contain the essential backend-specific code, and most of the work is moved to frontend code. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-05-07trace: [simple] Bump up log version numberLluís Vilanova2-6/+6
The following tracetool cleanup changes the event numbering policy. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-05-07trace: [tracetool] Change format docs to point to the generated fileLluís Vilanova7-11/+11
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-05-07trace: [tracetool] Show list of frontends and backends sorted by nameLluís Vilanova2-3/+3
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-05-07trace: [tracetool] Cosmetic changesLluís Vilanova1-7/+7
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-05-07trace: [tracetool] Spacing changesLluís Vilanova1-3/+4
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-05-07trace: [tracetool] Add methods 'Event.copy' and 'Arguments.copy'Lluís Vilanova1-0/+9
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-05-07trace: [tracetool] Add method 'Event.api' to build event namesLluís Vilanova6-17/+27
Makes it easier to ensure proper naming across the different frontends and backends. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-05-07libcacard: remove unnecessary EOL from debug printsAlon Levy1-2/+2
Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-07docs/memory.txt: Fix document on MMIO operationsFam Zheng2-6/+6
.impl.valid should be .impl.unaligned and the description needs some fixes. .old_portio is removed since commit b40acf99b (ioport: Switch dispatching to memory core layer). Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-07readline: Sort completions before printing them.Hani Benhabiles1-0/+7
Signed-off-by: Hani Benhabiles <hani@linux.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-07readline: use g_strndup instead of open-coding itMichael Tokarev1-3/+1
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Andreas Färber <afaerber@suse.de>
2014-05-07qmp: report path ambiguity errorMichael Tokarev1-1/+5
Without this, ambiguous path is reported to the user as "not found", which is confusing at least. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-07libcacard: replace pstrcpy() with memcpy()Michael Tokarev1-1/+2
Commit 2e679780ae86c6ca8 replaced strncpy() with pstrcpy() in one place in libcacard. This is a qemu-specific function, while libcacard is a stand-alone library (or tries to be). But since we know the exact length of the string to copy, and know that it definitely will fit in the destination buffer, use memcpy() instead, and null-terminate the string after that. An alternative is to use g_strlcpy() or strncpy(), but memcpy() is more than adequate in this place. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Cc: qemu-trivial@nongnu.org Cc: Alon Levy <alevy@redhat.com>
2014-05-07glib: move g_poll() replacement into glib-compat.hStefan Hajnoczi2-12/+12
We have a dedicated header file for wrappers to smooth over glib version differences. Move the g_poll() definition into glib-compat.h for consistency. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Cc: qemu-trivial@nongnu.org
2014-05-07do not call g_thread_init() for glib >= 2.31Michael Tokarev2-17/+11
glib >= 2.31 always enables thread support and g_thread_supported() is #defined to 1, there's no need to call g_thread_init() anymore, and it definitely does not need to report error which never happens. Keep code for old < 2.31 glibc anyway for now, just #ifdef it differently. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Cc: qemu-trivial@nongnu.org
2014-05-07hw/9pfs: Add include file for exported symbolStefan Weil1-0/+1
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-07xen: remove unused global, xen_xcgJim Meyering1-1/+0
Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Jim Meyering <meyering@redhat.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-07hw: Add missing 'static' attributesStefan Weil6-8/+8
This fixes warnings from the static code analysis (smatch). Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-07qemu-timer: Add missing 'static' attributeStefan Weil1-1/+1
This fixes a warning from the static code analysis (smatch). Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-07ui: Add missing 'static' attributeStefan Weil1-1/+1
There was already a forward declaration using 'static', but the attribute was missing in the implementation. This fixes a warning from the static code analysis (smatch). Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-07monitor: Add missing 'static' attributeStefan Weil1-1/+1
This fixes a warning from the static code analysis (smatch). Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-07hw/s390x: Add missing 'static' attributeStefan Weil1-1/+1
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-07hw/mips: Add missing 'static' and 'const' attributesStefan Weil1-1/+1
This fixes a warning from the static code analysis (smatch). Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Acked-by: Aurelien Jarno <aurelien@aurel32.net>
2014-05-07hw/9pfs: Add missing 'static' attributesStefan Weil2-3/+3
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-07arch_init: Be sure of only one exit entry with DPRINTF() for ram_load()Chen Gang1-4/+8
When DPRINTF() has effect, the original author wants to print all ram_load() calling results. So need use 'goto' instead of 'return' within ram_load(), just like other areas have done. Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-07tests/tcg: Fix compilation of test_pathPeter Maydell2-9/+0
The test_path binary is (unlike the other test binaries in tests/tcg) actually intended to be compiled with the same compiler used to build the main QEMU executables. It actually #includes a number of the QEMU source files in an attempt to unit-test the util/path.c functions, and so if it is not compiled with the same compiler used by configure to set CONFIG_ settings then it is liable to fail to build. Fix the makefile to build it with the default C compiler rules, not CC_I386, and fix the test itself not to include a lot of unnecessary trace related source files which cause the build to fail if the trace backend is anything other than 'simple'. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-07qga: Fix typo (plural) in commentStefan Weil1-1/+1
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-07configure: remove bashismMichael Tokarev1-1/+1
Commit e26110cfc67d48 added a check for shacmd to create a hash for modules. This check in configure is using bash construct &> to redirect both stdout and stderr, which does fun things on some shells. Get rid of it, use standard redirection instead. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Fam Zheng <famz@redhat.com>
2014-05-07xen_disk: add discard supportOlaf Hering3-0/+52
Implement discard support for xen_disk. It makes use of the existing discard code in qemu. The discard support is enabled unconditionally. The tool stack may provide a property "discard-enable" in the backend node to optionally disable discard support. This is helpful in case the backing file was intentionally created non-sparse to avoid fragmentation. Signed-off-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2014-05-07pass an inclusive address range to xc_domain_pin_memory_cacheattrStefano Stabellini1-1/+1
xc_domain_pin_memory_cacheattr expects an inclusive address range: adjust the parameters. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2014-05-07xen: factor out common functionsWei Liu5-125/+161
So common functions used by both HVM and PV are factored out from xen-all.c to xen-common.c. Finally rename xen-all.c to xen-hvm.c, as those functions are only useful to HVM guest. Create *-stub files and modify Makefile.target to reflect the changes. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2014-05-07Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into stagingPeter Maydell14-67/+159
pc,net,MAINTAINERS,build updates MAINTAINERS updated with link to the security process documentation apic version modified to make more guests happy On top of that, bugfixes all over the place Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Wed 07 May 2014 17:15:29 BST using RSA key ID D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" * remotes/mst/tags/for_upstream: configure: make source tree build more robust MAINTAINERS: addresses for responsible disclosure pm_smbus: correctly report unclaimed cycles smbus: return -1 if nothing found at the given address smbus: allow returning an error from reads apic: use emulated lapic version 0x14 on pc machines >= 2.1 pc: add compat_props placeholder for 2.0 machine type i8259: don't abort when trying to use level sensitive irqs acpi: fix tables for no-hpet configuration acpi-build: properly decrement objects' reference counters acpi/pcihp.c: Rewrite acpi_pcihp_get_bsel using object_property_get_int Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-05-07configure: make source tree build more robustMichael S. Tsirkin1-2/+10
When source directory can be arrived at by two paths, configure might misdetect an out of tree build. The simplest way to trigger the problem is running configure using a full path. E.g. (<firstpath> refers to qemu source tree): ln -s <firstpath> <secondpath> cd <firstpath> <secondpath>/configure A more practical way is when make runs configure automatically: 1. cd <firstpath>/; ./configure SRC_PATH=<firstpath>/ is written into config_host.mak 2. cd <secondpath>/; touch configure; make make now runs <firstpath>/configure, so configure assumes it's an out of tree build When this happens configure overwrites parts of the current tree with symlinks. Make the test more robust: look for configure in the current directory. If there - we know it's a source build! Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-05-07MAINTAINERS: addresses for responsible disclosureMichael S. Tsirkin1-0/+7
Adding addresses to MAINTAINERS, as agreed on the last conference call: http://wiki.qemu.org/SecurityProcess People sometimes detect security issues in upstream QEMU and don't know where to report them in a non-public way. Of course whoever just wants full disclosure can just go public, but there's nothing specified for non-public - until recently Anthony was doing this informally. As I started doing this recently anyway, I can handle this on the QEMU side in a more formal way. Adding a secalert mailing list as well - they are the ones who is actually opening CVEs, communicating issues to all downstreams etc, and they are already handling this for upstream, not just Red Hat. Keeping Anthony's address around in case he wants to be informed. Peter Maydell said that he prefers not to be on this contact list at this point. A public mailing list has been created - not listing it here yet - until we know how to set it up in a secure fashion and until there are more people so manually copying everyone becomes unwieldy for reporters. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-05-07xen: move Xen HVM files under hw/i386/xenWei Liu6-2/+2
Signed-off-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2014-05-07pm_smbus: correctly report unclaimed cyclesPaolo Bonzini1-22/+41
Without this patch, i2cdetect will report all addresses as present. With it, only 0x50..0x57 are present. Before: 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f 60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70: 70 71 72 73 74 75 76 77 After: 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: 50 51 52 53 54 55 56 57 -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-05-07xen: move Xen PV machine files to hw/xenpvWei Liu5-1/+3
Signed-off-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2014-05-07smbus: return -1 if nothing found at the given addressPaolo Bonzini2-24/+50
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>