qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 00/12] migration, HMP and virtiofs queue
@ 2020-06-17 18:37 Dr. David Alan Gilbert (git)
  2020-06-17 18:37 ` [PULL 01/12] virtiofsd: Whitelist fchmod Dr. David Alan Gilbert (git)
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2020-06-17 18:37 UTC (permalink / raw)
  To: qemu-devel, david, lvivier, maozhongyi, mreitz, pannengyuan
  Cc: stefanha, quintela

From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

The following changes since commit 26bf4a29213b432eb390726c698a1915550a9cf9:

  Merge remote-tracking branch 'remotes/kraxel/tags/usb-20200617-pull-request' into staging (2020-06-17 16:24:24 +0100)

are available in the Git repository at:

  git://github.com/dagrh/qemu.git tags/pull-migration-20200617a

for you to fetch changes up to 7e89a1401a9674c9882948f05f4d17ea7be1c4eb:

  migration: fix multifd_send_pages() next channel (2020-06-17 17:48:39 +0100)

----------------------------------------------------------------
Migration (and HMP and virtiofs) pull 2020-06-17

Migration:
   HMP/migration and test changes from Mao Zhongyi
   multifd fix from Laurent Vivier
HMP
   qom-set partial reversion/change from David Hildenbrand
      now you need -j to pass json format, but it's regained the
      old 100M type format.
  Memory leak fix from Pan Nengyuan

Virtiofs
  fchmod seccomp fix from Max Reitz

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

----------------------------------------------------------------
David Hildenbrand (1):
      hmp: Make json format optional for qom-set

Laurent Vivier (1):
      migration: fix multifd_send_pages() next channel

Mao Zhongyi (8):
      tests/migration: mem leak fix
      tests/migration: fix unreachable path in stress test
      monitor/hmp-cmds: add units for migrate_parameters
      monitor/hmp-cmds: don't silently output when running 'migrate_set_downtime' fails
      monitor/hmp-cmds: delete redundant Error check before invoke hmp_handle_error()
      monitor/hmp-cmds: add 'goto end' to reduce duplicate code.
      monitor/hmp-cmds: improvements for the 'info migrate'
      docs/xbzrle: update 'cache miss rate' and 'encoding rate' to docs

Max Reitz (1):
      virtiofsd: Whitelist fchmod

Pan Nengyuan (1):
      qom-hmp-cmds: fix a memleak in hmp_qom_get

 docs/xbzrle.txt           |  8 +++++---
 hmp-commands.hx           |  7 ++++---
 migration/multifd.c       |  6 ++++++
 monitor/hmp-cmds.c        | 30 ++++++++++++++++--------------
 qom/qom-hmp-cmds.c        | 21 +++++++++++++++++----
 tests/migration/stress.c  | 34 +++++++---------------------------
 tools/virtiofsd/seccomp.c |  1 +
 7 files changed, 56 insertions(+), 51 deletions(-)



^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PULL 01/12] virtiofsd: Whitelist fchmod
  2020-06-17 18:37 [PULL 00/12] migration, HMP and virtiofs queue Dr. David Alan Gilbert (git)
@ 2020-06-17 18:37 ` Dr. David Alan Gilbert (git)
  2020-06-17 18:37 ` [PULL 02/12] qom-hmp-cmds: fix a memleak in hmp_qom_get Dr. David Alan Gilbert (git)
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2020-06-17 18:37 UTC (permalink / raw)
  To: qemu-devel, david, lvivier, maozhongyi, mreitz, pannengyuan
  Cc: stefanha, quintela

From: Max Reitz <mreitz@redhat.com>

lo_setattr() invokes fchmod() in a rarely used code path, so it should
be whitelisted or virtiofsd will crash with EBADSYS.

Said code path can be triggered for example as follows:

On the host, in the shared directory, create a file with the sticky bit
set and a security.capability xattr:
(1) # touch foo
(2) # chmod u+s foo
(3) # setcap '' foo

Then in the guest let some process truncate that file after it has
dropped all of its capabilities (at least CAP_FSETID):

int main(int argc, char *argv[])
{
    capng_setpid(getpid());
    capng_clear(CAPNG_SELECT_BOTH);
    capng_updatev(CAPNG_ADD, CAPNG_PERMITTED | CAPNG_EFFECTIVE, 0);
    capng_apply(CAPNG_SELECT_BOTH);

    ftruncate(open(argv[1], O_RDWR), 0);
}

This will cause the guest kernel to drop the sticky bit (i.e. perform a
mode change) as part of the truncate (where FATTR_FH is set), and that
will cause virtiofsd to invoke fchmod() instead of fchmodat().

(A similar configuration exists further below with futimens() vs.
utimensat(), but the former is not a syscall but just a wrapper for the
latter, so no further whitelisting is required.)

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1842667
Reported-by: Qian Cai <caiqian@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200608093111.14942-1-mreitz@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 tools/virtiofsd/seccomp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/virtiofsd/seccomp.c b/tools/virtiofsd/seccomp.c
index bd9e7b083c..3b1522acdd 100644
--- a/tools/virtiofsd/seccomp.c
+++ b/tools/virtiofsd/seccomp.c
@@ -42,6 +42,7 @@ static const int syscall_whitelist[] = {
     SCMP_SYS(exit_group),
     SCMP_SYS(fallocate),
     SCMP_SYS(fchdir),
+    SCMP_SYS(fchmod),
     SCMP_SYS(fchmodat),
     SCMP_SYS(fchownat),
     SCMP_SYS(fcntl),
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PULL 02/12] qom-hmp-cmds: fix a memleak in hmp_qom_get
  2020-06-17 18:37 [PULL 00/12] migration, HMP and virtiofs queue Dr. David Alan Gilbert (git)
  2020-06-17 18:37 ` [PULL 01/12] virtiofsd: Whitelist fchmod Dr. David Alan Gilbert (git)
@ 2020-06-17 18:37 ` Dr. David Alan Gilbert (git)
  2020-06-17 18:37 ` [PULL 03/12] hmp: Make json format optional for qom-set Dr. David Alan Gilbert (git)
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2020-06-17 18:37 UTC (permalink / raw)
  To: qemu-devel, david, lvivier, maozhongyi, mreitz, pannengyuan
  Cc: stefanha, quintela

From: Pan Nengyuan <pannengyuan@huawei.com>

'obj' forgot to free at the end of hmp_qom_get(). Fix that.

The leak stack:
Direct leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x7f4e3a779ae8 in __interceptor_malloc (/lib64/libasan.so.5+0xefae8)
    #1 0x7f4e398f91d5 in g_malloc (/lib64/libglib-2.0.so.0+0x531d5)
    #2 0x55c9fd9a3999 in qstring_from_substr /build/qemu/src/qobject/qstring.c:45
    #3 0x55c9fd894bd3 in qobject_output_type_str /build/qemu/src/qapi/qobject-output-visitor.c:175
    #4 0x55c9fd894bd3 in qobject_output_type_str /build/qemu/src/qapi/qobject-output-visitor.c:168
    #5 0x55c9fd88b34d in visit_type_str /build/qemu/src/qapi/qapi-visit-core.c:308
    #6 0x55c9fd59aa6b in property_get_str /build/qemu/src/qom/object.c:2064
    #7 0x55c9fd5adb8a in object_property_get_qobject /build/qemu/src/qom/qom-qobject.c:38
    #8 0x55c9fd4a029d in hmp_qom_get /build/qemu/src/qom/qom-hmp-cmds.c:66

Fixes: 89cf4fe34f4
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
Message-Id: <20200603070338.7922-1-pannengyuan@huawei.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Tested-by: Li Qiang <liq3ea@gmail.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 qom/qom-hmp-cmds.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/qom/qom-hmp-cmds.c b/qom/qom-hmp-cmds.c
index 99385b6ad2..158e2d7409 100644
--- a/qom/qom-hmp-cmds.c
+++ b/qom/qom-hmp-cmds.c
@@ -71,6 +71,7 @@ void hmp_qom_get(Monitor *mon, const QDict *qdict)
         qobject_unref(str);
     }
 
+    qobject_unref(obj);
     hmp_handle_error(mon, err);
 }
 
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PULL 03/12] hmp: Make json format optional for qom-set
  2020-06-17 18:37 [PULL 00/12] migration, HMP and virtiofs queue Dr. David Alan Gilbert (git)
  2020-06-17 18:37 ` [PULL 01/12] virtiofsd: Whitelist fchmod Dr. David Alan Gilbert (git)
  2020-06-17 18:37 ` [PULL 02/12] qom-hmp-cmds: fix a memleak in hmp_qom_get Dr. David Alan Gilbert (git)
@ 2020-06-17 18:37 ` Dr. David Alan Gilbert (git)
  2020-06-17 18:37 ` [PULL 04/12] tests/migration: mem leak fix Dr. David Alan Gilbert (git)
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2020-06-17 18:37 UTC (permalink / raw)
  To: qemu-devel, david, lvivier, maozhongyi, mreitz, pannengyuan
  Cc: stefanha, quintela

From: David Hildenbrand <david@redhat.com>

Commit 7d2ef6dcc1cf ("hmp: Simplify qom-set") switched to the json
parser, making it possible to specify complex types. However, with this
change it is no longer possible to specify proper sizes (e.g., 2G, 128M),
turning the interface harder to use for properties that consume sizes.

Let's switch back to the previous handling and allow to specify passing
json via the "-j" parameter.

Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20200610075153.33892-1-david@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 hmp-commands.hx    |  7 ++++---
 qom/qom-hmp-cmds.c | 20 ++++++++++++++++----
 2 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/hmp-commands.hx b/hmp-commands.hx
index 28256209b5..60f395c276 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -1806,9 +1806,10 @@ ERST
 
     {
         .name       = "qom-set",
-        .args_type  = "path:s,property:s,value:S",
-        .params     = "path property value",
-        .help       = "set QOM property",
+        .args_type  = "json:-j,path:s,property:s,value:S",
+        .params     = "[-j] path property value",
+        .help       = "set QOM property.\n\t\t\t"
+                      "-j: the value is specified in json format.",
         .cmd        = hmp_qom_set,
         .flags      = "p",
     },
diff --git a/qom/qom-hmp-cmds.c b/qom/qom-hmp-cmds.c
index 158e2d7409..b0abe84cb1 100644
--- a/qom/qom-hmp-cmds.c
+++ b/qom/qom-hmp-cmds.c
@@ -44,15 +44,27 @@ void hmp_qom_list(Monitor *mon, const QDict *qdict)
 
 void hmp_qom_set(Monitor *mon, const QDict *qdict)
 {
+    const bool json = qdict_get_try_bool(qdict, "json", false);
     const char *path = qdict_get_str(qdict, "path");
     const char *property = qdict_get_str(qdict, "property");
     const char *value = qdict_get_str(qdict, "value");
     Error *err = NULL;
-    QObject *obj;
 
-    obj = qobject_from_json(value, &err);
-    if (err == NULL) {
-        qmp_qom_set(path, property, obj, &err);
+    if (!json) {
+        Object *obj = object_resolve_path(path, NULL);
+
+        if (!obj) {
+            error_set(&err, ERROR_CLASS_DEVICE_NOT_FOUND,
+                      "Device '%s' not found", path);
+        } else {
+            object_property_parse(obj, value, property, &err);
+        }
+    } else {
+        QObject *obj = qobject_from_json(value, &err);
+
+        if (!err) {
+            qmp_qom_set(path, property, obj, &err);
+        }
     }
 
     hmp_handle_error(mon, err);
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PULL 04/12] tests/migration: mem leak fix
  2020-06-17 18:37 [PULL 00/12] migration, HMP and virtiofs queue Dr. David Alan Gilbert (git)
                   ` (2 preceding siblings ...)
  2020-06-17 18:37 ` [PULL 03/12] hmp: Make json format optional for qom-set Dr. David Alan Gilbert (git)
@ 2020-06-17 18:37 ` Dr. David Alan Gilbert (git)
  2020-06-17 18:37 ` [PULL 05/12] tests/migration: fix unreachable path in stress test Dr. David Alan Gilbert (git)
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2020-06-17 18:37 UTC (permalink / raw)
  To: qemu-devel, david, lvivier, maozhongyi, mreitz, pannengyuan
  Cc: stefanha, quintela

From: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>

‘data’ has the possibility of memory leaks, so use the
glib macros g_autofree recommended by CODING_STYLE.rst
to automatically release the memory that returned from
g_malloc().

Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20200603080904.997083-2-maozhongyi@cmss.chinamobile.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 tests/migration/stress.c | 21 ++-------------------
 1 file changed, 2 insertions(+), 19 deletions(-)

diff --git a/tests/migration/stress.c b/tests/migration/stress.c
index 0c23964693..f9626d50ee 100644
--- a/tests/migration/stress.c
+++ b/tests/migration/stress.c
@@ -170,26 +170,14 @@ static unsigned long long now(void)
 static int stressone(unsigned long long ramsizeMB)
 {
     size_t pagesPerMB = 1024 * 1024 / PAGE_SIZE;
-    char *ram = malloc(ramsizeMB * 1024 * 1024);
+    g_autofree char *ram = g_malloc(ramsizeMB * 1024 * 1024);
     char *ramptr;
     size_t i, j, k;
-    char *data = malloc(PAGE_SIZE);
+    g_autofree char *data = g_malloc(PAGE_SIZE);
     char *dataptr;
     size_t nMB = 0;
     unsigned long long before, after;
 
-    if (!ram) {
-        fprintf(stderr, "%s (%05d): ERROR: cannot allocate %llu MB of RAM: %s\n",
-                argv0, gettid(), ramsizeMB, strerror(errno));
-        return -1;
-    }
-    if (!data) {
-        fprintf(stderr, "%s (%d): ERROR: cannot allocate %d bytes of RAM: %s\n",
-                argv0, gettid(), PAGE_SIZE, strerror(errno));
-        free(ram);
-        return -1;
-    }
-
     /* We don't care about initial state, but we do want
      * to fault it all into RAM, otherwise the first iter
      * of the loop below will be quite slow. We can't use
@@ -198,8 +186,6 @@ static int stressone(unsigned long long ramsizeMB)
     memset(ram, 0xfe, ramsizeMB * 1024 * 1024);
 
     if (random_bytes(data, PAGE_SIZE) < 0) {
-        free(ram);
-        free(data);
         return -1;
     }
 
@@ -227,9 +213,6 @@ static int stressone(unsigned long long ramsizeMB)
             }
         }
     }
-
-    free(data);
-    free(ram);
 }
 
 
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PULL 05/12] tests/migration: fix unreachable path in stress test
  2020-06-17 18:37 [PULL 00/12] migration, HMP and virtiofs queue Dr. David Alan Gilbert (git)
                   ` (3 preceding siblings ...)
  2020-06-17 18:37 ` [PULL 04/12] tests/migration: mem leak fix Dr. David Alan Gilbert (git)
@ 2020-06-17 18:37 ` Dr. David Alan Gilbert (git)
  2020-06-17 18:37 ` [PULL 06/12] monitor/hmp-cmds: add units for migrate_parameters Dr. David Alan Gilbert (git)
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2020-06-17 18:37 UTC (permalink / raw)
  To: qemu-devel, david, lvivier, maozhongyi, mreitz, pannengyuan
  Cc: stefanha, quintela

From: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>

If stressone() or stress() exits it's because of a failure
because the test runs forever otherwise, so change stressone
and stress type to void to make the exit_failure() as the exit
function of main().

Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20200603080904.997083-3-maozhongyi@cmss.chinamobile.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 tests/migration/stress.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/tests/migration/stress.c b/tests/migration/stress.c
index f9626d50ee..a062ef6b55 100644
--- a/tests/migration/stress.c
+++ b/tests/migration/stress.c
@@ -167,7 +167,7 @@ static unsigned long long now(void)
     return (tv.tv_sec * 1000ull) + (tv.tv_usec / 1000ull);
 }
 
-static int stressone(unsigned long long ramsizeMB)
+static void stressone(unsigned long long ramsizeMB)
 {
     size_t pagesPerMB = 1024 * 1024 / PAGE_SIZE;
     g_autofree char *ram = g_malloc(ramsizeMB * 1024 * 1024);
@@ -186,7 +186,7 @@ static int stressone(unsigned long long ramsizeMB)
     memset(ram, 0xfe, ramsizeMB * 1024 * 1024);
 
     if (random_bytes(data, PAGE_SIZE) < 0) {
-        return -1;
+        return;
     }
 
     before = now();
@@ -225,7 +225,7 @@ static void *stressthread(void *arg)
     return NULL;
 }
 
-static int stress(unsigned long long ramsizeGB, int ncpus)
+static void stress(unsigned long long ramsizeGB, int ncpus)
 {
     size_t i;
     unsigned long long ramsizeMB = ramsizeGB * 1024 / ncpus;
@@ -238,8 +238,6 @@ static int stress(unsigned long long ramsizeGB, int ncpus)
     }
 
     stressone(ramsizeMB);
-
-    return 0;
 }
 
 
@@ -335,8 +333,7 @@ int main(int argc, char **argv)
     fprintf(stdout, "%s (%05d): INFO: RAM %llu GiB across %d CPUs\n",
             argv0, gettid(), ramsizeGB, ncpus);
 
-    if (stress(ramsizeGB, ncpus) < 0)
-        exit_failure();
+    stress(ramsizeGB, ncpus);
 
-    exit_success();
+    exit_failure();
 }
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PULL 06/12] monitor/hmp-cmds: add units for migrate_parameters
  2020-06-17 18:37 [PULL 00/12] migration, HMP and virtiofs queue Dr. David Alan Gilbert (git)
                   ` (4 preceding siblings ...)
  2020-06-17 18:37 ` [PULL 05/12] tests/migration: fix unreachable path in stress test Dr. David Alan Gilbert (git)
@ 2020-06-17 18:37 ` Dr. David Alan Gilbert (git)
  2020-06-17 18:37 ` [PULL 07/12] monitor/hmp-cmds: don't silently output when running 'migrate_set_downtime' fails Dr. David Alan Gilbert (git)
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2020-06-17 18:37 UTC (permalink / raw)
  To: qemu-devel, david, lvivier, maozhongyi, mreitz, pannengyuan
  Cc: stefanha, quintela

From: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>

When running:
(qemu) info migrate_parameters
announce-initial: 50 ms
announce-max: 550 ms
announce-step: 100 ms
compress-wait-thread: on
...
max-bandwidth: 33554432 bytes/second
downtime-limit: 300 milliseconds
x-checkpoint-delay: 20000
...
xbzrle-cache-size: 67108864

add units for the parameters 'x-checkpoint-delay' and
'xbzrle-cache-size', it's easier to read, also move
milliseconds to ms to keep the same style.

Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20200603080904.997083-4-maozhongyi@cmss.chinamobile.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 monitor/hmp-cmds.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
index e03adf0d4d..2c630ec88d 100644
--- a/monitor/hmp-cmds.c
+++ b/monitor/hmp-cmds.c
@@ -443,11 +443,11 @@ void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict)
             MigrationParameter_str(MIGRATION_PARAMETER_MAX_BANDWIDTH),
             params->max_bandwidth);
         assert(params->has_downtime_limit);
-        monitor_printf(mon, "%s: %" PRIu64 " milliseconds\n",
+        monitor_printf(mon, "%s: %" PRIu64 " ms\n",
             MigrationParameter_str(MIGRATION_PARAMETER_DOWNTIME_LIMIT),
             params->downtime_limit);
         assert(params->has_x_checkpoint_delay);
-        monitor_printf(mon, "%s: %u\n",
+        monitor_printf(mon, "%s: %u ms\n",
             MigrationParameter_str(MIGRATION_PARAMETER_X_CHECKPOINT_DELAY),
             params->x_checkpoint_delay);
         assert(params->has_block_incremental);
@@ -460,7 +460,7 @@ void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict)
         monitor_printf(mon, "%s: %s\n",
             MigrationParameter_str(MIGRATION_PARAMETER_MULTIFD_COMPRESSION),
             MultiFDCompression_str(params->multifd_compression));
-        monitor_printf(mon, "%s: %" PRIu64 "\n",
+        monitor_printf(mon, "%s: %" PRIu64 " bytes\n",
             MigrationParameter_str(MIGRATION_PARAMETER_XBZRLE_CACHE_SIZE),
             params->xbzrle_cache_size);
         monitor_printf(mon, "%s: %" PRIu64 "\n",
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PULL 07/12] monitor/hmp-cmds: don't silently output when running 'migrate_set_downtime' fails
  2020-06-17 18:37 [PULL 00/12] migration, HMP and virtiofs queue Dr. David Alan Gilbert (git)
                   ` (5 preceding siblings ...)
  2020-06-17 18:37 ` [PULL 06/12] monitor/hmp-cmds: add units for migrate_parameters Dr. David Alan Gilbert (git)
@ 2020-06-17 18:37 ` Dr. David Alan Gilbert (git)
  2020-06-17 18:37 ` [PULL 08/12] monitor/hmp-cmds: delete redundant Error check before invoke hmp_handle_error() Dr. David Alan Gilbert (git)
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2020-06-17 18:37 UTC (permalink / raw)
  To: qemu-devel, david, lvivier, maozhongyi, mreitz, pannengyuan
  Cc: stefanha, quintela

From: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>

Although 'migrate_set_downtime' has been deprecated and replaced
with 'migrate_set_parameter downtime_limit', it has not been
completely eliminated, possibly due to compatibility with older
versions. I think as long as this old parameter is running, we
should report appropriate message when something goes wrong, not
be silent.

before:
(qemu) migrate_set_downtime -1
(qemu)

after:
(qemu) migrate_set_downtime -1
Error: Parameter 'downtime_limit' expects an integer in the range of 0 to 2000 seconds

Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20200603080904.997083-5-maozhongyi@cmss.chinamobile.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 monitor/hmp-cmds.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
index 2c630ec88d..a704b3469a 100644
--- a/monitor/hmp-cmds.c
+++ b/monitor/hmp-cmds.c
@@ -1189,8 +1189,11 @@ void hmp_migrate_pause(Monitor *mon, const QDict *qdict)
 /* Kept for backwards compatibility */
 void hmp_migrate_set_downtime(Monitor *mon, const QDict *qdict)
 {
+    Error *err = NULL;
+
     double value = qdict_get_double(qdict, "value");
-    qmp_migrate_set_downtime(value, NULL);
+    qmp_migrate_set_downtime(value, &err);
+    hmp_handle_error(mon, err);
 }
 
 void hmp_migrate_set_cache_size(Monitor *mon, const QDict *qdict)
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PULL 08/12] monitor/hmp-cmds: delete redundant Error check before invoke hmp_handle_error()
  2020-06-17 18:37 [PULL 00/12] migration, HMP and virtiofs queue Dr. David Alan Gilbert (git)
                   ` (6 preceding siblings ...)
  2020-06-17 18:37 ` [PULL 07/12] monitor/hmp-cmds: don't silently output when running 'migrate_set_downtime' fails Dr. David Alan Gilbert (git)
@ 2020-06-17 18:37 ` Dr. David Alan Gilbert (git)
  2020-06-17 18:37 ` [PULL 09/12] monitor/hmp-cmds: add 'goto end' to reduce duplicate code Dr. David Alan Gilbert (git)
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2020-06-17 18:37 UTC (permalink / raw)
  To: qemu-devel, david, lvivier, maozhongyi, mreitz, pannengyuan
  Cc: stefanha, quintela

From: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>

hmp_handle_error() does Error check internally.

Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
Message-Id: <20200603080904.997083-6-maozhongyi@cmss.chinamobile.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 monitor/hmp-cmds.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
index a704b3469a..504796d6e9 100644
--- a/monitor/hmp-cmds.c
+++ b/monitor/hmp-cmds.c
@@ -1637,9 +1637,8 @@ void hmp_object_add(Monitor *mon, const QDict *qdict)
     obj = user_creatable_add_opts(opts, &err);
     qemu_opts_del(opts);
 
-    if (err) {
-        hmp_handle_error(mon, err);
-    }
+    hmp_handle_error(mon, err);
+
     if (obj) {
         object_unref(obj);
     }
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PULL 09/12] monitor/hmp-cmds: add 'goto end' to reduce duplicate code.
  2020-06-17 18:37 [PULL 00/12] migration, HMP and virtiofs queue Dr. David Alan Gilbert (git)
                   ` (7 preceding siblings ...)
  2020-06-17 18:37 ` [PULL 08/12] monitor/hmp-cmds: delete redundant Error check before invoke hmp_handle_error() Dr. David Alan Gilbert (git)
@ 2020-06-17 18:37 ` Dr. David Alan Gilbert (git)
  2020-06-17 18:37 ` [PULL 10/12] monitor/hmp-cmds: improvements for the 'info migrate' Dr. David Alan Gilbert (git)
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2020-06-17 18:37 UTC (permalink / raw)
  To: qemu-devel, david, lvivier, maozhongyi, mreitz, pannengyuan
  Cc: stefanha, quintela

From: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>

Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
Message-Id: <20200603080904.997083-7-maozhongyi@cmss.chinamobile.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 monitor/hmp-cmds.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
index 504796d6e9..00e3362cb0 100644
--- a/monitor/hmp-cmds.c
+++ b/monitor/hmp-cmds.c
@@ -1502,8 +1502,7 @@ void hmp_change(Monitor *mon, const QDict *qdict)
                                 read_only,
                                 BLOCKDEV_CHANGE_READ_ONLY_MODE_RETAIN, &err);
             if (err) {
-                hmp_handle_error(mon, err);
-                return;
+                goto end;
             }
         }
 
@@ -1512,6 +1511,7 @@ void hmp_change(Monitor *mon, const QDict *qdict)
                                    &err);
     }
 
+end:
     hmp_handle_error(mon, err);
 }
 
@@ -1630,13 +1630,13 @@ void hmp_object_add(Monitor *mon, const QDict *qdict)
 
     opts = qemu_opts_from_qdict(qemu_find_opts("object"), qdict, &err);
     if (err) {
-        hmp_handle_error(mon, err);
-        return;
+        goto end;
     }
 
     obj = user_creatable_add_opts(opts, &err);
     qemu_opts_del(opts);
 
+end:
     hmp_handle_error(mon, err);
 
     if (obj) {
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PULL 10/12] monitor/hmp-cmds: improvements for the 'info migrate'
  2020-06-17 18:37 [PULL 00/12] migration, HMP and virtiofs queue Dr. David Alan Gilbert (git)
                   ` (8 preceding siblings ...)
  2020-06-17 18:37 ` [PULL 09/12] monitor/hmp-cmds: add 'goto end' to reduce duplicate code Dr. David Alan Gilbert (git)
@ 2020-06-17 18:37 ` Dr. David Alan Gilbert (git)
  2020-06-17 18:37 ` [PULL 11/12] docs/xbzrle: update 'cache miss rate' and 'encoding rate' to docs Dr. David Alan Gilbert (git)
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2020-06-17 18:37 UTC (permalink / raw)
  To: qemu-devel, david, lvivier, maozhongyi, mreitz, pannengyuan
  Cc: stefanha, quintela

From: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>

When running:

(qemu) info migrate
globals:
store-global-state: on
only-migratable: off
...
xbzrle transferred: 640892 kbytes
xbzrle pages: 16645936 pages
xbzrle cache miss: 1525426
xbzrle cache miss rate: 0.09
xbzrle encoding rate: 91.42
xbzrle overflow: 40896
...
compression pages: 377710 pages
compression busy: 0
compression busy rate: 0.00
compressed size: 463169457
compression rate: 3.33

Add units for 'xbzrle cache miss' and 'compressed size',
make it easier to read.

Suggested-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
Message-Id: <20200603080904.997083-8-maozhongyi@cmss.chinamobile.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 docs/xbzrle.txt    | 2 +-
 monitor/hmp-cmds.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/docs/xbzrle.txt b/docs/xbzrle.txt
index b431bdaf0f..385b4993f8 100644
--- a/docs/xbzrle.txt
+++ b/docs/xbzrle.txt
@@ -112,7 +112,7 @@ is recommended.
     cache size: H bytes
     xbzrle transferred: I kbytes
     xbzrle pages: J pages
-    xbzrle cache miss: K
+    xbzrle cache miss: K pages
     xbzrle overflow: L
 
 xbzrle cache-miss: the number of cache misses to date - high cache-miss rate
diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
index 00e3362cb0..2b0b58a336 100644
--- a/monitor/hmp-cmds.c
+++ b/monitor/hmp-cmds.c
@@ -299,7 +299,7 @@ void hmp_info_migrate(Monitor *mon, const QDict *qdict)
                        info->xbzrle_cache->bytes >> 10);
         monitor_printf(mon, "xbzrle pages: %" PRIu64 " pages\n",
                        info->xbzrle_cache->pages);
-        monitor_printf(mon, "xbzrle cache miss: %" PRIu64 "\n",
+        monitor_printf(mon, "xbzrle cache miss: %" PRIu64 " pages\n",
                        info->xbzrle_cache->cache_miss);
         monitor_printf(mon, "xbzrle cache miss rate: %0.2f\n",
                        info->xbzrle_cache->cache_miss_rate);
@@ -316,8 +316,8 @@ void hmp_info_migrate(Monitor *mon, const QDict *qdict)
                        info->compression->busy);
         monitor_printf(mon, "compression busy rate: %0.2f\n",
                        info->compression->busy_rate);
-        monitor_printf(mon, "compressed size: %" PRIu64 "\n",
-                       info->compression->compressed_size);
+        monitor_printf(mon, "compressed size: %" PRIu64 " kbytes\n",
+                       info->compression->compressed_size >> 10);
         monitor_printf(mon, "compression rate: %0.2f\n",
                        info->compression->compression_rate);
     }
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PULL 11/12] docs/xbzrle: update 'cache miss rate' and 'encoding rate' to docs
  2020-06-17 18:37 [PULL 00/12] migration, HMP and virtiofs queue Dr. David Alan Gilbert (git)
                   ` (9 preceding siblings ...)
  2020-06-17 18:37 ` [PULL 10/12] monitor/hmp-cmds: improvements for the 'info migrate' Dr. David Alan Gilbert (git)
@ 2020-06-17 18:37 ` Dr. David Alan Gilbert (git)
  2020-06-17 18:37 ` [PULL 12/12] migration: fix multifd_send_pages() next channel Dr. David Alan Gilbert (git)
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2020-06-17 18:37 UTC (permalink / raw)
  To: qemu-devel, david, lvivier, maozhongyi, mreitz, pannengyuan
  Cc: stefanha, quintela

From: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>

Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
Message-Id: <20200603080904.997083-9-maozhongyi@cmss.chinamobile.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 docs/xbzrle.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/docs/xbzrle.txt b/docs/xbzrle.txt
index 385b4993f8..6bd1828f34 100644
--- a/docs/xbzrle.txt
+++ b/docs/xbzrle.txt
@@ -113,9 +113,11 @@ is recommended.
     xbzrle transferred: I kbytes
     xbzrle pages: J pages
     xbzrle cache miss: K pages
-    xbzrle overflow: L
+    xbzrle cache miss rate: L
+    xbzrle encoding rate: M
+    xbzrle overflow: N
 
-xbzrle cache-miss: the number of cache misses to date - high cache-miss rate
+xbzrle cache miss: the number of cache misses to date - high cache-miss rate
 indicates that the cache size is set too low.
 xbzrle overflow: the number of overflows in the decoding which where the delta
 could not be compressed. This can happen if the changes in the pages are too
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PULL 12/12] migration: fix multifd_send_pages() next channel
  2020-06-17 18:37 [PULL 00/12] migration, HMP and virtiofs queue Dr. David Alan Gilbert (git)
                   ` (10 preceding siblings ...)
  2020-06-17 18:37 ` [PULL 11/12] docs/xbzrle: update 'cache miss rate' and 'encoding rate' to docs Dr. David Alan Gilbert (git)
@ 2020-06-17 18:37 ` Dr. David Alan Gilbert (git)
  2020-06-17 19:09 ` [PULL 00/12] migration, HMP and virtiofs queue no-reply
  2020-06-18 15:51 ` Peter Maydell
  13 siblings, 0 replies; 15+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2020-06-17 18:37 UTC (permalink / raw)
  To: qemu-devel, david, lvivier, maozhongyi, mreitz, pannengyuan
  Cc: stefanha, quintela

From: Laurent Vivier <lvivier@redhat.com>

multifd_send_pages() loops around the available channels,
the next channel to use between two calls to multifd_send_pages() is stored
inside a local static variable, next_channel.

It works well, except if the number of channels decreases between two calls
to multifd_send_pages(). In this case, the loop can try to access the
data of a channel that doesn't exist anymore.

The problem can be triggered if we start a migration with a given number of
channels and then we cancel the migration to restart it with a lower number.
This ends generally with an error like:
qemu-system-ppc64: .../util/qemu-thread-posix.c:77: qemu_mutex_lock_impl: Assertion `mutex->initialized' failed.

This patch fixes the error by capping next_channel with the current number
of channels before using it.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Message-Id: <20200617113154.593233-1-lvivier@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 migration/multifd.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/migration/multifd.c b/migration/multifd.c
index 5a3e4d0d46..d0441202aa 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -415,6 +415,12 @@ static int multifd_send_pages(QEMUFile *f)
     }
 
     qemu_sem_wait(&multifd_send_state->channels_ready);
+    /*
+     * next_channel can remain from a previous migration that was
+     * using more channels, so ensure it doesn't overflow if the
+     * limit is lower now.
+     */
+    next_channel %= migrate_multifd_channels();
     for (i = next_channel;; i = (i + 1) % migrate_multifd_channels()) {
         p = &multifd_send_state->params[i];
 
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PULL 00/12] migration, HMP and virtiofs queue
  2020-06-17 18:37 [PULL 00/12] migration, HMP and virtiofs queue Dr. David Alan Gilbert (git)
                   ` (11 preceding siblings ...)
  2020-06-17 18:37 ` [PULL 12/12] migration: fix multifd_send_pages() next channel Dr. David Alan Gilbert (git)
@ 2020-06-17 19:09 ` no-reply
  2020-06-18 15:51 ` Peter Maydell
  13 siblings, 0 replies; 15+ messages in thread
From: no-reply @ 2020-06-17 19:09 UTC (permalink / raw)
  To: dgilbert
  Cc: lvivier, maozhongyi, david, quintela, pannengyuan, qemu-devel,
	mreitz, stefanha

Patchew URL: https://patchew.org/QEMU/20200617183733.186168-1-dgilbert@redhat.com/



Hi,

This series failed the asan build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
export ARCH=x86_64
make docker-image-fedora V=1 NETWORK=1
time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1
=== TEST SCRIPT END ===

  GEN     docs/interop/qemu-qmp-ref.7
  CC      qga/guest-agent-command-state.o
  CC      qga/commands.o
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
  CC      qga/main.o
  CC      qga/commands-posix.o
  CC      qga/channel-posix.o
---
  AR      libvhost-user.a
  GEN     docs/interop/qemu-ga-ref.html
  GEN     docs/interop/qemu-ga-ref.txt
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
  GEN     docs/interop/qemu-ga-ref.7
  LINK    qemu-ga
  LINK    qemu-keymap
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
  LINK    ivshmem-client
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
  LINK    ivshmem-server
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
  AS      pc-bios/optionrom/multiboot.o
  AS      pc-bios/optionrom/linuxboot.o
  LINK    qemu-nbd
  CC      pc-bios/optionrom/linuxboot_dma.o
  LINK    qemu-storage-daemon
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
  LINK    qemu-img
  AS      pc-bios/optionrom/kvmvapic.o
  AS      pc-bios/optionrom/pvh.o
---
  LINK    qemu-edid
  BUILD   pc-bios/optionrom/multiboot.raw
  BUILD   pc-bios/optionrom/linuxboot.raw
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
  SIGN    pc-bios/optionrom/multiboot.bin
  BUILD   pc-bios/optionrom/kvmvapic.raw
  LINK    fsdev/virtfs-proxy-helper
  LINK    scsi/qemu-pr-helper
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
  SIGN    pc-bios/optionrom/linuxboot.bin
  SIGN    pc-bios/optionrom/kvmvapic.bin
  LINK    qemu-bridge-helper
---
  SIGN    pc-bios/optionrom/pvh.bin
  BUILD   pc-bios/optionrom/linuxboot_dma.raw
  SIGN    pc-bios/optionrom/linuxboot_dma.bin
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
  LINK    virtiofsd
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
  LINK    vhost-user-input
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
  GEN     x86_64-softmmu/hmp-commands.h
  GEN     x86_64-softmmu/config-target.h
  GEN     x86_64-softmmu/hmp-commands-info.h
---
  CC      x86_64-softmmu/hw/vfio/display.o
  CC      x86_64-softmmu/hw/vfio/igd.o
  CC      x86_64-softmmu/hw/virtio/virtio.o
/tmp/qemu-test/src/fpu/softfloat.c:3365:13: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation]
    absZ &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven );
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            !
/tmp/qemu-test/src/fpu/softfloat.c:3423:18: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation]
        absZ0 &= ~ ( ( (uint64_t) ( absZ1<<1 ) == 0 ) & roundNearestEven );
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 !
/tmp/qemu-test/src/fpu/softfloat.c:3483:18: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation]
        absZ0 &= ~(((uint64_t)(absZ1<<1) == 0) & roundNearestEven);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 !
/tmp/qemu-test/src/fpu/softfloat.c:3606:13: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation]
    zSig &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven );
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            !
/tmp/qemu-test/src/fpu/softfloat.c:3760:13: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation]
    zSig &= ~ ( ( ( roundBits ^ 0x200 ) == 0 ) & roundNearestEven );
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            !
/tmp/qemu-test/src/fpu/softfloat.c:3987:21: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation]
                    ~ ( ( (uint64_t) ( zSig1<<1 ) == 0 ) & roundNearestEven );
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                    !
/tmp/qemu-test/src/fpu/softfloat.c:4003:22: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation]
            zSig0 &= ~ ( ( (uint64_t) ( zSig1<<1 ) == 0 ) & roundNearestEven );
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     !
/tmp/qemu-test/src/fpu/softfloat.c:4273:18: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation]
        zSig1 &= ~ ( ( zSig2 + zSig2 == 0 ) & roundNearestEven );
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 !
8 errors generated.
make[1]: *** [/tmp/qemu-test/src/rules.mak:69: fpu/softfloat.o] Error 1
make[1]: *** Waiting for unfinished jobs....
  CC      x86_64-softmmu/hw/virtio/vhost.o
/tmp/qemu-test/src/migration/ram.c:919:45: error: implicit conversion from 'unsigned long' to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Werror,-Wimplicit-int-float-conversion]
            xbzrle_counters.encoding_rate = UINT64_MAX;
                                          ~ ^~~~~~~~~~
/usr/include/stdint.h:130:23: note: expanded from macro 'UINT64_MAX'
---
18446744073709551615UL
^~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [/tmp/qemu-test/src/rules.mak:69: migration/ram.o] Error 1
make: *** [Makefile:527: x86_64-softmmu/all] Error 2
Traceback (most recent call last):
  File "./tests/docker/docker.py", line 669, in <module>
    sys.exit(main())
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=39000a8ec71d418ead92ddc1577b6d14', '-u', '1001', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=x86_64-softmmu', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-ad9di9bu/src/docker-src.2020-06-17-15.05.13.2114:/var/tmp/qemu:z,ro', 'qemu:fedora', '/var/tmp/qemu/run', 'test-debug']' returned non-zero exit status 2.
filter=--filter=label=com.qemu.instance.uuid=39000a8ec71d418ead92ddc1577b6d14
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-ad9di9bu/src'
make: *** [docker-run-test-debug@fedora] Error 2

real    3m48.794s
user    0m8.400s


The full log is available at
http://patchew.org/logs/20200617183733.186168-1-dgilbert@redhat.com/testing.asan/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PULL 00/12] migration, HMP and virtiofs queue
  2020-06-17 18:37 [PULL 00/12] migration, HMP and virtiofs queue Dr. David Alan Gilbert (git)
                   ` (12 preceding siblings ...)
  2020-06-17 19:09 ` [PULL 00/12] migration, HMP and virtiofs queue no-reply
@ 2020-06-18 15:51 ` Peter Maydell
  13 siblings, 0 replies; 15+ messages in thread
From: Peter Maydell @ 2020-06-18 15:51 UTC (permalink / raw)
  To: Dr. David Alan Gilbert (git)
  Cc: Laurent Vivier, Mao Zhongyi, David Hildenbrand, Juan Quintela,
	Pan Nengyuan, QEMU Developers, Max Reitz, Stefan Hajnoczi

On Wed, 17 Jun 2020 at 19:38, Dr. David Alan Gilbert (git)
<dgilbert@redhat.com> wrote:
>
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> The following changes since commit 26bf4a29213b432eb390726c698a1915550a9cf9:
>
>   Merge remote-tracking branch 'remotes/kraxel/tags/usb-20200617-pull-request' into staging (2020-06-17 16:24:24 +0100)
>
> are available in the Git repository at:
>
>   git://github.com/dagrh/qemu.git tags/pull-migration-20200617a
>
> for you to fetch changes up to 7e89a1401a9674c9882948f05f4d17ea7be1c4eb:
>
>   migration: fix multifd_send_pages() next channel (2020-06-17 17:48:39 +0100)
>
> ----------------------------------------------------------------
> Migration (and HMP and virtiofs) pull 2020-06-17
>
> Migration:
>    HMP/migration and test changes from Mao Zhongyi
>    multifd fix from Laurent Vivier
> HMP
>    qom-set partial reversion/change from David Hildenbrand
>       now you need -j to pass json format, but it's regained the
>       old 100M type format.
>   Memory leak fix from Pan Nengyuan
>
> Virtiofs
>   fchmod seccomp fix from Max Reitz
>
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
>


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.1
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-06-18 15:53 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-17 18:37 [PULL 00/12] migration, HMP and virtiofs queue Dr. David Alan Gilbert (git)
2020-06-17 18:37 ` [PULL 01/12] virtiofsd: Whitelist fchmod Dr. David Alan Gilbert (git)
2020-06-17 18:37 ` [PULL 02/12] qom-hmp-cmds: fix a memleak in hmp_qom_get Dr. David Alan Gilbert (git)
2020-06-17 18:37 ` [PULL 03/12] hmp: Make json format optional for qom-set Dr. David Alan Gilbert (git)
2020-06-17 18:37 ` [PULL 04/12] tests/migration: mem leak fix Dr. David Alan Gilbert (git)
2020-06-17 18:37 ` [PULL 05/12] tests/migration: fix unreachable path in stress test Dr. David Alan Gilbert (git)
2020-06-17 18:37 ` [PULL 06/12] monitor/hmp-cmds: add units for migrate_parameters Dr. David Alan Gilbert (git)
2020-06-17 18:37 ` [PULL 07/12] monitor/hmp-cmds: don't silently output when running 'migrate_set_downtime' fails Dr. David Alan Gilbert (git)
2020-06-17 18:37 ` [PULL 08/12] monitor/hmp-cmds: delete redundant Error check before invoke hmp_handle_error() Dr. David Alan Gilbert (git)
2020-06-17 18:37 ` [PULL 09/12] monitor/hmp-cmds: add 'goto end' to reduce duplicate code Dr. David Alan Gilbert (git)
2020-06-17 18:37 ` [PULL 10/12] monitor/hmp-cmds: improvements for the 'info migrate' Dr. David Alan Gilbert (git)
2020-06-17 18:37 ` [PULL 11/12] docs/xbzrle: update 'cache miss rate' and 'encoding rate' to docs Dr. David Alan Gilbert (git)
2020-06-17 18:37 ` [PULL 12/12] migration: fix multifd_send_pages() next channel Dr. David Alan Gilbert (git)
2020-06-17 19:09 ` [PULL 00/12] migration, HMP and virtiofs queue no-reply
2020-06-18 15:51 ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).