Commit f62d632f authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2019-05-02' into staging



- Move qtest accel code to accel/qtest.c, get rid of AccelClass->available
- Test TCG interpreter in gitlab-ci
- Small improvements to the configure script
- Use object_initialize_child in hw/pci-host

# gpg: Signature made Thu 02 May 2019 17:07:34 BST
# gpg:                using RSA key 2ED9D774FE702DB5
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* remotes/huth-gitlab/tags/pull-request-2019-05-02:
  hw/pci-host: Use object_initialize_child for correct reference counting
  configure: Relax check for libseccomp
  configure: Remove old *-config-devices.mak.d files when running configure
  configure: Add -Wno-typedef-redefinition to CFLAGS (for Clang)
  accel: Remove unused AccelClass::available field
  qtest: Don't compile qtest accel on non-POSIX systems
  qtest: Move accel code to accel/qtest.c
  gitlab-ci.yml: Test the TCG interpreter in a CI pipeline

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 8482ff2e aff39be0
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -71,3 +71,18 @@ build-clang:
                     ppc-softmmu s390x-softmmu x86_64-softmmu arm-linux-user"
 - make -j2
 - make -j2 check

build-tci:
 script:
 - TARGETS="aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x x86_64"
 - ./configure --enable-tcg-interpreter
      --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)"
 - make -j2
 - make tests/boot-serial-test tests/cdrom-test tests/pxe-test
 - for tg in $TARGETS ; do
     export QTEST_QEMU_BINARY="${tg}-softmmu/qemu-system-${tg}" ;
     ./tests/boot-serial-test || exit 1 ;
     ./tests/cdrom-test || exit 1 ;
   done
 - QTEST_QEMU_BINARY="x86_64-softmmu/qemu-system-x86_64" ./tests/pxe-test
 - QTEST_QEMU_BINARY="s390x-softmmu/qemu-system-s390x" ./tests/pxe-test -m slow
+1 −0
Original line number Diff line number Diff line
@@ -2035,6 +2035,7 @@ M: Laurent Vivier <lvivier@redhat.com>
R: Paolo Bonzini <pbonzini@redhat.com>
S: Maintained
F: qtest.c
F: accel/qtest.c
F: tests/libqtest.*
F: tests/libqos/
F: tests/*-test.c
+1 −0
Original line number Diff line number Diff line
obj-$(CONFIG_SOFTMMU) += accel.o
obj-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_POSIX)) += qtest.o
obj-$(CONFIG_KVM) += kvm/
obj-$(CONFIG_TCG) += tcg/
obj-y += stubs/
+0 −5
Original line number Diff line number Diff line
@@ -107,11 +107,6 @@ void configure_accelerator(MachineState *ms, const char *progname)
        if (!acc) {
            continue;
        }
        if (acc->available && !acc->available()) {
            printf("%s not supported for this target\n",
                   acc->name);
            continue;
        }
        ret = accel_init_machine(acc, ms);
        if (ret < 0) {
            init_failed = true;

accel/qtest.c

0 → 100644
+54 −0
Original line number Diff line number Diff line
/*
 * QTest accelerator code
 *
 * Copyright IBM, Corp. 2011
 *
 * Authors:
 *  Anthony Liguori   <aliguori@us.ibm.com>
 *
 * This work is licensed under the terms of the GNU GPL, version 2 or later.
 * See the COPYING file in the top-level directory.
 *
 */

#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/module.h"
#include "qemu/option.h"
#include "qemu/config-file.h"
#include "sysemu/accel.h"
#include "sysemu/qtest.h"
#include "sysemu/cpus.h"

static int qtest_init_accel(MachineState *ms)
{
    QemuOpts *opts = qemu_opts_create(qemu_find_opts("icount"), NULL, 0,
                                      &error_abort);
    qemu_opt_set(opts, "shift", "0", &error_abort);
    configure_icount(opts, &error_abort);
    qemu_opts_del(opts);
    return 0;
}

static void qtest_accel_class_init(ObjectClass *oc, void *data)
{
    AccelClass *ac = ACCEL_CLASS(oc);
    ac->name = "QTest";
    ac->init_machine = qtest_init_accel;
    ac->allowed = &qtest_allowed;
}

#define TYPE_QTEST_ACCEL ACCEL_CLASS_NAME("qtest")

static const TypeInfo qtest_accel_type = {
    .name = TYPE_QTEST_ACCEL,
    .parent = TYPE_ACCEL,
    .class_init = qtest_accel_class_init,
};

static void qtest_type_init(void)
{
    type_register_static(&qtest_accel_type);
}

type_init(qtest_type_init);
Loading