Skip to content
Snippets Groups Projects
  1. May 26, 2022
  2. Apr 20, 2022
  3. Apr 06, 2022
  4. Mar 21, 2022
  5. Feb 21, 2022
  6. Nov 02, 2021
  7. Oct 29, 2021
  8. Jul 12, 2021
  9. Jul 09, 2021
  10. Jun 03, 2021
  11. May 02, 2021
  12. Mar 19, 2021
    • Markus Armbruster's avatar
      monitor: Drop query-qmp-schema 'gen': false hack · 624fa80c
      Markus Armbruster authored
      
      QMP commands return their response as a generated QAPI type, which the
      monitor core converts to JSON via QObject.
      
      query-qmp-schema's response is the generated introspection data.  This
      is a QLitObject since commit 7d0f982b "qapi: generate a literal
      qobject for introspection", v2.12).  Before, it was a string.  Instead
      of converting QLitObject / string -> QObject -> QAPI type
      SchemaInfoList -> QObject -> JSON, we take a shortcut: the command is
      'gen': false, so it can return the QObject instead of the QAPI type.
      Slightly simpler and more efficient.
      
      The next commit will filter the response for output policy, and this
      is easier in the SchemaInfoList representation.  Drop the shortcut.
      
      This replaces the manual command registration by a generated one.  The
      manual registration makes the command available before the machine is
      built by passing flag QCO_ALLOW_PRECONFIG.  To keep it available
      there, we need need to add 'allow-preconfig': true to its definition
      in the schema.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20210318155519.1224118-7-armbru@redhat.com>
      624fa80c
    • Kevin Wolf's avatar
      qapi/qom: QAPIfy object-add · 9151e59a
      Kevin Wolf authored
      
      This converts object-add from 'gen': false to the ObjectOptions QAPI
      type. As an immediate benefit, clients can now use QAPI schema
      introspection for user creatable QOM objects.
      
      It is also the first step towards making the QAPI schema the only
      external interface for the creation of user creatable objects. Once all
      other places (HMP and command lines of the system emulator and all
      tools) go through QAPI, too, some object implementations can be
      simplified because some checks (e.g. that mandatory options are set) are
      already performed by QAPI, and in another step, QOM boilerplate code
      could be generated from the schema.
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Acked-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Acked-by: default avatarPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      9151e59a
  13. Mar 18, 2021
  14. Jan 02, 2021
  15. Dec 19, 2020
  16. Dec 18, 2020
  17. Dec 10, 2020
  18. Nov 13, 2020
    • Kevin Wolf's avatar
      hmp: Pass monitor to mon_get_cpu_env() · e7cff9c6
      Kevin Wolf authored
      
      mon_get_cpu_env() is indirectly called monitor_parse_arguments() where
      the current monitor isn't set yet. Instead of using monitor_cur_env(),
      explicitly pass the Monitor pointer to the function.
      
      Without this fix, an HMP command like "x $pc" crashes like this:
      
        #0  0x0000555555caa01f in mon_get_cpu_sync (mon=0x0, synchronize=true) at ../monitor/misc.c:270
        #1  0x0000555555caa141 in mon_get_cpu (mon=0x0) at ../monitor/misc.c:294
        #2  0x0000555555caa158 in mon_get_cpu_env () at ../monitor/misc.c:299
        #3  0x0000555555b19739 in monitor_get_pc (mon=0x555556ad2de0, md=0x5555565d2d40 <monitor_defs+1152>, val=0) at ../target/i386/monitor.c:607
        #4  0x0000555555cadbec in get_monitor_def (mon=0x555556ad2de0, pval=0x7fffffffc208, name=0x7fffffffc220 "pc") at ../monitor/misc.c:1681
        #5  0x000055555582ec4f in expr_unary (mon=0x555556ad2de0) at ../monitor/hmp.c:387
        #6  0x000055555582edbb in expr_prod (mon=0x555556ad2de0) at ../monitor/hmp.c:421
        #7  0x000055555582ee79 in expr_logic (mon=0x555556ad2de0) at ../monitor/hmp.c:455
        #8  0x000055555582eefe in expr_sum (mon=0x555556ad2de0) at ../monitor/hmp.c:484
        #9  0x000055555582efe8 in get_expr (mon=0x555556ad2de0, pval=0x7fffffffc418, pp=0x7fffffffc408) at ../monitor/hmp.c:511
        #10 0x000055555582fcd4 in monitor_parse_arguments (mon=0x555556ad2de0, endp=0x7fffffffc890, cmd=0x555556675b50 <hmp_cmds+7920>) at ../monitor/hmp.c:876
        #11 0x00005555558306a8 in handle_hmp_command (mon=0x555556ad2de0, cmdline=0x555556ada452 "$pc") at ../monitor/hmp.c:1087
        #12 0x000055555582df14 in monitor_command_cb (opaque=0x555556ad2de0, cmdline=0x555556ada450 "x $pc", readline_opaque=0x0) at ../monitor/hmp.c:47
      
      After this fix, nothing is left in monitor_parse_arguments() that can
      indirectly call monitor_cur(), so the fix is complete.
      
      Fixes: ff04108a
      Reported-by: default avatarlichun <lichun@ruijie.com.cn>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Message-Id: <20201113114326.97663-4-kwolf@redhat.com>
      Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      e7cff9c6
    • Kevin Wolf's avatar
      hmp: Pass monitor to MonitorDef.get_value() · 43cf067f
      Kevin Wolf authored
      
      All of these callbacks use mon_get_cpu_env(). Pass the Monitor
      pointer to them it in preparation for adding a monitor argument to
      mon_get_cpu_env().
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Message-Id: <20201113114326.97663-3-kwolf@redhat.com>
      Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      43cf067f
    • Kevin Wolf's avatar
      hmp: Pass monitor to mon_get_cpu() · 2fc5d01b
      Kevin Wolf authored
      
      mon_get_cpu() is indirectly called monitor_parse_arguments() where
      the current monitor isn't set yet. Instead of using monitor_cur(),
      explicitly pass the Monitor pointer to the function.
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Message-Id: <20201113114326.97663-2-kwolf@redhat.com>
      Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      2fc5d01b
  19. Oct 21, 2020
    • Gerd Hoffmann's avatar
      spice: add QemuSpiceOps, move migrate_info · 7477477c
      Gerd Hoffmann authored
      
      Add QemuSpiceOps struct.  This struct holds function pointers to the
      spice functions.  It will be initialized with pointers to the stub
      functions.  When spice gets initialized the function pointers will
      be re-written to the real functions.
      
      The spice stubs will move from qemu-spice.h to spice-module.c for that,
      because they will be needed for both "CONFIG_SPICE=n" and "CONFIG_SPICE=y
      but spice module not loaded" cases.
      
      This patch adds the infrastructure and starts with moving
      qemu_spice_migrate_info() to QemuSpiceOps.
      
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-id: 20201019075224.14803-3-kraxel@redhat.com
      7477477c
  20. Oct 09, 2020
  21. Sep 25, 2020
Loading