* [Qemu-devel] [PULL 0/5] Miscellaneous patches for 2018-10-10
@ 2018-10-10 6:11 Markus Armbruster
2018-10-10 6:11 ` [Qemu-devel] [PULL 1/5] tests/check-qjson: fix a leak Markus Armbruster
` (5 more replies)
0 siblings, 6 replies; 9+ messages in thread
From: Markus Armbruster @ 2018-10-10 6:11 UTC (permalink / raw)
To: qemu-devel
The following changes since commit 7c69b7c849641a39ba3defa40d384a2ba24cd7a2:
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20181008' into staging (2018-10-08 15:01:30 +0100)
are available in the Git repository at:
git://repo.or.cz/qemu/armbru.git tags/pull-misc-2018-10-10
for you to fetch changes up to b266f1d1123396f9f5df865508f7555ab0c9582a:
ivshmem: Fix unplug of device "ivshmem-plain" (2018-10-10 08:01:36 +0200)
----------------------------------------------------------------
Miscellaneous patches for 2018-10-10
* Fix ivshmem unplug (regressed in v2.7.0)
* Minor test suite and doc work
----------------------------------------------------------------
Kashyap Chamarthy (1):
qapi/misc.json: Remove superfluous words in CpuModelExpansionType
Marc-André Lureau (1):
tests/check-qjson: fix a leak
Markus Armbruster (3):
tests: Restore check-qdict unit test
libqtest: Inline g_assert_no_errno()
ivshmem: Fix unplug of device "ivshmem-plain"
hw/misc/ivshmem.c | 14 +++++---------
qapi/misc.json | 12 ++++++------
tests/Makefile.include | 2 +-
tests/check-qdict.c | 2 ++
tests/check-qjson.c | 1 +
tests/libqtest.c | 11 +++--------
6 files changed, 18 insertions(+), 24 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Qemu-devel] [PULL 1/5] tests/check-qjson: fix a leak
2018-10-10 6:11 [Qemu-devel] [PULL 0/5] Miscellaneous patches for 2018-10-10 Markus Armbruster
@ 2018-10-10 6:11 ` Markus Armbruster
2018-10-10 6:11 ` [Qemu-devel] [PULL 2/5] qapi/misc.json: Remove superfluous words in CpuModelExpansionType Markus Armbruster
` (4 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Markus Armbruster @ 2018-10-10 6:11 UTC (permalink / raw)
To: qemu-devel; +Cc: Marc-André Lureau
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Spotted by ASAN:
=================================================================
==11893==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 1120 byte(s) in 28 object(s) allocated from:
#0 0x7fd0515b0c48 in malloc (/lib64/libasan.so.5+0xeec48)
#1 0x7fd050ffa3c5 in g_malloc (/lib64/libglib-2.0.so.0+0x523c5)
#2 0x559e708b56a4 in qstring_from_str /home/elmarco/src/qq/qobject/qstring.c:66
#3 0x559e708b4fe0 in qstring_new /home/elmarco/src/qq/qobject/qstring.c:23
#4 0x559e708bda7d in parse_string /home/elmarco/src/qq/qobject/json-parser.c:143
#5 0x559e708c1009 in parse_literal /home/elmarco/src/qq/qobject/json-parser.c:484
#6 0x559e708c1627 in parse_value /home/elmarco/src/qq/qobject/json-parser.c:547
#7 0x559e708c1c67 in json_parser_parse /home/elmarco/src/qq/qobject/json-parser.c:573
#8 0x559e708bc0ff in json_message_process_token /home/elmarco/src/qq/qobject/json-streamer.c:92
#9 0x559e708d1655 in json_lexer_feed_char /home/elmarco/src/qq/qobject/json-lexer.c:292
#10 0x559e708d1fe1 in json_lexer_feed /home/elmarco/src/qq/qobject/json-lexer.c:339
#11 0x559e708bc856 in json_message_parser_feed /home/elmarco/src/qq/qobject/json-streamer.c:121
#12 0x559e708b8b4b in qobject_from_jsonv /home/elmarco/src/qq/qobject/qjson.c:69
#13 0x559e708b8d02 in qobject_from_json /home/elmarco/src/qq/qobject/qjson.c:83
#14 0x559e708a74ae in from_json_str /home/elmarco/src/qq/tests/check-qjson.c:30
#15 0x559e708a9f83 in utf8_string /home/elmarco/src/qq/tests/check-qjson.c:781
#16 0x7fd05101bc49 in test_case_run gtestutils.c:2255
#17 0x7fd05101bc49 in g_test_run_suite_internal gtestutils.c:2339
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20180901211917.10372-1-marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
tests/check-qjson.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/check-qjson.c b/tests/check-qjson.c
index cc13f3d41e..d876a7a96e 100644
--- a/tests/check-qjson.c
+++ b/tests/check-qjson.c
@@ -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);
}
}
}
--
2.17.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Qemu-devel] [PULL 2/5] qapi/misc.json: Remove superfluous words in CpuModelExpansionType
2018-10-10 6:11 [Qemu-devel] [PULL 0/5] Miscellaneous patches for 2018-10-10 Markus Armbruster
2018-10-10 6:11 ` [Qemu-devel] [PULL 1/5] tests/check-qjson: fix a leak Markus Armbruster
@ 2018-10-10 6:11 ` Markus Armbruster
2018-10-10 6:11 ` [Qemu-devel] [PULL 3/5] tests: Restore check-qdict unit test Markus Armbruster
` (3 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Markus Armbruster @ 2018-10-10 6:11 UTC (permalink / raw)
To: qemu-devel; +Cc: Kashyap Chamarthy
From: Kashyap Chamarthy <kchamart@redhat.com>
Remove repetition of 'independent of'. While at it, s/QMU/QEMU in
@CpuDefinitionInfo.
Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com>
Message-Id: <20181003104605.8477-1-kchamart@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
[Commit message updated as requested by Kashyap]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
qapi/misc.json | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/qapi/misc.json b/qapi/misc.json
index ada9af5add..f98de3a58c 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -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.
--
2.17.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Qemu-devel] [PULL 3/5] tests: Restore check-qdict unit test
2018-10-10 6:11 [Qemu-devel] [PULL 0/5] Miscellaneous patches for 2018-10-10 Markus Armbruster
2018-10-10 6:11 ` [Qemu-devel] [PULL 1/5] tests/check-qjson: fix a leak Markus Armbruster
2018-10-10 6:11 ` [Qemu-devel] [PULL 2/5] qapi/misc.json: Remove superfluous words in CpuModelExpansionType Markus Armbruster
@ 2018-10-10 6:11 ` Markus Armbruster
2018-10-10 16:43 ` Eric Blake
2018-10-10 6:11 ` [Qemu-devel] [PULL 4/5] libqtest: Inline g_assert_no_errno() Markus Armbruster
` (2 subsequent siblings)
5 siblings, 1 reply; 9+ messages in thread
From: Markus Armbruster @ 2018-10-10 6:11 UTC (permalink / raw)
To: qemu-devel
Commit 0bcc8e5bd8d accidentally dropped check-qdict from the list of
unit tests (again, see commit 4429532b48a). Put it back, and fix up
the test.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180926122309.30631-1-armbru@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
tests/Makefile.include | 2 +-
tests/check-qdict.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 7a3059bf6c..8264af64a8 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -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
diff --git a/tests/check-qdict.c b/tests/check-qdict.c
index 86e9fe7dc4..a1e8305066 100644
--- a/tests/check-qdict.c
+++ b/tests/check-qdict.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
--
2.17.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Qemu-devel] [PULL 4/5] libqtest: Inline g_assert_no_errno()
2018-10-10 6:11 [Qemu-devel] [PULL 0/5] Miscellaneous patches for 2018-10-10 Markus Armbruster
` (2 preceding siblings ...)
2018-10-10 6:11 ` [Qemu-devel] [PULL 3/5] tests: Restore check-qdict unit test Markus Armbruster
@ 2018-10-10 6:11 ` Markus Armbruster
2018-10-10 6:11 ` [Qemu-devel] [PULL 5/5] ivshmem: Fix unplug of device "ivshmem-plain" Markus Armbruster
2018-10-11 11:57 ` [Qemu-devel] [PULL 0/5] Miscellaneous patches for 2018-10-10 Peter Maydell
5 siblings, 0 replies; 9+ messages in thread
From: Markus Armbruster @ 2018-10-10 6:11 UTC (permalink / raw)
To: qemu-devel
Macro g_assert_no_errno() intrudes into GLib's namespace. It's also
pretty pointless. Inline.
At one call site, its redundancy is now obvious. Delete it there.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180926122933.3858-1-armbru@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
tests/libqtest.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/tests/libqtest.c b/tests/libqtest.c
index 2cd5736642..44ce118cfc 100644
--- a/tests/libqtest.c
+++ b/tests/libqtest.c
@@ -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;
--
2.17.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Qemu-devel] [PULL 5/5] ivshmem: Fix unplug of device "ivshmem-plain"
2018-10-10 6:11 [Qemu-devel] [PULL 0/5] Miscellaneous patches for 2018-10-10 Markus Armbruster
` (3 preceding siblings ...)
2018-10-10 6:11 ` [Qemu-devel] [PULL 4/5] libqtest: Inline g_assert_no_errno() Markus Armbruster
@ 2018-10-10 6:11 ` Markus Armbruster
2018-10-11 11:57 ` [Qemu-devel] [PULL 0/5] Miscellaneous patches for 2018-10-10 Peter Maydell
5 siblings, 0 replies; 9+ messages in thread
From: Markus Armbruster @ 2018-10-10 6:11 UTC (permalink / raw)
To: qemu-devel
Commit 2aece63c8a "hostmem: detect host backend memory is being used
properly" fixed "ivshmem-plain" to reject memory backends that are
already in use, and to block their deletion while in use. Two bugs
escaped review:
* New ivshmem_plain_exit() fails to call ivshmem_exit(). This breaks
unplug. Reproducer: migration after unplug still fails with
"Migration is disabled when using feature 'peer mode' in device
'ivshmem'".
* It failed to update legacy "ivshmem". Harmless, because it creates
the memory backend itself, and nothing else should use it.
Fix by moving the two host_memory_backend_set_mapped() calls into
ivshmem_common_realize() and ivshmem_exit(), guarded by s->hostmem.
Fixes: 2aece63c8a9d2c3a8ff41d2febc4cdeff2633331
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180926163709.22876-1-armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/misc/ivshmem.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 6febbabcaa..8cb17b9dd4 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -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;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PULL 3/5] tests: Restore check-qdict unit test
2018-10-10 6:11 ` [Qemu-devel] [PULL 3/5] tests: Restore check-qdict unit test Markus Armbruster
@ 2018-10-10 16:43 ` Eric Blake
2018-10-10 16:57 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 9+ messages in thread
From: Eric Blake @ 2018-10-10 16:43 UTC (permalink / raw)
To: Markus Armbruster, qemu-devel
On 10/10/18 1:11 AM, Markus Armbruster wrote:
> Commit 0bcc8e5bd8d accidentally dropped check-qdict from the list of
> unit tests (again, see commit 4429532b48a). Put it back, and fix up
> the test.
Since this seems to be a recurring problem...
> +++ b/tests/Makefile.include
> @@ -40,7 +40,7 @@ SYSEMU_TARGET_LIST := $(subst -softmmu.mak,,$(notdir \
>
> check-unit-y = tests/check-qdict$(EXESUF)
How about a followup patch that does:
- check-unit-y = tests/check-qdict$(EXESUF)
+ check-unit-y =
+ check-unit-y += tests/check-qdict$(EXESUF)
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PULL 3/5] tests: Restore check-qdict unit test
2018-10-10 16:43 ` Eric Blake
@ 2018-10-10 16:57 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-10-10 16:57 UTC (permalink / raw)
To: Eric Blake, Markus Armbruster, qemu-devel
On 10/10/2018 18:43, Eric Blake wrote:
> On 10/10/18 1:11 AM, Markus Armbruster wrote:
>> Commit 0bcc8e5bd8d accidentally dropped check-qdict from the list of
>> unit tests (again, see commit 4429532b48a). Put it back, and fix up
>> the test.
>
> Since this seems to be a recurring problem...
>
>> +++ b/tests/Makefile.include
>> @@ -40,7 +40,7 @@ SYSEMU_TARGET_LIST := $(subst -softmmu.mak,,$(notdir \
>> check-unit-y = tests/check-qdict$(EXESUF)
>
> How about a followup patch that does:
>
> - check-unit-y = tests/check-qdict$(EXESUF)
> + check-unit-y =
> + check-unit-y += tests/check-qdict$(EXESUF)
>
Yes, clever :)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Miscellaneous patches for 2018-10-10
2018-10-10 6:11 [Qemu-devel] [PULL 0/5] Miscellaneous patches for 2018-10-10 Markus Armbruster
` (4 preceding siblings ...)
2018-10-10 6:11 ` [Qemu-devel] [PULL 5/5] ivshmem: Fix unplug of device "ivshmem-plain" Markus Armbruster
@ 2018-10-11 11:57 ` Peter Maydell
5 siblings, 0 replies; 9+ messages in thread
From: Peter Maydell @ 2018-10-11 11:57 UTC (permalink / raw)
To: Markus Armbruster; +Cc: QEMU Developers
On 10 October 2018 at 07:11, Markus Armbruster <armbru@redhat.com> wrote:
> The following changes since commit 7c69b7c849641a39ba3defa40d384a2ba24cd7a2:
>
> Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20181008' into staging (2018-10-08 15:01:30 +0100)
>
> are available in the Git repository at:
>
> git://repo.or.cz/qemu/armbru.git tags/pull-misc-2018-10-10
>
> for you to fetch changes up to b266f1d1123396f9f5df865508f7555ab0c9582a:
>
> ivshmem: Fix unplug of device "ivshmem-plain" (2018-10-10 08:01:36 +0200)
>
> ----------------------------------------------------------------
> Miscellaneous patches for 2018-10-10
>
> * Fix ivshmem unplug (regressed in v2.7.0)
> * Minor test suite and doc work
>
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-10-11 11:57 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-10 6:11 [Qemu-devel] [PULL 0/5] Miscellaneous patches for 2018-10-10 Markus Armbruster
2018-10-10 6:11 ` [Qemu-devel] [PULL 1/5] tests/check-qjson: fix a leak Markus Armbruster
2018-10-10 6:11 ` [Qemu-devel] [PULL 2/5] qapi/misc.json: Remove superfluous words in CpuModelExpansionType Markus Armbruster
2018-10-10 6:11 ` [Qemu-devel] [PULL 3/5] tests: Restore check-qdict unit test Markus Armbruster
2018-10-10 16:43 ` Eric Blake
2018-10-10 16:57 ` Philippe Mathieu-Daudé
2018-10-10 6:11 ` [Qemu-devel] [PULL 4/5] libqtest: Inline g_assert_no_errno() Markus Armbruster
2018-10-10 6:11 ` [Qemu-devel] [PULL 5/5] ivshmem: Fix unplug of device "ivshmem-plain" Markus Armbruster
2018-10-11 11:57 ` [Qemu-devel] [PULL 0/5] Miscellaneous patches for 2018-10-10 Peter Maydell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.