Skip to content
Snippets Groups Projects
  1. Jun 26, 2023
  2. Mar 07, 2023
  3. Oct 09, 2022
  4. Sep 15, 2022
  5. 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
  6. Jun 14, 2022
  7. May 26, 2022
  8. Mar 09, 2022
  9. Jan 18, 2022
  10. Nov 02, 2021
  11. Sep 30, 2021
  12. Jul 09, 2021
  13. Jun 08, 2021
  14. Jun 03, 2021
  15. Mar 18, 2021
  16. Oct 06, 2020
  17. Jun 10, 2020
    • Philippe Mathieu-Daudé's avatar
      memory: Make 'info mtree' not display disabled regions by default · 2261d393
      Philippe Mathieu-Daudé authored
      
      We might have many disabled memory regions, making the 'info mtree'
      output too verbose to be useful.
      Remove the disabled regions in the default output, but allow the
      monitor user to display them using the '-D' option.
      
      Before:
      
        (qemu) info mtree
        memory-region: system
          0000000000000000-ffffffffffffffff (prio 0, i/o): system
            0000000000000000-0000000007ffffff (prio 0, ram): alias ram-below-4g @pc.ram 0000000000000000-0000000007ffffff
            0000000000000000-ffffffffffffffff (prio -1, i/o): pci
              00000000000a0000-00000000000bffff (prio 1, i/o): vga-lowmem
              00000000000c0000-00000000000dffff (prio 1, rom): pc.rom
              00000000000e0000-00000000000fffff (prio 1, rom): alias isa-bios @pc.bios 0000000000020000-000000000003ffff
              00000000fffc0000-00000000ffffffff (prio 0, rom): pc.bios
            00000000000a0000-00000000000bffff (prio 1, i/o): alias smram-region @pci 00000000000a0000-00000000000bffff
            00000000000c0000-00000000000c3fff (prio 1, ram): alias pam-ram @pc.ram 00000000000c0000-00000000000c3fff [disabled]
            00000000000c0000-00000000000c3fff (prio 1, ram): alias pam-pci @pc.ram 00000000000c0000-00000000000c3fff [disabled]
            00000000000c0000-00000000000c3fff (prio 1, ram): alias pam-rom @pc.ram 00000000000c0000-00000000000c3fff [disabled]
            00000000000c0000-00000000000c3fff (prio 1, i/o): alias pam-pci @pci 00000000000c0000-00000000000c3fff
            00000000000c4000-00000000000c7fff (prio 1, ram): alias pam-ram @pc.ram 00000000000c4000-00000000000c7fff [disabled]
            00000000000c4000-00000000000c7fff (prio 1, ram): alias pam-pci @pc.ram 00000000000c4000-00000000000c7fff [disabled]
            00000000000c4000-00000000000c7fff (prio 1, ram): alias pam-rom @pc.ram 00000000000c4000-00000000000c7fff [disabled]
            00000000000c4000-00000000000c7fff (prio 1, i/o): alias pam-pci @pci 00000000000c4000-00000000000c7fff
            00000000000c8000-00000000000cbfff (prio 1, ram): alias pam-ram @pc.ram 00000000000c8000-00000000000cbfff [disabled]
            00000000000c8000-00000000000cbfff (prio 1, ram): alias pam-pci @pc.ram 00000000000c8000-00000000000cbfff [disabled]
            00000000000c8000-00000000000cbfff (prio 1, ram): alias pam-rom @pc.ram 00000000000c8000-00000000000cbfff [disabled]
            00000000000c8000-00000000000cbfff (prio 1, i/o): alias pam-pci @pci 00000000000c8000-00000000000cbfff
            00000000000cc000-00000000000cffff (prio 1, ram): alias pam-ram @pc.ram 00000000000cc000-00000000000cffff [disabled]
            00000000000cc000-00000000000cffff (prio 1, ram): alias pam-pci @pc.ram 00000000000cc000-00000000000cffff [disabled]
            00000000000cc000-00000000000cffff (prio 1, ram): alias pam-rom @pc.ram 00000000000cc000-00000000000cffff [disabled]
            00000000000cc000-00000000000cffff (prio 1, i/o): alias pam-pci @pci 00000000000cc000-00000000000cffff
            00000000000d0000-00000000000d3fff (prio 1, ram): alias pam-ram @pc.ram 00000000000d0000-00000000000d3fff [disabled]
            00000000000d0000-00000000000d3fff (prio 1, ram): alias pam-pci @pc.ram 00000000000d0000-00000000000d3fff [disabled]
            00000000000d0000-00000000000d3fff (prio 1, ram): alias pam-rom @pc.ram 00000000000d0000-00000000000d3fff [disabled]
            00000000000d0000-00000000000d3fff (prio 1, i/o): alias pam-pci @pci 00000000000d0000-00000000000d3fff
            00000000000d4000-00000000000d7fff (prio 1, ram): alias pam-ram @pc.ram 00000000000d4000-00000000000d7fff [disabled]
            00000000000d4000-00000000000d7fff (prio 1, ram): alias pam-pci @pc.ram 00000000000d4000-00000000000d7fff [disabled]
            00000000000d4000-00000000000d7fff (prio 1, ram): alias pam-rom @pc.ram 00000000000d4000-00000000000d7fff [disabled]
            00000000000d4000-00000000000d7fff (prio 1, i/o): alias pam-pci @pci 00000000000d4000-00000000000d7fff
            00000000000d8000-00000000000dbfff (prio 1, ram): alias pam-ram @pc.ram 00000000000d8000-00000000000dbfff [disabled]
            00000000000d8000-00000000000dbfff (prio 1, ram): alias pam-pci @pc.ram 00000000000d8000-00000000000dbfff [disabled]
            00000000000d8000-00000000000dbfff (prio 1, ram): alias pam-rom @pc.ram 00000000000d8000-00000000000dbfff [disabled]
            00000000000d8000-00000000000dbfff (prio 1, i/o): alias pam-pci @pci 00000000000d8000-00000000000dbfff
            00000000000dc000-00000000000dffff (prio 1, ram): alias pam-ram @pc.ram 00000000000dc000-00000000000dffff [disabled]
            00000000000dc000-00000000000dffff (prio 1, ram): alias pam-pci @pc.ram 00000000000dc000-00000000000dffff [disabled]
            00000000000dc000-00000000000dffff (prio 1, ram): alias pam-rom @pc.ram 00000000000dc000-00000000000dffff [disabled]
            00000000000dc000-00000000000dffff (prio 1, i/o): alias pam-pci @pci 00000000000dc000-00000000000dffff
            00000000000e0000-00000000000e3fff (prio 1, ram): alias pam-ram @pc.ram 00000000000e0000-00000000000e3fff [disabled]
            00000000000e0000-00000000000e3fff (prio 1, ram): alias pam-pci @pc.ram 00000000000e0000-00000000000e3fff [disabled]
            00000000000e0000-00000000000e3fff (prio 1, ram): alias pam-rom @pc.ram 00000000000e0000-00000000000e3fff [disabled]
            00000000000e0000-00000000000e3fff (prio 1, i/o): alias pam-pci @pci 00000000000e0000-00000000000e3fff
            00000000000e4000-00000000000e7fff (prio 1, ram): alias pam-ram @pc.ram 00000000000e4000-00000000000e7fff [disabled]
            00000000000e4000-00000000000e7fff (prio 1, ram): alias pam-pci @pc.ram 00000000000e4000-00000000000e7fff [disabled]
            00000000000e4000-00000000000e7fff (prio 1, ram): alias pam-rom @pc.ram 00000000000e4000-00000000000e7fff [disabled]
            00000000000e4000-00000000000e7fff (prio 1, i/o): alias pam-pci @pci 00000000000e4000-00000000000e7fff
            00000000000e8000-00000000000ebfff (prio 1, ram): alias pam-ram @pc.ram 00000000000e8000-00000000000ebfff [disabled]
            00000000000e8000-00000000000ebfff (prio 1, ram): alias pam-pci @pc.ram 00000000000e8000-00000000000ebfff [disabled]
            00000000000e8000-00000000000ebfff (prio 1, ram): alias pam-rom @pc.ram 00000000000e8000-00000000000ebfff [disabled]
            00000000000e8000-00000000000ebfff (prio 1, i/o): alias pam-pci @pci 00000000000e8000-00000000000ebfff
            00000000000ec000-00000000000effff (prio 1, ram): alias pam-ram @pc.ram 00000000000ec000-00000000000effff [disabled]
            00000000000ec000-00000000000effff (prio 1, ram): alias pam-pci @pc.ram 00000000000ec000-00000000000effff [disabled]
            00000000000ec000-00000000000effff (prio 1, ram): alias pam-rom @pc.ram 00000000000ec000-00000000000effff [disabled]
            00000000000ec000-00000000000effff (prio 1, i/o): alias pam-pci @pci 00000000000ec000-00000000000effff
            00000000000f0000-00000000000fffff (prio 1, ram): alias pam-ram @pc.ram 00000000000f0000-00000000000fffff [disabled]
            00000000000f0000-00000000000fffff (prio 1, ram): alias pam-pci @pc.ram 00000000000f0000-00000000000fffff [disabled]
            00000000000f0000-00000000000fffff (prio 1, ram): alias pam-rom @pc.ram 00000000000f0000-00000000000fffff [disabled]
            00000000000f0000-00000000000fffff (prio 1, i/o): alias pam-pci @pci 00000000000f0000-00000000000fffff
            00000000fec00000-00000000fec00fff (prio 0, i/o): ioapic
            00000000fed00000-00000000fed003ff (prio 0, i/o): hpet
            00000000fee00000-00000000feefffff (prio 4096, i/o): apic-msi
      
      After:
      
        (qemu) info mtree
        memory-region: system
          0000000000000000-ffffffffffffffff (prio 0, i/o): system
            0000000000000000-0000000007ffffff (prio 0, ram): alias ram-below-4g @pc.ram 0000000000000000-0000000007ffffff
            0000000000000000-ffffffffffffffff (prio -1, i/o): pci
              00000000000a0000-00000000000bffff (prio 1, i/o): vga-lowmem
              00000000000c0000-00000000000dffff (prio 1, rom): pc.rom
              00000000000e0000-00000000000fffff (prio 1, rom): alias isa-bios @pc.bios 0000000000020000-000000000003ffff
              00000000fffc0000-00000000ffffffff (prio 0, rom): pc.bios
            00000000000a0000-00000000000bffff (prio 1, i/o): alias smram-region @pci 00000000000a0000-00000000000bffff
            00000000000c0000-00000000000c3fff (prio 1, i/o): alias pam-pci @pci 00000000000c0000-00000000000c3fff
            00000000000c4000-00000000000c7fff (prio 1, i/o): alias pam-pci @pci 00000000000c4000-00000000000c7fff
            00000000000c8000-00000000000cbfff (prio 1, i/o): alias pam-pci @pci 00000000000c8000-00000000000cbfff
            00000000000cc000-00000000000cffff (prio 1, i/o): alias pam-pci @pci 00000000000cc000-00000000000cffff
            00000000000d0000-00000000000d3fff (prio 1, i/o): alias pam-pci @pci 00000000000d0000-00000000000d3fff
            00000000000d4000-00000000000d7fff (prio 1, i/o): alias pam-pci @pci 00000000000d4000-00000000000d7fff
            00000000000d8000-00000000000dbfff (prio 1, i/o): alias pam-pci @pci 00000000000d8000-00000000000dbfff
            00000000000dc000-00000000000dffff (prio 1, i/o): alias pam-pci @pci 00000000000dc000-00000000000dffff
            00000000000e0000-00000000000e3fff (prio 1, i/o): alias pam-pci @pci 00000000000e0000-00000000000e3fff
            00000000000e4000-00000000000e7fff (prio 1, i/o): alias pam-pci @pci 00000000000e4000-00000000000e7fff
            00000000000e8000-00000000000ebfff (prio 1, i/o): alias pam-pci @pci 00000000000e8000-00000000000ebfff
            00000000000ec000-00000000000effff (prio 1, i/o): alias pam-pci @pci 00000000000ec000-00000000000effff
            00000000000f0000-00000000000fffff (prio 1, i/o): alias pam-pci @pci 00000000000f0000-00000000000fffff
            00000000fec00000-00000000fec00fff (prio 0, i/o): ioapic
            00000000fed00000-00000000fed003ff (prio 0, i/o): hpet
            00000000fee00000-00000000feefffff (prio 4096, i/o): apic-msi
      
      The old behavior is preserved using 'info mtree -D'.
      
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      2261d393
  18. Mar 12, 2020
  19. Mar 06, 2020
  20. Sep 17, 2019
  21. Mar 16, 2019
  22. Aug 23, 2018
    • Emilio G. Cota's avatar
      hmp-commands-info: add sync-profile · 97bfafe2
      Emilio G. Cota authored
      
      The command introduced here is just for developers. This means that:
      
      - the info displayed and the output format could change in the future
      - the command is only meant to be used from HMP, not from QMP
      
      Sample output:
      
      (qemu) sync-profile
      sync-profile is off
      (qemu) info sync-profile
      Type               Object  Call site  Wait Time (s)         Count  Average (us)
      -------------------------------------------------------------------------------
      -------------------------------------------------------------------------------
      (qemu) sync-profile on
      (qemu) sync-profile
      sync-profile is on
      (qemu) info sync-profile 15
      Type               Object  Call site                 Wait Time (s)         Count  Average (us)
      ----------------------------------------------------------------------------------------------
      condvar    0x55a01813ced0  cpus.c:1165                    91.38235          2842      32154.24
      BQL mutex  0x55a0171b7140  cpus.c:1434                    12.56490          5787       2171.23
      BQL mutex  0x55a0171b7140  accel/tcg/cpu-exec.c:432        7.75846          2844       2728.01
      BQL mutex  0x55a0171b7140  accel/tcg/cputlb.c:870          5.09889          2884       1767.99
      BQL mutex  0x55a0171b7140  accel/tcg/cpu-exec.c:529        3.46140          3254       1063.74
      BQL mutex  0x55a0171b7140  accel/tcg/cputlb.c:804          0.76333          8655         88.20
      BQL mutex  0x55a0171b7140  cpus.c:1466                     0.60893          2941        207.05
      BQL mutex  0x55a0171b7140  util/main-loop.c:236            0.00894          6425          1.39
      mutex      [           3]  util/qemu-timer.c:520           0.00342         50611          0.07
      mutex      [           2]  util/qemu-timer.c:426           0.00254         31336          0.08
      mutex      [           3]  util/qemu-timer.c:234           0.00107         19275          0.06
      mutex      0x55a0171d9960  vl.c:763                        0.00043          6425          0.07
      mutex      0x55a0180d1bb0  monitor.c:458                   0.00015          1603          0.09
      mutex      0x55a0180e4c78  chardev/char.c:109              0.00002           217          0.08
      mutex      0x55a0180d1bb0  monitor.c:448                   0.00001           162          0.08
      ----------------------------------------------------------------------------------------------
      (qemu) info sync-profile -m 15
      Type               Object  Call site                 Wait Time (s)         Count  Average (us)
      ----------------------------------------------------------------------------------------------
      condvar    0x55a01813ced0  cpus.c:1165                    95.11196          3051      31174.03
      BQL mutex  0x55a0171b7140  accel/tcg/cpu-exec.c:432        7.92108          3052       2595.37
      BQL mutex  0x55a0171b7140  cpus.c:1434                    13.38253          6210       2155.00
      BQL mutex  0x55a0171b7140  accel/tcg/cputlb.c:870          5.09901          3093       1648.57
      BQL mutex  0x55a0171b7140  accel/tcg/cpu-exec.c:529        4.21123          3468       1214.31
      BQL mutex  0x55a0171b7140  cpus.c:1466                     0.60895          3156        192.95
      BQL mutex  0x55a0171b7140  accel/tcg/cputlb.c:804          0.76337          9282         82.24
      BQL mutex  0x55a0171b7140  util/main-loop.c:236            0.00944          6889          1.37
      mutex      0x55a01813ce80  tcg/tcg.c:397                   0.00000            24          0.15
      mutex      0x55a0180d1bb0  monitor.c:458                   0.00018          1922          0.09
      mutex      [           2]  util/qemu-timer.c:426           0.00266         32710          0.08
      mutex      0x55a0180e4c78  chardev/char.c:109              0.00002           260          0.08
      mutex      0x55a0180d1bb0  monitor.c:448                   0.00001           187          0.08
      mutex      0x55a0171d9960  vl.c:763                        0.00047          6889          0.07
      mutex      [           3]  util/qemu-timer.c:520           0.00362         53377          0.07
      ----------------------------------------------------------------------------------------------
      (qemu) info sync-profile -m -n 15
      Type               Object  Call site                 Wait Time (s)         Count  Average (us)
      ----------------------------------------------------------------------------------------------
      condvar    0x55a01813ced0  cpus.c:1165                   101.39331          3398      29839.12
      BQL mutex  0x55a0171b7140  accel/tcg/cpu-exec.c:432        7.92112          3399       2330.43
      BQL mutex  0x55a0171b7140  cpus.c:1434                    14.28280          6922       2063.39
      BQL mutex  0x55a0171b7140  accel/tcg/cputlb.c:870          5.77505          3445       1676.36
      BQL mutex  0x55a0171b7140  accel/tcg/cpu-exec.c:529        5.66139          3883       1457.99
      BQL mutex  0x55a0171b7140  cpus.c:1466                     0.60901          3519        173.06
      BQL mutex  0x55a0171b7140  accel/tcg/cputlb.c:804          0.76351         10338         73.85
      BQL mutex  0x55a0171b7140  util/main-loop.c:236            0.01032          7664          1.35
      mutex      0x55a0180e4f08  util/qemu-timer.c:426           0.00041           901          0.45
      mutex      0x55a01813ce80  tcg/tcg.c:397                   0.00000            24          0.15
      mutex      0x55a0180d1bb0  monitor.c:458                   0.00022          2319          0.09
      mutex      0x55a0180e4c78  chardev/char.c:109              0.00003           306          0.08
      mutex      0x55a0180e4f08  util/qemu-timer.c:520           0.00068          8565          0.08
      mutex      0x55a0180d1bb0  monitor.c:448                   0.00002           215          0.08
      mutex      0x55a0180e4f78  util/qemu-timer.c:426           0.00247         34224          0.07
      ----------------------------------------------------------------------------------------------
      (qemu) sync-profile reset
      (qemu) info sync-profile -m 2
      Type               Object  Call site               Wait Time (s)         Count  Average (us)
      --------------------------------------------------------------------------------------------
      condvar    0x55a01813ced0  cpus.c:1165                   2.78756            99      28157.12
      BQL mutex  0x55a0171b7140  accel/tcg/cputlb.c:870        0.33054           102       3240.55
      --------------------------------------------------------------------------------------------
      (qemu) sync-profile off
      (qemu) sync-profile
      sync-profile is off
      (qemu) sync-profile reset
      (qemu) info sync-profile
      Type               Object  Call site  Wait Time (s)         Count  Average (us)
      -------------------------------------------------------------------------------
      -------------------------------------------------------------------------------
      
      Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: default avatarEmilio G. Cota <cota@braap.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      97bfafe2
  23. Jul 03, 2018
    • Marc-André Lureau's avatar
      qapi: add conditions to VNC type/commands/events on the schema · 05eb4a25
      Marc-André Lureau authored
      
      Add #if defined(CONFIG_VNC) in generated code, and adjust the
      qmp/hmp code accordingly.
      
      query-qmp-schema no longer reports the command/events etc as
      available when disabled at compile.
      
      Commands made conditional:
      
      * query-vnc, query-vnc-servers, change-vnc-password
      
        Before the patch, the commands for !CONFIG_VNC are stubs that fail
        like this:
      
          {"error": {"class": "GenericError",
                     "desc": "The feature 'vnc' is not enabled"}}
      
        Afterwards, they fail like this:
      
          {"error": {"class": "CommandNotFound",
                     "desc": "The command FOO has not been found"}}
      
        I call that an improvement, because it lets clients distinguish
        between command unavailable (class CommandNotFound) and command failed
        (class GenericError).
      
      Events made conditional:
      
      * VNC_CONNECTED, VNC_INITIALIZED, VNC_DISCONNECTED
      
      HMP change:
      
      * info vnc
      
        Will return "unknown command: 'info vnc'" when VNC is compiled
        out (same as error for spice when --disable-spice)
      
      Occurrences of VNC (case insensitive) in the schema that aren't
      covered by this change:
      
      * add_client
      
        Command has other uses, including "socket bases character devices".
        These are unconditional as far as I can tell.
      
      * set_password, expire_password
      
        In theory, these commands could be used for managing any service's
        password.  In practice, they're used for VNC and SPICE services.
        They're documented for "remote display session" / "remote display
        server".
      
        The service is selected by argument @protocol.  The code special-cases
        protocol-specific argument checking, then calls a protocol-specific
        function to do the work.  If it fails, the command fails with "Could
        not set password".  It does when the service isn't compiled in (it's a
        stub then).
      
        We could make these commands conditional on the conjunction of all
        services [currently: defined(CONFIG_VNC) || defined(CONFIG_SPICE)],
        but I doubt it's worthwhile.
      
      * change
      
        Command has other uses, namely changing media.
        This patch inlines a stub; no functional change.
      
      Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180703155648.11933-14-marcandre.lureau@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      05eb4a25
  24. Jun 28, 2018
  25. Jun 21, 2018
  26. Mar 13, 2018
  27. Jan 25, 2018
  28. Oct 05, 2017
Loading