summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-09-09virtio-balloon: fix stats vq migrationLadi Prosek1-0/+13
The statistics virtqueue is not migrated properly because virtio-balloon does not include s->stats_vq_elem in the migration stream. After migration the statistics virtqueue hangs because the host never completes the last element (s->stats_vq_elem is NULL on the destination QEMU). Therefore the guest never submits new elements and the virtqueue is hung. Instead of changing the migration stream format in an incompatible way, detect the migration case and rewind the virtqueue so the last element can be completed. Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Roman Kagan <rkagan@virtuozzo.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Suggested-by: Roman Kagan <rkagan@virtuozzo.com> Signed-off-by: Ladi Prosek <lprosek@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-09-09virtio: add virtqueue_rewind()Stefan Hajnoczi2-0/+23
virtqueue_discard() requires a VirtQueueElement but virtio-balloon does not migrate its in-use element. Introduce a new function that is similar to virtqueue_discard() but doesn't require a VirtQueueElement. This will allow virtio-balloon to access element again after migration with the usual proviso that the guest may have modified the vring since last time. Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Roman Kagan <rkagan@virtuozzo.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Ladi Prosek <lprosek@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-09-09virtio-balloon: discard virtqueue element on resetLadi Prosek1-0/+1
The one pending element is being freed but not discarded on device reset, which causes svq->inuse to creep up, eventually hitting the "Virtqueue size exceeded" error. Properly discarding the element on device reset makes sure that its buffers are unmapped and the inuse counter stays balanced. Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Roman Kagan <rkagan@virtuozzo.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Ladi Prosek <lprosek@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-09-09virtio: zero vq->inuse in virtio_reset()Stefan Hajnoczi1-0/+1
vq->inuse must be zeroed upon device reset like most other virtqueue fields. In theory, virtio_reset() just needs assert(vq->inuse == 0) since devices must clean up in-flight requests during reset (requests cannot not be leaked!). In practice, it is difficult to achieve vq->inuse == 0 across reset because balloon, blk, 9p, etc implement various different strategies for cleaning up requests. Most devices call g_free(elem) directly without telling virtio.c that the VirtQueueElement is cleaned up. Therefore vq->inuse is not decremented during reset. This patch zeroes vq->inuse and trusts that devices are not leaking VirtQueueElements across reset. I will send a follow-up series that refactors request life-cycle across all devices and converts vq->inuse = 0 into assert(vq->inuse == 0) but this more invasive approach is not appropriate for stable trees. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Cc: qemu-stable <qemu-stable@nongnu.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Ladi Prosek <lprosek@redhat.com>
2016-09-09virtio-pci: reduce modern_mem_bar sizeMarcel Apfelbaum3-8/+25
Currently each VQ Notification Virtio Capability is allocated on a different page. The idea is to enable split drivers within guests, however there are no known plans to do that. The allocation will result in a 8MB BAR, more than various guest firmwares pre-allocates for PCI Bridges hotplug process. Reserve 4 bytes per VQ by default and add a new parameter "page-per-vq" to be used with split drivers. Signed-off-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-09-09target-i386: present virtual L3 cache info for vcpusLongpeng(Mike)3-5/+59
Some software algorithms are based on the hardware's cache info, for example, for x86 linux kernel, when cpu1 want to wakeup a task on cpu2, cpu1 will trigger a resched IPI and told cpu2 to do the wakeup if they don't share low level cache. Oppositely, cpu1 will access cpu2's runqueue directly if they share llc. The relevant linux-kernel code as bellow: static void ttwu_queue(struct task_struct *p, int cpu) { struct rq *rq = cpu_rq(cpu); ...... if (... && !cpus_share_cache(smp_processor_id(), cpu)) { ...... ttwu_queue_remote(p, cpu); /* will trigger RES IPI */ return; } ...... ttwu_do_activate(rq, p, 0); /* access target's rq directly */ ...... } In real hardware, the cpus on the same socket share L3 cache, so one won't trigger a resched IPIs when wakeup a task on others. But QEMU doesn't present a virtual L3 cache info for VM, then the linux guest will trigger lots of RES IPIs under some workloads even if the virtual cpus belongs to the same virtual socket. For KVM, there will be lots of vmexit due to guest send IPIs. The workload is a SAP HANA's testsuite, we run it one round(about 40 minuates) and observe the (Suse11sp3)Guest's amounts of RES IPIs which triggering during the period: No-L3 With-L3(applied this patch) cpu0: 363890 44582 cpu1: 373405 43109 cpu2: 340783 43797 cpu3: 333854 43409 cpu4: 327170 40038 cpu5: 325491 39922 cpu6: 319129 42391 cpu7: 306480 41035 cpu8: 161139 32188 cpu9: 164649 31024 cpu10: 149823 30398 cpu11: 149823 32455 cpu12: 164830 35143 cpu13: 172269 35805 cpu14: 179979 33898 cpu15: 194505 32754 avg: 268963.6 40129.8 The VM's topology is "1*socket 8*cores 2*threads". After present virtual L3 cache info for VM, the amounts of RES IPIs in guest reduce 85%. For KVM, vcpus send IPIs will cause vmexit which is expensive, so it can cause severe performance degradation. We had tested the overall system performance if vcpus actually run on sparate physical socket. With L3 cache, the performance improves 7.2%~33.1%(avg:15.7%). Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-09-09pc: Add 2.8 machineLongpeng(Mike)3-5/+27
This will used by the next patch. Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-09-09virtio-pci: use size from correct structureMichael S. Tsirkin1-1/+1
PIO MR registration should use size from the correct notify struct. Doesn't affect any visible behaviour because the field values are the same (both are 4). Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-09-09virtio: Tell the user what went wrong when event_notifier_init failedThomas Huth1-1/+2
event_notifier_init() can fail in real life, for example when there are not enough open file handles available (EMFILE) when using a lot of devices. So instead of leaving the average user with a cryptic error number only, print out a proper error message with strerror() instead, so that the user has a better way to figure out what is going on and that using "ulimit -n" might help here for example. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-09-09Merge remote-tracking branch 'remotes/famz/tags/docker-pull-request' into ↵Peter Maydell4-9/+48
staging # gpg: Signature made Fri 09 Sep 2016 05:54:35 BST # gpg: using RSA key 0xCA35624C6A9171C6 # gpg: Good signature from "Fam Zheng <famz@redhat.com>" # 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: 5003 7CB7 9706 0F76 F021 AD56 CA35 624C 6A91 71C6 * remotes/famz/tags/docker-pull-request: docker: silence debootstrap when --quiet is given docker: build debootstrap after cloning docker: make sure debootstrap is at least 1.0.67 docker: print warning if EXECUTABLE is not set when building debootstrap image docker: debian-bootstrap.pre: print helpful message if DEB_ARCH/DEB_TYPE unset docker: debian-bootstrap.pre: print error messages to stderr docker: avoid dependency on 'realpath' package docker.py: don't hang on large docker output docker: Add a glib2-2.22 image Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-09-09qtest.c: Allow zero size in memset qtest commandsPeter Maydell1-4/+7
Some tests use the qtest protocol "memset" command with a zero size, expecting it to do nothing. However in the current code this will result in calling memset() with a NULL pointer, which is undefined behaviour. Detect and specially handle zero sizes to avoid this. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1470393800-7882-1-git-send-email-peter.maydell@linaro.org
2016-09-08Merge remote-tracking branch 'remotes/elmarco/tags/leak-pull-request' into ↵Peter Maydell39-90/+248
staging Pull request v2: - dropped "tests: fix small leak in test-io-channel-command" that Daniel Berrange will pick - fixed "tests: add qtest_add_data_func_full" to work with glib < 2.26 # gpg: Signature made Thu 08 Sep 2016 15:16:54 BST # gpg: using RSA key 0xDAE8E10975969CE5 # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" # gpg: aka "Marc-André Lureau <marcandre.lureau@gmail.com>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 87A9 BD93 3F87 C606 D276 F62D DAE8 E109 7596 9CE5 * remotes/elmarco/tags/leak-pull-request: (25 commits) tests: fix postcopy-test leaks tests: fix rsp leak in postcopy-test tests: pc-cpu-test leaks fixes tests: add qtest_add_data_func_full bus: simplify name handling ipmi: free extern timer sd: free timer pc: keep gsi reference pc: free i8259 tests: fix qom-test leaks acpi-build: fix array leak machine: use class base init generated name pc: don't leak a20_line pc: simplify passing qemu_irq portio: keep references on portio tests: fix leak in test-string-input-visitor tests: fix check-qom-proplist leaks tests: fix check-qom-interface leaks tests: fix test-iov leaks tests: fix test-vmstate leaks ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-09-08tests: fix postcopy-test leaksMarc-André Lureau1-1/+4
A few strings are allocated and never freed. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-09-08tests: fix rsp leak in postcopy-testMarc-André Lureau1-1/+1
In all cases, even when the dict doesn't contain 'ram', the qmp response must be unref. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-09-08tests: pc-cpu-test leaks fixesMarc-André Lureau1-5/+19
The path is allocated and should be freed. The qmp response should be unref, but then 'machine' must be duplicated. Use a destroy function for the PCTestData. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-09-08tests: add qtest_add_data_func_fullMarc-André Lureau2-0/+36
Allows one to specify a destroy function for the test data. Add a fallback using glib g_test_add_vtable() internal function, whose signature changed over time. Tested with glib 2.22, 2.26 and 2.48, which according to git log should be enough to cover all variations. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-09-08bus: simplify name handlingMarc-André Lureau2-16/+7
Simplify a bit the code by using g_strdup_printf() and store it in a non-const value so casting is no longer needed, and ownership is clearer. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-09-08ipmi: free extern timerMarc-André Lureau1-0/+9
Free the timer allocated during instance init. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Corey Minyard <cminyard@mvista.com>
2016-09-08sd: free timerMarc-André Lureau1-0/+9
Free the timer allocated in instance_init. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Andrew Baumann <Andrew.Baumann@microsoft.com>
2016-09-08pc: keep gsi referenceMarc-André Lureau3-16/+15
Further cleanup would need to call qemu_free_irq() at the appropriate time, but for now this silences ASAN about direct leaks. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
2016-09-08pc: free i8259Marc-André Lureau1-0/+2
Simiarly to 2ba154cf4eb8636cdd3aa90f392ca9e77206ca39 Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
2016-09-08tests: fix qom-test leaksMarc-André Lureau1-2/+3
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-09-08acpi-build: fix array leakMarc-André Lureau1-2/+2
The free_ranges array is used as a temporary pointer array, the segment should still be freed, however, it shouldn't free the elements themself. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Tested-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
2016-09-08machine: use class base init generated nameMarc-André Lureau3-2/+2
machine_class_base_init() member name is allocated by machine_class_base_init(), but not freed by machine_class_finalize(). Simply freeing there doesn't work, because DEFINE_PC_MACHINE() overwrites it with a literal string. Fix DEFINE_PC_MACHINE() not to overwrite it, and add the missing free to machine_class_finalize(). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
2016-09-08pc: don't leak a20_lineMarc-André Lureau1-0/+1
The irqs array is no longer being used Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-09-08pc: simplify passing qemu_irqMarc-André Lureau3-7/+7
qemu_irq is already a pointer, no need to have an extra pointer level. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-09-08portio: keep references on portioMarc-André Lureau11-22/+41
The isa_register_portio_list() function allocates ioports data/state. Let's keep the reference to this data on some owner. This isn't enough to fix leaks, but at least, ASAN stops complaining of direct leaks. Further cleanup would require calling portio_list_del/destroy(). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2016-09-08tests: fix leak in test-string-input-visitorMarc-André Lureau1-0/+1
Free the list returned by visit_type_intList(). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-09-08tests: fix check-qom-proplist leaksMarc-André Lureau1-0/+16
Found thanks to ASAN. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-09-08tests: fix check-qom-interface leaksMarc-André Lureau1-0/+1
Found thanks to ASAN. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-09-08tests: fix test-iov leaksMarc-André Lureau1-0/+7
Spotted thanks to ASAN. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-09-08tests: fix test-vmstate leaksMarc-André Lureau1-2/+6
Spotted thanks to ASAN. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-09-08tests: fix test-cutils leaksMarc-André Lureau1-8/+16
Spotted thanks to ASAN. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-09-08qga: free remaining leaking stateMarc-André Lureau3-0/+13
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-09-08qga: free the whole blacklistMarc-André Lureau1-6/+1
Free the config blacklist list, not just the elements. Do it so in the more appropriate function config_free(). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-09-08glib-compat: add g_(s)list_free_full()Marc-André Lureau1-0/+24
Those functions are only available since glib 2.28. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
2016-09-08tests: fix test-qga leaksMarc-André Lureau1-0/+5
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-09-08docker: silence debootstrap when --quiet is givenSascha Silbe1-1/+2
If we silence docker when --quiet is given, we should also silence the .pre script (i.e. debootstrap). Only discards stdout, so some diagnostics (e.g. from git clone) are still printed. Most of the verbose output is gone however and this way we still have a chance to see error messages. Signed-off-by: Sascha Silbe <silbe@linux.vnet.ibm.com> Message-Id: <1473192351-601-9-git-send-email-silbe@linux.vnet.ibm.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-09-08docker: build debootstrap after cloningSascha Silbe1-0/+1
When using the git version of debootstrap (because no usable version of debootstrap was installed on the host), we need to run 'make' so that devices.tar.gz gets built. Otherwise the first debootstrap stage will fail without printing any error message. Signed-off-by: Sascha Silbe <silbe@linux.vnet.ibm.com> Message-Id: <1473192351-601-8-git-send-email-silbe@linux.vnet.ibm.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-09-08docker: make sure debootstrap is at least 1.0.67Sascha Silbe1-0/+10
debootstrap prior to 1.0.67 generated an empty sources.list during foreign bootstraps (Debian#732255 [1]). Fall back to the git checkout if the installed debootstrap version is too old. [1] https://bugs.debian.org/732255 Signed-off-by: Sascha Silbe <silbe@linux.vnet.ibm.com> Message-Id: <1473192351-601-7-git-send-email-silbe@linux.vnet.ibm.com> [Update 'sort -C' to 'sorc -c &>/dev/null' - Fam] Signed-off-by: Fam Zheng <famz@redhat.com>
2016-09-08docker: print warning if EXECUTABLE is not set when building debootstrap imageSascha Silbe1-0/+3
Building the debian-debootstrap image will usually fail if EXECUTABLE isn't set (when using the Makefile). Warn the user in this case so they know why it's failing. Signed-off-by: Sascha Silbe <silbe@linux.vnet.ibm.com> Message-Id: <1473192351-601-6-git-send-email-silbe@linux.vnet.ibm.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-09-08docker: debian-bootstrap.pre: print helpful message if DEB_ARCH/DEB_TYPE unsetSascha Silbe1-0/+13
The debian-bootstrap image doesn't choose a default architecture and distribution version, instead the user has to set both DEB_ARCH and DEB_TYPE in the environment. Print a reasonably helpful message if either of them isn't set instead of complaining about "qemu-" being missing or erroring out because we cannot cd to the mirror URL. Signed-off-by: Sascha Silbe <silbe@linux.vnet.ibm.com> Message-Id: <1473192351-601-5-git-send-email-silbe@linux.vnet.ibm.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-09-08docker: debian-bootstrap.pre: print error messages to stderrSascha Silbe1-4/+4
Send error messages where they belong so they're seen even if stdout is redirected to /dev/null. Signed-off-by: Sascha Silbe <silbe@linux.vnet.ibm.com> Message-Id: <1473192351-601-4-git-send-email-silbe@linux.vnet.ibm.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-09-08docker: avoid dependency on 'realpath' packageSascha Silbe1-1/+1
The 'realpath' executable is shipped in a separate package that isn't installed by default on some distros. We already use 'readlink -e' (provided by GNU coreutils) in some other part of the code, so let's settle for that instead. Signed-off-by: Sascha Silbe <silbe@linux.vnet.ibm.com> Message-Id: <1473192351-601-3-git-send-email-silbe@linux.vnet.ibm.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-09-08docker.py: don't hang on large docker outputSascha Silbe1-3/+6
Unlike Popen.communicate(), subprocess.call() doesn't read from the stdout file descriptor. If the child process produces more output than fits into the pipe buffer, it will block indefinitely. If we don't intend to consume the output, just send it straight to /dev/null to avoid this issue. Signed-off-by: Sascha Silbe <silbe@linux.vnet.ibm.com> Reviewed-by: Janosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1473192351-601-2-git-send-email-silbe@linux.vnet.ibm.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-09-08docker: Add a glib2-2.22 imageFam Zheng1-0/+8
It's a variation of our existing centos6, plus two more lines to downgrade glib2 to version 2.22 which we download from vault.centos.org. Suggested-by: Paolo Bonzini <pbonzoni@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <1470708908-12885-1-git-send-email-famz@redhat.com>
2016-09-08Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.8-20160907' ↵Peter Maydell41-5571/+6527
into staging ppc patch queue for 2016-Sep-7 This is my first pull request for the newly opened qemu-2.8 tree. It contains a heap of things that were too late for 2.7 and have been queued for a while. In particular: * A number of preliminary patches for the powernv machine type * A substantial cleanup of exception handling which will be necessary to support running a TCG with hypervisor facilities * A start on support for POWER9 * Some TCG implementations for new POWER9 instructions * Some TCG and related cleanups in preparation for POWER9 * Some assorted TCG optimizations * An implementation of the H_CHANGE_LOGICAL_LAN_MAC hypercall which allows the MAC address to be changed on the PAPR virtual NIC. * Add some extra test cases for several machines (this isn't strictly in the ppc code, but is most value to ppc) NOTE: This pull request supersedes ppc-for-2.8-20160906, which had some problems. Changes: * Dropped BenH's lmw/stmw speedups, which break for qemu-system-ppc64 on BE hosts * A small fix to Thomas' serial output test to avoid a warning on the isapc machine type. * Some trivial checkpatch fixes Note that some of the patches in this series still have large numbers of checkpatch warnings. This is because they're moving existing code that predates most of the checkpatch style conventions. # gpg: Signature made Wed 07 Sep 2016 07:09:27 BST # gpg: using RSA key 0x6C38CACA20D9B392 # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" # gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>" # gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" # gpg: aka "David Gibson (kernel.org) <dwg@kernel.org>" # Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * remotes/dgibson/tags/ppc-for-2.8-20160907: (64 commits) tests: Check serial output of firmware boot of some machines tests: Resort check-qtest entries in Makefile.include spapr: implement H_CHANGE_LOGICAL_LAN_MAC h_call ppc: Improve a few more helper flags ppc: Improve the exception helpers flags ppc: Improve flags for helpers loading/writing the time facilities ppc: Don't generate dead code on unconditional branches ppc: Stop dumping state on all exceptions in linux-user ppc: Fix catching some segfaults in user mode ppc: Fix macio ESCC legacy mapping hw/ppc: add a ppc_create_page_sizes_prop() helper routine hw/ppc: use error_report instead of fprintf ppc: Rename #include'd .c files to .inc.c target-ppc: add extswsli[.] instruction target-ppc: add vsrv instruction target-ppc: add vslv instruction target-ppc: add vcmpnez[b,h,w][.] instructions target-ppc: add vabsdu[b,h,w] instructions target-ppc: add dtstsfi[q] instructions target-ppc: implement branch-less divd[o][.] ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-09-08tests/hd-geo-test: Don't pass NULL to unlink()Peter Maydell1-1/+3
The unlink() function doesn't accept a NULL pointer, so don't pass it one. Spotted by the clang sanitizer. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 1470391392-28274-1-git-send-email-peter.maydell@linaro.org
2016-09-07tests: Check serial output of firmware boot of some machinesThomas Huth2-0/+118
Some of the machines that we have got a firmware image for write some output to the serial console while booting up. We can use this output to make sure that the machine is basically working, so this adds a test that checks the output of these machines for some well-known "magic" strings. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-09-07tests: Resort check-qtest entries in Makefile.includeThomas Huth1-16/+28
The rather random list of check-qtest-xxx entries caused some confusion in the past, where to use "=" and where to use "+=" (see commits 0ccac16f59462b8e2b9afbc1 and 1f5c1cfbaec0792cd2e5da for example). Sorting the check-qtest-xxx entries by architecure instead and using some empty lines inbetween should help to ease this situation a little bit, so that it is hopefully now obvious that new tests should be added with "+=" instead of "=". While we are at it, this patch also comments out two of the "gcov-files-..." lines since the corresponding m48t59-test is disabled for sparc and sparc64, too. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>