mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-27 05:20:50 +00:00
Miscellaneous patches for 2018-10-10
-----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJbvZYeAAoJEDhwtADrkYZTXFUP/RHKCoKwOF0o0td11Bf9scoO QTWwXuycv1HFokv1SYCYuqm9DRhfMhJK+lmhhr3N5pY3vlwUIf8xygn5bhcWdxqr DfRB4/AlOiLtryUdPq+YWZ55zdGEwQC+NWqLOtpsKC/BNYOyzWtlJjSASz8SfC6Y dVnQABHsJU8L6kMuyi4A1FT/BAIBD4SUJvwiVWf9NZxkTkuyqFBjA2EyMuSGfGIA 2fJ3BnQE9EwGv2aXxqBR7mz39fHbcUA8Oe5xIRzUeBtectEesescxMF6UClgDNTW RatY7kfkiW+JPEloFTZKaD0pwe05OukW5/5yvg5NkiFJm3FVno4DjsoAM5QavMZb UN/XftKpVScFrfzcuSliMesrJT4HjFlOqxRVboY6UzqHTRHrUytbbldMjf8h5WiU 198chJGelyqylxTaeJMTUh6uzvp+Y1dIeYgMXqtq41GdTiOK3rIe8uLD2olq4aw9 3saAQxw8oxYxkceSG5d2Yxs559b+j9lzZYrC9eAlnRQXWNmo83LAAgKUiOI5996B lT9koMJ/YPDZUV1KLaM76/FRb3+C+XoFj+NfrDa+tS+glgKSaJqk5I/msvwjVFjC OJ8xJG1VDuC5+zLALEwr8axNkSbcerbIILNZJTwUmAYaSOkWRNlYKZ6hTq7AoLe6 zroiyiV5jS+yztHlccod =OmY1 -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2018-10-10' into staging Miscellaneous patches for 2018-10-10 # gpg: Signature made Wed 10 Oct 2018 07:03:10 BST # gpg: using RSA key 3870B400EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-misc-2018-10-10: ivshmem: Fix unplug of device "ivshmem-plain" libqtest: Inline g_assert_no_errno() tests: Restore check-qdict unit test qapi/misc.json: Remove superfluous words in CpuModelExpansionType tests/check-qjson: fix a leak Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
75e50c80e0
@ -911,6 +911,7 @@ static void ivshmem_common_realize(PCIDevice *dev, Error **errp)
|
||||
IVSHMEM_DPRINTF("using hostmem\n");
|
||||
|
||||
s->ivshmem_bar2 = host_memory_backend_get_memory(s->hostmem);
|
||||
host_memory_backend_set_mapped(s->hostmem, true);
|
||||
} else {
|
||||
Chardev *chr = qemu_chr_fe_get_driver(&s->server_chr);
|
||||
assert(chr);
|
||||
@ -993,6 +994,10 @@ static void ivshmem_exit(PCIDevice *dev)
|
||||
vmstate_unregister_ram(s->ivshmem_bar2, DEVICE(dev));
|
||||
}
|
||||
|
||||
if (s->hostmem) {
|
||||
host_memory_backend_set_mapped(s->hostmem, false);
|
||||
}
|
||||
|
||||
if (s->peers) {
|
||||
for (i = 0; i < s->nb_peers; i++) {
|
||||
close_peer_eventfds(s, i);
|
||||
@ -1101,14 +1106,6 @@ static void ivshmem_plain_realize(PCIDevice *dev, Error **errp)
|
||||
}
|
||||
|
||||
ivshmem_common_realize(dev, errp);
|
||||
host_memory_backend_set_mapped(s->hostmem, true);
|
||||
}
|
||||
|
||||
static void ivshmem_plain_exit(PCIDevice *pci_dev)
|
||||
{
|
||||
IVShmemState *s = IVSHMEM_COMMON(pci_dev);
|
||||
|
||||
host_memory_backend_set_mapped(s->hostmem, false);
|
||||
}
|
||||
|
||||
static void ivshmem_plain_class_init(ObjectClass *klass, void *data)
|
||||
@ -1117,7 +1114,6 @@ static void ivshmem_plain_class_init(ObjectClass *klass, void *data)
|
||||
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
|
||||
|
||||
k->realize = ivshmem_plain_realize;
|
||||
k->exit = ivshmem_plain_exit;
|
||||
dc->props = ivshmem_plain_properties;
|
||||
dc->vmsd = &ivshmem_plain_vmsd;
|
||||
}
|
||||
|
@ -2017,7 +2017,7 @@
|
||||
#
|
||||
# @migration-safe: whether a CPU definition can be safely used for
|
||||
# migration in combination with a QEMU compatibility machine
|
||||
# when migrating between different QMU versions and between
|
||||
# when migrating between different QEMU versions and between
|
||||
# hosts with different sets of (hardware or software)
|
||||
# capabilities. If not provided, information is not available
|
||||
# and callers should not assume the CPU definition to be
|
||||
@ -2126,11 +2126,11 @@
|
||||
# @static: Expand to a static CPU model, a combination of a static base
|
||||
# model name and property delta changes. As the static base model will
|
||||
# never change, the expanded CPU model will be the same, independent of
|
||||
# independent of QEMU version, machine type, machine options, and
|
||||
# accelerator options. Therefore, the resulting model can be used by
|
||||
# tooling without having to specify a compatibility machine - e.g. when
|
||||
# displaying the "host" model. static CPU models are migration-safe.
|
||||
#
|
||||
# QEMU version, machine type, machine options, and accelerator options.
|
||||
# Therefore, the resulting model can be used by tooling without having
|
||||
# to specify a compatibility machine - e.g. when displaying the "host"
|
||||
# model. The @static CPU models are migration-safe.
|
||||
|
||||
# @full: Expand all properties. The produced model is not guaranteed to be
|
||||
# migration-safe, but allows tooling to get an insight and work with
|
||||
# model details.
|
||||
|
@ -40,7 +40,7 @@ SYSEMU_TARGET_LIST := $(subst -softmmu.mak,,$(notdir \
|
||||
|
||||
check-unit-y = tests/check-qdict$(EXESUF)
|
||||
gcov-files-check-qdict-y = qobject/qdict.c
|
||||
check-unit-y = tests/check-block-qdict$(EXESUF)
|
||||
check-unit-y += tests/check-block-qdict$(EXESUF)
|
||||
gcov-files-check-block-qdict-y = qobject/block-qdict.c
|
||||
check-unit-y += tests/test-char$(EXESUF)
|
||||
gcov-files-check-qdict-y = chardev/char.c
|
||||
|
@ -12,6 +12,8 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/qmp/qdict.h"
|
||||
#include "qapi/qmp/qnum.h"
|
||||
#include "qapi/qmp/qstring.h"
|
||||
|
||||
/*
|
||||
* Public Interface test-cases
|
||||
|
@ -780,6 +780,7 @@ static void utf8_string(void)
|
||||
if (!strstr(json_out, "\\uFFFD")) {
|
||||
str = from_json_str(json_out, j, &error_abort);
|
||||
g_assert_cmpstr(qstring_get_try_str(str), ==, utf8_in);
|
||||
qobject_unref(str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -48,10 +48,6 @@ struct QTestState
|
||||
static GHookList abrt_hooks;
|
||||
static struct sigaction sigact_old;
|
||||
|
||||
#define g_assert_no_errno(ret) do { \
|
||||
g_assert_cmpint(ret, !=, -1); \
|
||||
} while (0)
|
||||
|
||||
static int qtest_query_target_endianness(QTestState *s);
|
||||
|
||||
static int init_socket(const char *socket_path)
|
||||
@ -61,7 +57,7 @@ static int init_socket(const char *socket_path)
|
||||
int ret;
|
||||
|
||||
sock = socket(PF_UNIX, SOCK_STREAM, 0);
|
||||
g_assert_no_errno(sock);
|
||||
g_assert_cmpint(sock, !=, -1);
|
||||
|
||||
addr.sun_family = AF_UNIX;
|
||||
snprintf(addr.sun_path, sizeof(addr.sun_path), "%s", socket_path);
|
||||
@ -70,9 +66,9 @@ static int init_socket(const char *socket_path)
|
||||
do {
|
||||
ret = bind(sock, (struct sockaddr *)&addr, sizeof(addr));
|
||||
} while (ret == -1 && errno == EINTR);
|
||||
g_assert_no_errno(ret);
|
||||
g_assert_cmpint(ret, !=, -1);
|
||||
ret = listen(sock, 1);
|
||||
g_assert_no_errno(ret);
|
||||
g_assert_cmpint(ret, !=, -1);
|
||||
|
||||
return sock;
|
||||
}
|
||||
@ -325,7 +321,6 @@ static void socket_send(int fd, const char *buf, size_t size)
|
||||
continue;
|
||||
}
|
||||
|
||||
g_assert_no_errno(len);
|
||||
g_assert_cmpint(len, >, 0);
|
||||
|
||||
offset += len;
|
||||
|
Loading…
Reference in New Issue
Block a user