Skip to content
Snippets Groups Projects
  1. Nov 02, 2021
    • Daniel P. Berrangé's avatar
      qapi: introduce x-query-profile QMP command · 37087fde
      Daniel P. Berrangé authored
      
      This is a counterpart to the HMP "info profile" command. It is being
      added with an "x-" prefix because this QMP command is intended as an
      adhoc debugging tool and will thus not be modelled in QAPI as fully
      structured data, nor will it have long term guaranteed stability.
      The existing HMP command is rewritten to call the QMP command.
      
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      37087fde
    • Daniel P. Berrangé's avatar
      qapi: introduce x-query-roms QMP command · dd98234c
      Daniel P. Berrangé authored
      
      This is a counterpart to the HMP "info roms" command. It is being
      added with an "x-" prefix because this QMP command is intended as an
      adhoc debugging tool and will thus not be modelled in QAPI as fully
      structured data, nor will it have long term guaranteed stability.
      The existing HMP command is rewritten to call the QMP command.
      
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      dd98234c
    • Daniel P. Berrangé's avatar
      docs/devel: document expectations for HMP commands in the future · 3d312f41
      Daniel P. Berrangé authored
      
      We no longer wish to have commands implemented in HMP only. All commands
      should start with a QMP implementation and the HMP merely be a shim
      around this. To reduce the burden of implementing QMP commands where
      there is low expectation of machine usage, requirements for QAPI
      modelling are relaxed provided the command is under the "x-" name
      prefix.
      
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      3d312f41
    • Daniel P. Berrangé's avatar
      docs/devel: add example of command returning unstructured text · a45cfcbb
      Daniel P. Berrangé authored
      
      This illustrates how to add a QMP command returning unstructured text,
      following the guidelines added in the previous patch. The example uses
      a simplified version of 'info roms'.
      
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      a45cfcbb
    • Daniel P. Berrangé's avatar
      docs/devel: document expectations for QAPI data modelling for QMP · f2de406f
      Daniel P. Berrangé authored
      
      Traditionally we have required that newly added QMP commands will model
      any returned data using fine grained QAPI types. This is good for
      commands that are intended to be consumed by machines, where clear data
      representation is very important. Commands that don't satisfy this have
      generally been added to HMP only.
      
      In effect the decision of whether to add a new command to QMP vs HMP has
      been used as a proxy for the decision of whether the cost of designing a
      fine grained QAPI type is justified by the potential benefits.
      
      As a result the commands present in QMP and HMP are non-overlapping
      sets, although HMP comamnds can be accessed indirectly via the QMP
      command 'human-monitor-command'.
      
      One of the downsides of 'human-monitor-command' is that the QEMU monitor
      APIs remain tied into various internal parts of the QEMU code. For
      example any exclusively HMP command will need to use 'monitor_printf'
      to get data out. It would be desirable to be able to fully isolate the
      monitor implementation from QEMU internals, however, this is only
      possible if all commands are exclusively based on QAPI with direct
      QMP exposure.
      
      The way to achieve this desired end goal is to finese the requirements
      for QMP command design. For cases where the output of a command is only
      intended for human consumption, it is reasonable to want to simplify
      the implementation by returning a plain string containing formatted
      data instead of designing a fine grained QAPI data type. This can be
      permitted if-and-only-if the command is exposed under the 'x-' name
      prefix. This indicates that the command data format is liable to
      future change and that it is not following QAPI design best practice.
      
      The poster child example for this would be the 'info registers' HMP
      command which returns printf formatted data representing CPU state.
      This information varies enourmously across target architectures and
      changes relatively frequently as new CPU features are implemented.
      It is there as debugging data for human operators, and any machine
      usage would treat it as an opaque blob. It is thus reasonable to
      expose this in QMP as 'x-query-registers' returning a 'str' field.
      
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      f2de406f
    • Daniel P. Berrangé's avatar
      monitor: introduce HumanReadableText and HMP support · f9429c67
      Daniel P. Berrangé authored
      
      This provides a foundation on which to convert simple HMP commands to
      use QMP. The QMP implementation will generate formatted text targeted
      for human consumption, returning it in the HumanReadableText data type.
      
      The HMP command handler will simply print out the formatted string
      within the HumanReadableText data type. Since this will be an entirely
      formulaic action in the case of HMP commands taking no arguments, a
      custom command handler is provided.
      
      Thus instead of registering a 'cmd' callback for the HMP command, a
      'cmd_info_hrt' callback is provided, which will simply be a pointer
      to the QMP implementation.
      
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Tested-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      f9429c67
    • Daniel P. Berrangé's avatar
      docs/devel: update error handling guidance for HMP commands · 6fa6b54f
      Daniel P. Berrangé authored
      
      Best practice is to use the 'hmp_handle_error' function, not
      'monitor_printf' or 'error_report_err'. This ensures that the
      message always gets an 'Error: ' prefix, distinguishing it
      from normal command output.
      
      Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      6fa6b54f
    • Daniel P. Berrangé's avatar
      docs/devel: tweak headings in monitor command docs · fa2613af
      Daniel P. Berrangé authored
      
      The new headings reflect the intended structure of the document and will
      better suit additions that follow.
      
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      fa2613af
    • Daniel P. Berrangé's avatar
      docs/devel: rename file for writing monitor commands · 0e33e3d2
      Daniel P. Berrangé authored
      
      The file already covers writing HMP commands, in addition to
      the QMP commands, so it deserves a more general name.
      
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      0e33e3d2
    • Daniel P. Berrangé's avatar
      monitor: make hmp_handle_error return a boolean · 0ca117a7
      Daniel P. Berrangé authored
      
      This turns the pattern
      
        if (err) {
           hmp_handle_error(mon, err);
           return;
        }
      
      into
      
        if (hmp_handle_error(mon, err)) {
           return;
        }
      
      Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      0ca117a7
    • Daniel P. Berrangé's avatar
      monitor: remove 'info ioapic' HMP command · 3e11e0b2
      Daniel P. Berrangé authored
      
      This command was turned into a no-op four years ago in
      
        commit 0c846544
        Author: Peter Xu <peterx@redhat.com>
        Date:   Fri Dec 29 15:31:04 2017 +0800
      
          hmp: obsolete "info ioapic"
      
      Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      3e11e0b2
    • Richard Henderson's avatar
      Merge remote-tracking branch... · 91e83944
      Richard Henderson authored
      Merge remote-tracking branch 'remotes/juanquintela/tags/migration-20211031-pull-request' into staging
      
      Migration Pull request
      
      Hi
      
      this includes pending bits of migration patches.
      
      - virtio-mem support by David Hildenbrand
      - dirtyrate improvements by Hyman Huang
      - fix rdma wrid by Li Zhijian
      - dump-guest-memory fixes by Peter Xu
      
      Pleas apply.
      
      Thanks, Juan.
      
      # gpg: Signature made Mon 01 Nov 2021 06:03:44 PM EDT
      # gpg:                using RSA key 1899FF8EDEBF58CCEE034B82F487EF185872D723
      # gpg: Good signature from "Juan Quintela <quintela@redhat.com>" [full]
      # gpg:                 aka "Juan Quintela <quintela@trasno.org>" [full]
      
      * remotes/juanquintela/tags/migration-20211031-pull-request:
        migration/dirtyrate: implement dirty-bitmap dirtyrate calculation
        memory: introduce total_dirty_pages to stat dirty pages
        migration/ram: Handle RAMBlocks with a RamDiscardManager on background snapshots
        migration/ram: Factor out populating pages readable in ram_block_populate_pages()
        migration: Simplify alignment and alignment checks
        migration/postcopy: Handle RAMBlocks with a RamDiscardManager on the destination
        virtio-mem: Drop precopy notifier
        migration/ram: Handle RAMBlocks with a RamDiscardManager on the migration source
        virtio-mem: Implement replay_discarded RamDiscardManager callback
        memory: Introduce replay_discarded callback for RamDiscardManager
        dump-guest-memory: Block live migration
        migration: Add migrate_add_blocker_internal()
        migration: Make migration blocker work for snapshots too
        migration/dirtyrate: implement dirty-ring dirtyrate calculation
        migration/dirtyrate: move init step of calculation to main thread
        migration/dirtyrate: adjust order of registering thread
        migration/dirtyrate: introduce struct and adjust DirtyRateStat
        memory: make global_dirty_tracking a bitmask
        KVM: introduce dirty_pages and kvm_dirty_ring_enabled
        migration/rdma: Fix out of order wrid
      
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      91e83944
    • Richard Henderson's avatar
      Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20211101' into staging · f79bb385
      Richard Henderson authored
      
      qemu-openbios queue
      
      # gpg: Signature made Mon 01 Nov 2021 05:51:08 PM EDT
      # gpg:                using RSA key CC621AB98E82200D915CC9C45BC2C56FAE0F321F
      # gpg:                issuer "mark.cave-ayland@ilande.co.uk"
      # gpg: Good signature from "Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>" [full]
      
      * remotes/mcayland/tags/qemu-openbios-20211101:
        roms/openbios: update OpenBIOS images to b9062dea built from submodule
      
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      f79bb385
    • Richard Henderson's avatar
      Merge remote-tracking branch 'remotes/alex.williamson/tags/vfio-update-20211101.0' into staging · 844d6dfc
      Richard Henderson authored
      
      VFIO update 2021-11-01
      
       * Re-enable expanded sub-page BAR mappings after migration (Kunkun Jiang)
      
       * Trace dropped listener sections due to page alignment (Kunkun Jiang)
      
      # gpg: Signature made Mon 01 Nov 2021 03:48:28 PM EDT
      # gpg:                using RSA key 42F6C04E540BD1A99E7B8A90239B9B6E3BB08B22
      # gpg:                issuer "alex.williamson@redhat.com"
      # gpg: Good signature from "Alex Williamson <alex.williamson@redhat.com>" [full]
      # gpg:                 aka "Alex Williamson <alex@shazbot.org>" [full]
      # gpg:                 aka "Alex Williamson <alwillia@redhat.com>" [full]
      # gpg:                 aka "Alex Williamson <alex.l.williamson@gmail.com>" [full]
      
      * remotes/alex.williamson/tags/vfio-update-20211101.0:
        vfio/common: Add a trace point when a MMIO RAM section cannot be mapped
        vfio/pci: Add support for mmapping sub-page MMIO BARs after live migration
      
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      844d6dfc
    • Richard Henderson's avatar
      Merge remote-tracking branch 'remotes/philmd/tags/machine-20211101' into staging · 8cb41fda
      Richard Henderson authored
      
      Machine core patches
      
      - Move GPIO code out of qdev.c
      - Move hotplug code out of qdev.c
      - Restrict various files to sysemu
      - Move SMP code out of machine.c
      - Add SMP parsing unit tests
      - Move dynamic sysbus device check earlier
      
      # gpg: Signature made Mon 01 Nov 2021 02:44:32 PM EDT
      # gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
      # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full]
      
      * remotes/philmd/tags/machine-20211101:
        machine: remove the done notifier for dynamic sysbus device type check
        qdev-monitor: Check sysbus device type before creating it
        machine: add device_type_is_dynamic_sysbus function
        tests/unit: Add an unit test for smp parsing
        hw/core/machine: Split out the smp parsing code
        hw/core: Restrict hotplug to system emulation
        hw/core: Extract hotplug-related functions to qdev-hotplug.c
        hw/core: Declare meson source set
        hw/core: Restrict sysemu specific files
        machine: Move gpio code to hw/core/gpio.c
      
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      8cb41fda
  2. Nov 01, 2021
Loading