qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 33ee3d: hmp-cmd: fix a missing_break warning


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 33ee3d: hmp-cmd: fix a missing_break warning
Date: Thu, 26 Mar 2020 04:00:18 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 33ee3d96c7c21febbfb90b005ee9e646cf1f3794
      
https://github.com/qemu/qemu/commit/33ee3d96c7c21febbfb90b005ee9e646cf1f3794
  Author: Pan Nengyuan <address@hidden>
  Date:   2020-03-25 (Wed, 25 Mar 2020)

  Changed paths:
    M monitor/hmp-cmds.c

  Log Message:
  -----------
  hmp-cmd: fix a missing_break warning

This fix coverity issues 94417686:
    1260        break;
    CID 94417686: (MISSING_BREAK)
    1261. unterminated_case: The case for value 
"MIGRATION_PARAMETER_THROTTLE_TRIGGER_THRESHOLD" is not terminated by a 'break' 
statement.
    1261    case MIGRATION_PARAMETER_THROTTLE_TRIGGER_THRESHOLD:
    1262        p->has_throttle_trigger_threshold = true;
    1263        visit_type_int(v, param, &p->throttle_trigger_threshold, &err);
    1264    case MIGRATION_PARAMETER_CPU_THROTTLE_INITIAL:

Fixes: dc14a470763c96fd9d360e1028ce38e8c3613a77
Fixes: Coverity (CID 1421950)
Reported-by: Euler Robot <address@hidden>
Signed-off-by: Pan Nengyuan <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Keqian Zhu <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 06b1c6f8b7efeaab5da5e092727cd1391a1d9f2c
      
https://github.com/qemu/qemu/commit/06b1c6f8b7efeaab5da5e092727cd1391a1d9f2c
  Author: Mao Zhongyi <address@hidden>
  Date:   2020-03-25 (Wed, 25 Mar 2020)

  Changed paths:
    M docs/xbzrle.txt
    M migration/migration.c
    M monitor/hmp-cmds.c

  Log Message:
  -----------
  xbzrle: update xbzrle doc

Add new parameter description, also:
1. Remove unsociable space.
2. Nit picking: s/two/2 in report

Signed-off-by: Mao Zhongyi <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 6d1da867e65f72b890e736a36cbaa9146a824b64
      
https://github.com/qemu/qemu/commit/6d1da867e65f72b890e736a36cbaa9146a824b64
  Author: Philippe Mathieu-Daudé <address@hidden>
  Date:   2020-03-25 (Wed, 25 Mar 2020)

  Changed paths:
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  tests/migration: Reduce autoconverge initial bandwidth

When using max-bandwidth=~100Mb/s, this test fails on Travis-CI
s390x when configured with --disable-tcg:

  $ make check-qtest
    TEST    check-qtest-s390x: tests/qtest/boot-serial-test
  qemu-system-s390x: -accel tcg: invalid accelerator tcg
  qemu-system-s390x: falling back to KVM
    TEST    check-qtest-s390x: tests/qtest/pxe-test
    TEST    check-qtest-s390x: tests/qtest/test-netfilter
    TEST    check-qtest-s390x: tests/qtest/test-filter-mirror
    TEST    check-qtest-s390x: tests/qtest/test-filter-redirector
    TEST    check-qtest-s390x: tests/qtest/drive_del-test
    TEST    check-qtest-s390x: tests/qtest/device-plug-test
    TEST    check-qtest-s390x: tests/qtest/virtio-ccw-test
    TEST    check-qtest-s390x: tests/qtest/cpu-plug-test
    TEST    check-qtest-s390x: tests/qtest/migration-test
  **
  ERROR:tests/qtest/migration-test.c:1229:test_migrate_auto_converge: 
'got_stop' should be FALSE
  ERROR - Bail out! 
ERROR:tests/qtest/migration-test.c:1229:test_migrate_auto_converge: 'got_stop' 
should be FALSE
  make: *** [tests/Makefile.include:633: check-qtest-s390x] Error 1

Per David Gilbert, "it could just be the writing is slow on s390
and the migration thread fast; in which case the autocomplete
wouldn't be needed. Perhaps we just need to reduce the bandwidth
limit."

Tuning the threshold by reducing the initial bandwidth makes the
autoconverge test pass.

Suggested-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Tested-by: Alex Bennée <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: d4ff109373ce871928c7e9ef648973eba642b484
      
https://github.com/qemu/qemu/commit/d4ff109373ce871928c7e9ef648973eba642b484
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2020-03-25 (Wed, 25 Mar 2020)

  Changed paths:
    M monitor/hmp-cmds.c

  Log Message:
  -----------
  hmp/vnc: Fix info vnc list leak

We're iterating the list, and then freeing the iteration pointer rather
than the list head.

Fixes: 0a9667ecdb6d ("hmp: Update info vnc")
Reported-by: Coverity (CID 1421932)
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: e1cd92d95cd4f97b3464c4e08cd5b22bf5ca05cb
      
https://github.com/qemu/qemu/commit/e1cd92d95cd4f97b3464c4e08cd5b22bf5ca05cb
  Author: Philippe Mathieu-Daudé <address@hidden>
  Date:   2020-03-25 (Wed, 25 Mar 2020)

  Changed paths:
    M tools/virtiofsd/passthrough_ll.c

  Log Message:
  -----------
  tools/virtiofsd/passthrough_ll: Fix double close()

On success, the fdopendir() call closes fd. Later on the error
path we try to close an already-closed fd. This can lead to
use-after-free. Fix by only closing the fd if the fdopendir()
call failed.

Cc: address@hidden
Fixes: b39bce121b (add dirp_map to hide lo_dirp pointers)
Reported-by: Coverity (CID 1421933 USE_AFTER_FREE)
Suggested-by: Peter Maydell <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: d96c4d5f193e0e45beec80a6277728b32875bddb
      
https://github.com/qemu/qemu/commit/d96c4d5f193e0e45beec80a6277728b32875bddb
  Author: Igor Mammedov <address@hidden>
  Date:   2020-03-25 (Wed, 25 Mar 2020)

  Changed paths:
    M softmmu/vl.c

  Log Message:
  -----------
  vl.c: fix migration failure for 3.1 and older machine types

Migration from QEMU(v4.0) fails when using 3.1 or older machine
type. For example if one attempts to migrate
QEMU-2.12 started as
  qemu-system-ppc64 -nodefaults -M pseries-2.12 -m 4096 -mem-path /tmp/
to current master, it will fail with
  qemu-system-ppc64: Unknown ramblock "ppc_spapr.ram", cannot accept migration
  qemu-system-ppc64: error while loading state for instance 0x0 of device 'ram'
  qemu-system-ppc64: load of migration failed: Invalid argument

Caused by 900c0ba373 commit which switches main RAM allocation to
memory backends and the fact in 3.1 and older QEMU, backends used
full[***] QOM path as memory region name instead of backend's name.
That was changed after 3.1 to use prefix-less names by default
(fa0cb34d22) for new machine types.
*** effectively makes main RAM memory region names defined by
MachineClass::default_ram_id being altered with '/objects/' prefix
and therefore migration fails as old QEMU sends prefix-less
name while new QEMU expects name with prefix when using 3.1 and
older machine types.

Fix it by forcing implicit[1] memory backend to always use
prefix-less names for its memory region by setting
  'x-use-canonical-path-for-ramblock-id'
property to false.

1) i.e. memory backend created by compat glue which maps
-m/-mem-path/-mem-prealloc/default RAM size into
appropriate backend type/options to match old CLI format.

Fixes: 900c0ba373
Signed-off-by: Igor Mammedov <address@hidden>
Reported-by: Lukáš Doktor <address@hidden>
Message-Id: <address@hidden>
Tested-by: Lukáš Doktor <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 27d07fcfa70c3afa0664288cbce5334ed9595a3a
      
https://github.com/qemu/qemu/commit/27d07fcfa70c3afa0664288cbce5334ed9595a3a
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2020-03-25 (Wed, 25 Mar 2020)

  Changed paths:
    M migration/colo.c

  Log Message:
  -----------
  migration/colo: fix use after free of local_err

local_err is used again in secondary_vm_do_failover() after
replication_stop_all(), so we must zero it. Otherwise try to set
non-NULL local_err will crash.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: b4a1733c5e6827c72b0dcfa295e07ef7b1ebccff
      
https://github.com/qemu/qemu/commit/b4a1733c5e6827c72b0dcfa295e07ef7b1ebccff
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2020-03-25 (Wed, 25 Mar 2020)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration/ram: fix use after free of local_err

local_err is used again in migration_bitmap_sync_precopy() after
precopy_notify(), so we must zero it. Otherwise try to set
non-NULL local_err will crash.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 7cd75cbdb8a45d9e2d5912f774d8194cbafdfa97
      
https://github.com/qemu/qemu/commit/7cd75cbdb8a45d9e2d5912f774d8194cbafdfa97
  Author: Mao Zhongyi <address@hidden>
  Date:   2020-03-25 (Wed, 25 Mar 2020)

  Changed paths:
    M migration/migration.c
    M monitor/hmp-cmds.c

  Log Message:
  -----------
  migration: use "" instead of (null) for tls-authz

run:
(qemu) info migrate_parameters
announce-initial: 50 ms
...
announce-max: 550 ms
multifd-compression: none
xbzrle-cache-size: 4194304
max-postcopy-bandwidth: 0
 tls-authz: '(null)'

Migration parameter 'tls-authz' is used to provide the QOM ID
of a QAuthZ subclass instance that provides the access control
check, default is NULL. But the empty string is not a valid
object ID, so use "" instead of the default. Although it will
fail when lookup an object with ID "", it is harmless, just
consistent with tls_creds.

As a bonus, this patch also fixed the bad indentation on the
last line and removed 'has_tls_authz' redundant check in
'hmp_info_migrate_parameters'.

Signed-off-by: Mao Zhongyi <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 01e38186ecb1fc6275720c5425332eed280ea93d
      
https://github.com/qemu/qemu/commit/01e38186ecb1fc6275720c5425332eed280ea93d
  Author: Peter Maydell <address@hidden>
  Date:   2020-03-26 (Thu, 26 Mar 2020)

  Changed paths:
    M docs/xbzrle.txt
    M migration/colo.c
    M migration/migration.c
    M migration/ram.c
    M monitor/hmp-cmds.c
    M softmmu/vl.c
    M tests/qtest/migration-test.c
    M tools/virtiofsd/passthrough_ll.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20200325b' 
into staging

Combo Migration/HMP/virtiofs pull

Small fixes all around.
Ones that are noticeable:
  a) Igor's migration compatibility fix affecting older machine types
     has been seen in the wild
  b) Philippe's autconverge fix should fix an intermittently
     failing migration test.
  c) Mao's makes a small change to the output of 'info
     migrate_parameters'  for tls-authz.

# gpg: Signature made Wed 25 Mar 2020 13:14:48 GMT
# gpg:                using RSA key 45F5C71B4A0CB7FB977A9FA90516331EBC5BFDE7
# gpg: Good signature from "Dr. David Alan Gilbert (RH2) <address@hidden>" 
[full]
# Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A  9FA9 0516 331E BC5B FDE7

* remotes/dgilbert/tags/pull-migration-20200325b:
  migration: use "" instead of (null) for tls-authz
  migration/ram: fix use after free of local_err
  migration/colo: fix use after free of local_err
  vl.c: fix migration failure for 3.1 and older machine types
  tools/virtiofsd/passthrough_ll: Fix double close()
  hmp/vnc: Fix info vnc list leak
  tests/migration: Reduce autoconverge initial bandwidth
  xbzrle: update xbzrle doc
  hmp-cmd: fix a missing_break warning

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/042abffc5e07...01e38186ecb1



reply via email to

[Prev in Thread] Current Thread [Next in Thread]