Skip to content
Snippets Groups Projects
  1. Oct 12, 2023
  2. Oct 11, 2023
    • Stefan Hajnoczi's avatar
      Merge tag 'pull-omnibus-111023-1' of https://gitlab.com/stsquad/qemu into staging · a51e5124
      Stefan Hajnoczi authored
      testing, gdbstub and plugin updates
      
        - enable more sbsa-ref tests in avocado
        - add swtpm to the package lists
        - reduce avocado noise in gitlab by limiting tests
        - make docker engine choice driven by configure and enable override
        - remove unneeded gcc suffix on some cross compilers
        - fix some NULL returns in gdbstub
        - improve locking in execlog plugin
        - introduce the GDBFeature structure
        - consistently set gdb_core_xml_file
        - use cleaner escaping for gdb xml
        - drop ancient gdb_has_xml() test
        - disable multi-instruction GUSA emulation when plugins enabled
        - fix some coverity issues in plugins
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmUmVJkACgkQ+9DbCVqe
      # KkTfNggAiS02FcL3faGjAN9+60xhvEQ3DJjI473hjvFWu0bSkQTjObcQqGc+V7Cw
      # 9yNtnxOOWB6KdAU8At7HlVqiUXeyTCJB7Att5/UgNUZj63j+cs7PXb4p7cVCcJOc
      # 17zni22tnmCBcC8wZaz0yj68jaftL3hz1QNUZOmv6CBt42q0+/4g1WKfaJ+w+SbK
      # T7cJEiMDObm8qeNAAXpDLB+9v3bRDxMZ8hFJ3p3CatQC8jbDrkuH7RrVPHDWiWQx
      # w0uXpUHlZEOVX23v6+iIoeb8YQW2bZI9UsfeyIHJlENaVgyL200LHgLvvAE4Qd63
      # dCtfQUZzj4t9sfoL4XgxaB7G4qtXTg==
      # =7PLI
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Wed 11 Oct 2023 03:54:01 EDT
      # gpg:                using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
      # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [unknown]
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44
      
      * tag 'pull-omnibus-111023-1' of https://gitlab.com/stsquad/qemu
      
      : (25 commits)
        contrib/plugins: fix coverity warning in hotblocks
        contrib/plugins: fix coverity warning in lockstep
        contrib/plugins: fix coverity warning in cache
        plugins: Set final instruction count in plugin_gen_tb_end
        target/sh4: Disable decode_gusa when plugins enabled
        accel/tcg: Add plugin_enabled to DisasContextBase
        gdbstub: Replace gdb_regs with an array
        gdbstub: Remove gdb_has_xml variable
        target/ppc: Remove references to gdb_has_xml
        target/arm: Remove references to gdb_has_xml
        gdbstub: Use g_markup_printf_escaped()
        hw/core/cpu: Return static value with gdb_arch_name()
        target/arm: Move the reference to arm-core.xml
        gdbstub: Introduce GDBFeature structure
        contrib/plugins: Use GRWLock in execlog
        plugins: Check if vCPU is realized
        gdbstub: Fix target.xml response
        gdbstub: Fix target_xml initialization
        configure: remove gcc version suffixes
        configure: allow user to override docker engine
        ...
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      a51e5124
    • Stefan Hajnoczi's avatar
      Merge tag 'migration-20231011-pull-request' of https://gitlab.com/juan.quintela/qemu into staging · 48747938
      Stefan Hajnoczi authored
      Migration Pull request (20231011 edition)
      
      Hi
      
      In this pull request:
      
      - Markus RDMA cleanup series
      - recover fixes from peter
      - migration capability from fabiano
      - negative migration test from fabiano.
      
      Please, pull.
      
      Thanks, Juan.
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQIzBAABCAAdFiEEGJn/jt6/WMzuA0uC9IfvGFhy1yMFAmUmaQ8ACgkQ9IfvGFhy
      # 1yN9fA//SBnea3Wl2158J673l5aaI8Vp/1PjfzvNdcr/6EQbXZBgug+haQ3n5Hhf
      # USNRhemrCkpZAGCUf07g9pfF4R/Jsq1OkOrWF4e6gAaZPNU4V5F7VKBk8pmFMLtr
      # Kk2XgnH2ZPaFEvts0qBrOfvDHH8gOzzjpF2HGrioM8Zr3p1JHz9OqJoSyawLF0U7
      # YFTq2jJSgaOQ6ax1+L8hLLuXlmNccBaTWT8Cv0rbPEgcwrJOM/wMfmd6O39ps929
      # yS5NnxqqkrprTDjmeGOgOQd0Cy/flinnzmu+BVMO6/ns9Hu6q1TGG6D+DOBdgmHH
      # jq7Ej5VILtXWOoZtXLHqA1Xt73ciVlmditVupoC+5vtIJou2JseClutOp98qxxzV
      # llMF7ldHbRTWnu7qIrwv2OINarowR0pIZfkJqBc6dNHHScwMCnX5L9YAvNePEo2V
      # 1oJpbqW7mmgwdlFAiKFD+AE6qUWxcnzOvPf+fzWrJMi507Kv5nmxQWTHw9dsFs7k
      # neWnK21t0s2t77+vVBtLlr06JESG+WndzvQsXKZu8Pd0+ASnzpX8pRVzxEPk5EiH
      # fT9bhXOCvxTTHulznjkOApODE5NF+KlHAFXU87cSIkdi/6JfzcvTe6KeeIPC248Q
      # jk3nVlhds1xajTcPAK7HF5Ta6R8rNdTZ6q/kFNhLaTGqv9agxDU=
      # =hekO
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Wed 11 Oct 2023 05:21:19 EDT
      # gpg:                using RSA key 1899FF8EDEBF58CCEE034B82F487EF185872D723
      # gpg: Good signature from "Juan Quintela <quintela@redhat.com>" [full]
      # gpg:                 aka "Juan Quintela <quintela@trasno.org>" [full]
      # Primary key fingerprint: 1899 FF8E DEBF 58CC EE03  4B82 F487 EF18 5872 D723
      
      * tag 'migration-20231011-pull-request' of https://gitlab.com/juan.quintela/qemu
      
      : (65 commits)
        migration: Add migration_rp_wait|kick()
        migration: Remember num of ramblocks to sync during recovery
        qemufile: Always return a verbose error
        migration: Introduce migrate_has_error()
        migration: Display error in query-migrate irrelevant of status
        migration/rdma: Replace flawed device detail dump by tracing
        migration/rdma: Use error_report() & friends instead of stderr
        migration/rdma: Downgrade qemu_rdma_cleanup() errors to warnings
        migration/rdma: Silence qemu_rdma_register_and_get_keys()
        migration/rdma: Silence qemu_rdma_block_for_wrid()
        migration/rdma: Don't report received completion events as error
        migration/rdma: Silence qemu_rdma_reg_control()
        migration/rdma: Silence qemu_rdma_connect()
        migration/rdma: Silence qemu_rdma_resolve_host()
        migration/rdma: Convert qemu_rdma_alloc_pd_cq() to Error
        migration/rdma: Convert qemu_rdma_post_recv_control() to Error
        migration/rdma: Convert qemu_rdma_post_send_control() to Error
        migration/rdma: Convert qemu_rdma_write() to Error
        migration/rdma: Convert qemu_rdma_write_one() to Error
        migration/rdma: Convert qemu_rdma_write_flush() to Error
        ...
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      48747938
    • Stefan Hajnoczi's avatar
      Merge tag 'audio-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging · 67d2486c
      Stefan Hajnoczi authored
      Audio es1370 fix & cleanups
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQJQBAABCAA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmUmQIQcHG1hcmNhbmRy
      # ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5UiED/0VjK4J6I+MYljyJePj
      # ki62XC/dtojuxkE+nwsTrU54u86776TLmthRYyHOffSs8mDpk0ynY6sWD99T4r1b
      # 9Szmm9FJM658RSpN9i128JAiHKD9Vth7UUpekrLIBgRsW5lGuQFapHouTB1wa3hm
      # 8ZszUNAGEpAgGM2My9t+pvGy8lrOZan2ZAlQzKfMc+msYTnivK6huzjVw/xUc0kD
      # vzfpVMgKntvl391IBf9hFBBrJCWRtDrydtPl1/PxpVj/96FGIxlx+o30X8z9hSzA
      # yg96XfwmS/mgqFsw8QqtFyrkSE3iD2yzcrepjtK+erwcv6M0BVG38wn89F571Lcl
      # Ga8PcqBd7pP0nMXrgjbX8qB6t58TPipEbFMeS2iabO4pwz0jy9aCVQJ2GZqHNqaF
      # VoMN5hEDBhanxFcNEcjSWZEfJOvK7uVLAZ2Xdqcrsm50ESTu55H/BIQWFipTGlqu
      # +BlvfpwVYXGziuDsj8h4cUGvyuMY02XWsBU9qvl5aCiyWoyED0ZlR2UJ0jVjn68K
      # RUbTrxSMF9hLgI1j8FYkNgXMBuR4+Sopc7vp//AXpp92/yxTNCbe44Y06C9iaib1
      # 0zrYhd4rfTn0MX+YM9IUKzvoNSVY6VxHoTucyTM9HcT7XtCnmwnMzjY4yGxQ6k3V
      # X0WBPpH4mCyXla7TJ0zwbnvH0A==
      # =B/KL
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Wed 11 Oct 2023 02:28:20 EDT
      # gpg:                using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5
      # gpg:                issuer "marcandre.lureau@redhat.com"
      # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full]
      # gpg:                 aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [full]
      # Primary key fingerprint: 87A9 BD93 3F87 C606 D276  F62D DAE8 E109 7596 9CE5
      
      * tag 'audio-pull-request' of https://gitlab.com/marcandre.lureau/qemu
      
      :
        hw/audio/es1370: trace lost interrupts
        hw/audio/es1370: change variable type and name
        hw/audio/es1370: block structure coding style fixes
        hw/audio/es1370: remove #ifdef ES1370_VERBOSE to avoid bit rot
        hw/audio/es1370: remove #ifdef ES1370_DEBUG to avoid bit rot
        hw/audio/es1370: remove unused dolog macro
        hw/audio/es1370: replace bit-rotted code with tracepoints
        hw/audio/es1370: reset current sample counter
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      67d2486c
    • Peter Xu's avatar
      migration: Add migration_rp_wait|kick() · 5e79a4bf
      Peter Xu authored
      
      It's just a simple wrapper for rp_sem on either wait() or kick(), make it
      even clearer on how it is used.  Prepared to be used even for other things.
      
      Reviewed-by: default avatarFabiano Rosas <farosas@suse.de>
      Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
      Message-ID: <20231004220240.167175-8-peterx@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      5e79a4bf
    • Peter Xu's avatar
      migration: Remember num of ramblocks to sync during recovery · 1015ff54
      Peter Xu authored
      
      Instead of only relying on the count of rp_sem, make the counter be part of
      RAMState so it can be used in both threads to synchronize on the process.
      
      rp_sem will be further reused in follow up patches, as a way to kick the
      main thread, e.g., on recovery failures.
      
      Reviewed-by: default avatarFabiano Rosas <farosas@suse.de>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      Message-ID: <20231004220240.167175-7-peterx@redhat.com>
      1015ff54
    • Peter Xu's avatar
      qemufile: Always return a verbose error · f4b897f4
      Peter Xu authored
      
      There're a lot of cases where we only have an errno set in last_error but
      without a detailed error description.  When this happens, try to generate
      an error contains the errno as a descriptive error.
      
      This will be helpful in cases where one relies on the Error*.  E.g.,
      migration state only caches Error* in MigrationState.error.  With this,
      we'll display correct error messages in e.g. query-migrate when the error
      was only set by qemu_file_set_error().
      
      Reviewed-by: default avatarFabiano Rosas <farosas@suse.de>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      Message-ID: <20231004220240.167175-6-peterx@redhat.com>
      f4b897f4
    • Peter Xu's avatar
      migration: Introduce migrate_has_error() · 2b2f6f41
      Peter Xu authored
      
      Introduce a helper to detect whether MigrationState.error is set for
      whatever reason.
      
      This is preparation work for any thread (e.g. source return path thread) to
      setup errors in an unified way to MigrationState, rather than relying on
      its own way to set errors (mark_source_rp_bad()).
      
      Reviewed-by: default avatarFabiano Rosas <farosas@suse.de>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      Message-ID: <20231004220240.167175-3-peterx@redhat.com>
      2b2f6f41
    • Peter Xu's avatar
      migration: Display error in query-migrate irrelevant of status · c94143e5
      Peter Xu authored
      Display it as long as being set, irrelevant of FAILED status.  E.g., it may
      also be applicable to PAUSED stage of postcopy, to provide hint on what has
      gone wrong.
      
      The error_mutex seems to be overlooked when referencing the error, add it
      to be very safe.
      
      This will change QAPI behavior by showing up error message outside !FAILED
      status, but it's intended and doesn't expect to break anyone.
      
      Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2018404
      
      
      Reviewed-by: default avatarFabiano Rosas <farosas@suse.de>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      Message-ID: <20231004220240.167175-2-peterx@redhat.com>
      c94143e5
    • Markus Armbruster's avatar
      migration/rdma: Replace flawed device detail dump by tracing · 2c88739c
      Markus Armbruster authored
      
      qemu_rdma_dump_id() dumps RDMA device details to stdout.
      
      rdma_start_outgoing_migration() calls it via qemu_rdma_source_init()
      and qemu_rdma_resolve_host() to show source device details.
      rdma_start_incoming_migration() arranges its call via
      rdma_accept_incoming_migration() and qemu_rdma_accept() to show
      destination device details.
      
      Two issues:
      
      1. rdma_start_outgoing_migration() can run in HMP context.  The
         information should arguably go the monitor, not stdout.
      
      2. ibv_query_port() failure is reported as error.  Its callers remain
         unaware of this failure (qemu_rdma_dump_id() can't fail), so
         reporting this to the user as an error is problematic.
      
      Fixable, but the device detail dump is noise, except when
      troubleshooting.  Tracing is a better fit.  Similar function
      qemu_rdma_dump_id() was converted to tracing in commit
      733252de (Tracify migration/rdma.c).
      
      Convert qemu_rdma_dump_id(), too.
      
      While there, touch up qemu_rdma_dump_gid()'s outdated comment.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarFabiano Rosas <farosas@suse.de>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      Message-ID: <20230928132019.2544702-54-armbru@redhat.com>
      2c88739c
    • Markus Armbruster's avatar
      migration/rdma: Use error_report() & friends instead of stderr · ff4c9194
      Markus Armbruster authored
      
      error_report() obeys -msg, reports the current error location if any,
      and reports to the current monitor if any.  Reporting to stderr
      directly with fprintf() or perror() is wrong, because it loses all
      this.
      
      Fix the offenders.  Bonus: resolves a FIXME about problematic use of
      errno.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      Message-ID: <20230928132019.2544702-53-armbru@redhat.com>
      ff4c9194
    • Markus Armbruster's avatar
      migration/rdma: Downgrade qemu_rdma_cleanup() errors to warnings · 5cec563d
      Markus Armbruster authored
      
      Functions that use an Error **errp parameter to return errors should
      not also report them to the user, because reporting is the caller's
      job.  When the caller does, the error is reported twice.  When it
      doesn't (because it recovered from the error), there is no error to
      report, i.e. the report is bogus.
      
      qemu_rdma_source_init(), qemu_rdma_connect(),
      rdma_start_incoming_migration(), and rdma_start_outgoing_migration()
      violate this principle: they call error_report() via
      qemu_rdma_cleanup().
      
      Moreover, qemu_rdma_cleanup() can't fail.  It is called on error
      paths, and QIOChannel close and finalization.  Are the conditions it
      reports really errors?  I doubt it.
      
      Downgrade qemu_rdma_cleanup()'s errors to warnings.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarFabiano Rosas <farosas@suse.de>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      Message-ID: <20230928132019.2544702-52-armbru@redhat.com>
      5cec563d
    • Markus Armbruster's avatar
      migration/rdma: Silence qemu_rdma_register_and_get_keys() · b765d21e
      Markus Armbruster authored
      
      Functions that use an Error **errp parameter to return errors should
      not also report them to the user, because reporting is the caller's
      job.  When the caller does, the error is reported twice.  When it
      doesn't (because it recovered from the error), there is no error to
      report, i.e. the report is bogus.
      
      qemu_rdma_write_one() violates this principle: it reports errors to
      stderr via qemu_rdma_register_and_get_keys().  I elected not to
      investigate how callers handle the error, i.e. precise impact is not
      known.
      
      Clean this up: silence qemu_rdma_register_and_get_keys().  I believe
      the caller's error reports suffice.  If they don't, we need to convert
      to Error instead.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarLi Zhijian <lizhijian@fujitsu.com>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      Message-ID: <20230928132019.2544702-51-armbru@redhat.com>
      b765d21e
    • Markus Armbruster's avatar
      migration/rdma: Silence qemu_rdma_block_for_wrid() · 7555c771
      Markus Armbruster authored
      
      Functions that use an Error **errp parameter to return errors should
      not also report them to the user, because reporting is the caller's
      job.  When the caller does, the error is reported twice.  When it
      doesn't (because it recovered from the error), there is no error to
      report, i.e. the report is bogus.
      
      qemu_rdma_post_send_control(), qemu_rdma_exchange_get_response(), and
      qemu_rdma_write_one() violate this principle: they call
      error_report(), fprintf(stderr, ...), and perror() via
      qemu_rdma_block_for_wrid(), qemu_rdma_poll(), and
      qemu_rdma_wait_comp_channel().  I elected not to investigate how
      callers handle the error, i.e. precise impact is not known.
      
      Clean this up by dropping the error reporting from qemu_rdma_poll(),
      qemu_rdma_wait_comp_channel(), and qemu_rdma_block_for_wrid().  I
      believe the callers' error reports suffice.  If they don't, we need to
      convert to Error instead.
      
      Bonus: resolves a FIXME about problematic use of errno.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarLi Zhijian <lizhijian@fujitsu.com>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      Message-ID: <20230928132019.2544702-50-armbru@redhat.com>
      7555c771
    • Markus Armbruster's avatar
      migration/rdma: Don't report received completion events as error · 8dee156c
      Markus Armbruster authored
      
      When qemu_rdma_wait_comp_channel() receives an event from the
      completion channel, it reports an error "receive cm event while wait
      comp channel,cm event is T", where T is the numeric event type.
      However, the function fails only when T is a disconnect or device
      removal.  Events other than these two are not actually an error, and
      reporting them as an error is wrong.  If we need to report them to the
      user, we should use something else, and what to use depends on why we
      need to report them to the user.
      
      For now, report this error only when the function actually fails.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarLi Zhijian <lizhijian@fujitsu.com>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      Message-ID: <20230928132019.2544702-49-armbru@redhat.com>
      8dee156c
    • Markus Armbruster's avatar
      migration/rdma: Silence qemu_rdma_reg_control() · 01efb106
      Markus Armbruster authored
      
      Functions that use an Error **errp parameter to return errors should
      not also report them to the user, because reporting is the caller's
      job.  When the caller does, the error is reported twice.  When it
      doesn't (because it recovered from the error), there is no error to
      report, i.e. the report is bogus.
      
      qemu_rdma_source_init() and qemu_rdma_accept() violate this principle:
      they call error_report() via qemu_rdma_reg_control().  I elected not
      to investigate how callers handle the error, i.e. precise impact is
      not known.
      
      Clean this up by dropping the error reporting from
      qemu_rdma_reg_control().  I believe the callers' error reports
      suffice.  If they don't, we need to convert to Error instead.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarLi Zhijian <lizhijian@fujitsu.com>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      Message-ID: <20230928132019.2544702-48-armbru@redhat.com>
      01efb106
    • Markus Armbruster's avatar
      migration/rdma: Silence qemu_rdma_connect() · 35b1561e
      Markus Armbruster authored
      
      Functions that use an Error **errp parameter to return errors should
      not also report them to the user, because reporting is the caller's
      job.  When the caller does, the error is reported twice.  When it
      doesn't (because it recovered from the error), there is no error to
      report, i.e. the report is bogus.
      
      qemu_rdma_connect() violates this principle: it calls error_report()
      and perror().  I elected not to investigate how callers handle the
      error, i.e. precise impact is not known.
      
      Clean this up: replace perror() by changing error_setg() to
      error_setg_errno(), and drop error_report().  I believe the callers'
      error reports suffice then.  If they don't, we need to convert to
      Error instead.
      
      Bonus: resolves a FIXME about problematic use of errno.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarLi Zhijian <lizhijian@fujitsu.com>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      Message-ID: <20230928132019.2544702-47-armbru@redhat.com>
      35b1561e
    • Markus Armbruster's avatar
      migration/rdma: Silence qemu_rdma_resolve_host() · e6696d3e
      Markus Armbruster authored
      
      Functions that use an Error **errp parameter to return errors should
      not also report them to the user, because reporting is the caller's
      job.  When the caller does, the error is reported twice.  When it
      doesn't (because it recovered from the error), there is no error to
      report, i.e. the report is bogus.
      
      qemu_rdma_resolve_host() violates this principle: it calls
      error_report().
      
      Clean this up: drop error_report().
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarLi Zhijian <lizhijian@fujitsu.com>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      Message-ID: <20230928132019.2544702-46-armbru@redhat.com>
      e6696d3e
    • Markus Armbruster's avatar
      migration/rdma: Convert qemu_rdma_alloc_pd_cq() to Error · 07d5b946
      Markus Armbruster authored
      
      Functions that use an Error **errp parameter to return errors should
      not also report them to the user, because reporting is the caller's
      job.  When the caller does, the error is reported twice.  When it
      doesn't (because it recovered from the error), there is no error to
      report, i.e. the report is bogus.
      
      qemu_rdma_source_init() violates this principle: it calls
      error_report() via qemu_rdma_alloc_pd_cq().  I elected not to
      investigate how callers handle the error, i.e. precise impact is not
      known.
      
      Clean this up by converting qemu_rdma_alloc_pd_cq() to Error.
      
      The conversion loses a piece of advice on one of two failure paths:
      
          Your mlock() limits may be too low. Please check $ ulimit -a # and search for 'ulimit -l' in the output
      
      Not worth retaining.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarLi Zhijian <lizhijian@fujitsu.com>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      Message-ID: <20230928132019.2544702-45-armbru@redhat.com>
      07d5b946
    • Markus Armbruster's avatar
      migration/rdma: Convert qemu_rdma_post_recv_control() to Error · 3c0c3eba
      Markus Armbruster authored
      
      Just for symmetry with qemu_rdma_post_send_control().  Error messages
      lose detail I consider of no use to users.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarLi Zhijian <lizhijian@fujitsu.com>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      Message-ID: <20230928132019.2544702-44-armbru@redhat.com>
      3c0c3eba
    • Markus Armbruster's avatar
      migration/rdma: Convert qemu_rdma_post_send_control() to Error · f3805964
      Markus Armbruster authored
      
      Functions that use an Error **errp parameter to return errors should
      not also report them to the user, because reporting is the caller's
      job.  When the caller does, the error is reported twice.  When it
      doesn't (because it recovered from the error), there is no error to
      report, i.e. the report is bogus.
      
      qemu_rdma_exchange_send() violates this principle: it calls
      error_report() via qemu_rdma_post_send_control().  I elected not to
      investigate how callers handle the error, i.e. precise impact is not
      known.
      
      Clean this up by converting qemu_rdma_post_send_control() to Error.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarLi Zhijian <lizhijian@fujitsu.com>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      Message-ID: <20230928132019.2544702-43-armbru@redhat.com>
      f3805964
    • Markus Armbruster's avatar
      migration/rdma: Convert qemu_rdma_write() to Error · 446e559c
      Markus Armbruster authored
      
      Just for consistency with qemu_rdma_write_one() and
      qemu_rdma_write_flush(), and for slightly simpler code.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarLi Zhijian <lizhijian@fujitsu.com>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      Message-ID: <20230928132019.2544702-42-armbru@redhat.com>
      446e559c
    • Markus Armbruster's avatar
      migration/rdma: Convert qemu_rdma_write_one() to Error · 557c34ca
      Markus Armbruster authored
      
      Functions that use an Error **errp parameter to return errors should
      not also report them to the user, because reporting is the caller's
      job.  When the caller does, the error is reported twice.  When it
      doesn't (because it recovered from the error), there is no error to
      report, i.e. the report is bogus.
      
      qemu_rdma_write_flush() violates this principle: it calls
      error_report() via qemu_rdma_write_one().  I elected not to
      investigate how callers handle the error, i.e. precise impact is not
      known.
      
      Clean this up by converting qemu_rdma_write_one() to Error.  Bonus:
      resolves a FIXME about problematic use of errno.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarLi Zhijian <lizhijian@fujitsu.com>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      Message-ID: <20230928132019.2544702-41-armbru@redhat.com>
      557c34ca
    • Markus Armbruster's avatar
      migration/rdma: Convert qemu_rdma_write_flush() to Error · 56095477
      Markus Armbruster authored
      
      Functions that use an Error **errp parameter to return errors should
      not also report them to the user, because reporting is the caller's
      job.  When the caller does, the error is reported twice.  When it
      doesn't (because it recovered from the error), there is no error to
      report, i.e. the report is bogus.
      
      qio_channel_rdma_writev() violates this principle: it calls
      error_report() via qemu_rdma_write_flush().  I elected not to
      investigate how callers handle the error, i.e. precise impact is not
      known.
      
      Clean this up by converting qemu_rdma_write_flush() to Error.
      
      Necessitates setting an error when qemu_rdma_write_one() failed.
      Since this error will go away later in this series, simply use "FIXME
      temporary error message" there.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarLi Zhijian <lizhijian@fujitsu.com>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      Message-ID: <20230928132019.2544702-40-armbru@redhat.com>
      56095477
    • Markus Armbruster's avatar
      migration/rdma: Convert qemu_rdma_reg_whole_ram_blocks() to Error · de1aa35f
      Markus Armbruster authored
      
      Functions that use an Error **errp parameter to return errors should
      not also report them to the user, because reporting is the caller's
      job.  When the caller does, the error is reported twice.  When it
      doesn't (because it recovered from the error), there is no error to
      report, i.e. the report is bogus.
      
      qemu_rdma_exchange_send() violates this principle: it calls
      error_report() via callback qemu_rdma_reg_whole_ram_blocks().  I
      elected not to investigate how callers handle the error, i.e. precise
      impact is not known.
      
      Clean this up by converting the callback to Error.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarLi Zhijian <lizhijian@fujitsu.com>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      Message-ID: <20230928132019.2544702-39-armbru@redhat.com>
      de1aa35f
Loading