Skip to content
Snippets Groups Projects
  1. May 10, 2023
  2. May 02, 2023
  3. Mar 13, 2023
  4. Mar 01, 2023
  5. Feb 04, 2023
  6. Oct 28, 2022
    • Laurent Vivier's avatar
      qapi: net: add stream and dgram netdevs · 5166fe0a
      Laurent Vivier authored
      
      Copied from socket netdev file and modified to use SocketAddress
      to be able to introduce new features like unix socket.
      
      "udp" and "mcast" are squashed into dgram netdev, multicast is detected
      according to the IP address type.
      "listen" and "connect" modes are managed by stream netdev. An optional
      parameter "server" defines the mode (off by default)
      
      The two new types need to be parsed the modern way with -netdev, because
      with the traditional way, the "type" field of netdev structure collides with
      the "type" field of SocketAddress and prevents the correct evaluation of the
      command line option. Moreover the traditional way doesn't allow to use
      the same type (SocketAddress) several times with the -netdev option
      (needed to specify "local" and "remote" addresses).
      
      The previous commit paved the way for parsing the modern way, but
      omitted one detail: how to pick modern vs. traditional, in
      netdev_is_modern().
      
      We want to pick based on the value of parameter "type".  But how to
      extract it from the option argument?
      
      Parsing the option argument, either the modern or the traditional way,
      extracts it for us, but only if parsing succeeds.
      
      If parsing fails, there is no good option.  No matter which parser we
      pick, it'll be the wrong one for some arguments, and the error
      reporting will be confusing.
      
      Fortunately, the traditional parser accepts *anything* when called in
      a certain way.  This maximizes our chance to extract the value of
      "type", and in turn minimizes the risk of confusing error reporting.
      
      Signed-off-by: default avatarLaurent Vivier <lvivier@redhat.com>
      Reviewed-by: default avatarStefano Brivio <sbrivio@redhat.com>
      Acked-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      5166fe0a
  7. Oct 17, 2022
    • Daniel Henrique Barboza's avatar
      qmp/hmp, device_tree.c: introduce dumpdtb · bf353ad5
      Daniel Henrique Barboza authored
      
      To save the FDT blob we have the '-machine dumpdtb=<file>' property.
      With this property set, the machine saves the FDT in <file> and exit.
      The created file can then be converted to plain text dts format using
      'dtc'.
      
      There's nothing particularly sophisticated into saving the FDT that
      can't be done with the machine at any state, as long as the machine has
      a valid FDT to be saved.
      
      The 'dumpdtb' command receives a 'filename' parameter and, if the FDT is
      available via current_machine->fdt, save it in dtb format to 'filename'.
      In short, this is a '-machine dumpdtb' that can be fired on demand via
      QMP/HMP.
      
      This command will always be executed in-band (i.e. holding BQL),
      avoiding potential race conditions with machines that might change the
      FDT during runtime (e.g. PowerPC 'pseries' machine).
      
      Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
      Cc: Markus Armbruster <armbru@redhat.com>
      Cc: Alistair Francis <alistair.francis@wdc.com>
      Cc: David Gibson <david@gibson.dropbear.id.au>
      Acked-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarDaniel Henrique Barboza <danielhb413@gmail.com>
      Message-Id: <20220926173855.1159396-2-danielhb413@gmail.com>
      bf353ad5
  8. Sep 15, 2022
  9. Jul 20, 2022
    • Hyman Huang's avatar
      softmmu/dirtylimit: Implement dirty page rate limit · f3b2e38c
      Hyman Huang authored
      
      Implement dirtyrate calculation periodically basing on
      dirty-ring and throttle virtual CPU until it reachs the quota
      dirty page rate given by user.
      
      Introduce qmp commands "set-vcpu-dirty-limit",
      "cancel-vcpu-dirty-limit", "query-vcpu-dirty-limit"
      to enable, disable, query dirty page limit for virtual CPU.
      
      Meanwhile, introduce corresponding hmp commands
      "set_vcpu_dirty_limit", "cancel_vcpu_dirty_limit",
      "info vcpu_dirty_limit" so the feature can be more usable.
      
      "query-vcpu-dirty-limit" success depends on enabling dirty
      page rate limit, so just add it to the list of skipped
      command to ensure qmp-cmd-test run successfully.
      
      Signed-off-by: default avatarHyman Huang(黄勇) <huangy81@chinatelecom.cn>
      Acked-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
      Message-Id: <4143f26706d413dd29db0b672fe58b3d3fbe34bc.1656177590.git.huangy81@chinatelecom.cn>
      Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      f3b2e38c
  10. Jun 14, 2022
  11. May 17, 2022
  12. Apr 27, 2022
  13. Apr 25, 2022
  14. Apr 22, 2022
  15. Mar 02, 2022
  16. Nov 09, 2021
  17. Nov 01, 2021
  18. Sep 27, 2021
  19. Jun 11, 2021
  20. Jun 08, 2021
  21. May 26, 2021
  22. May 25, 2021
  23. Mar 23, 2021
  24. Mar 19, 2021
  25. Mar 18, 2021
  26. Jan 23, 2021
    • Paolo Bonzini's avatar
      hmp: remove "change vnc TARGET" command · cfb5387a
      Paolo Bonzini authored
      
      The HMP command \"change vnc TARGET\" is messy:
      
      - it takes an ugly shortcut to determine if the option has an "id",
      with incorrect results if "id=" is not preceded by an unescaped
      comma.
      
      - it deletes the existing QemuOpts and does not try to rollback
      if the parsing fails (which is not causing problems, but only due to
      how VNC options are parsed)
      
      - because it uses the same parsing function as "-vnc", it forces
      the latter to not support "-vnc help".
      
      On top of this, it uses a deprecated QMP command, thus getting in
      the way of removing the QMP command.  Since the usecase for the
      command is not clear, just remove it and send "change vnc password"
      directly to the QMP "change-vnc-password" command.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Reviewed-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Message-Id: <20210120144235.345983-2-pbonzini@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      cfb5387a
  27. Dec 18, 2020
  28. Dec 15, 2020
  29. Dec 09, 2020
  30. Nov 04, 2020
  31. Oct 09, 2020
    • Kevin Wolf's avatar
      block: Convert 'block_resize' to coroutine · eb94b81a
      Kevin Wolf authored
      
      block_resize performs some I/O that could potentially take quite some
      time, so use it as an example for the new 'coroutine': true annotation
      in the QAPI schema.
      
      bdrv_truncate() requires that we're already in the right AioContext for
      the BlockDriverState if called in coroutine context. So instead of just
      taking the AioContext lock, move the QMP handler coroutine to the
      context.
      
      Call blk_unref() only after switching back because blk_unref() may only
      be called in the main thread.
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Message-Id: <20201005155855.256490-15-kwolf@redhat.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      eb94b81a
  32. Oct 06, 2020
  33. Sep 29, 2020
  34. Sep 17, 2020
  35. Jun 17, 2020
    • David Hildenbrand's avatar
      hmp: Make json format optional for qom-set · 2d9e3dd9
      David Hildenbrand authored
      
      Commit 7d2ef6dc ("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: default avatarDavid Hildenbrand <david@redhat.com>
      Message-Id: <20200610075153.33892-1-david@redhat.com>
      Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      2d9e3dd9
  36. Jun 01, 2020
Loading