Skip to content
Snippets Groups Projects
  1. Nov 02, 2021
  2. Sep 30, 2021
  3. Jul 09, 2021
  4. Jun 08, 2021
  5. Jun 03, 2021
  6. Mar 18, 2021
  7. Oct 06, 2020
  8. 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
  9. Mar 12, 2020
  10. Mar 06, 2020
  11. Sep 17, 2019
  12. Mar 16, 2019
  13. 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
  14. 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
  15. Jun 28, 2018
  16. Jun 21, 2018
  17. Mar 13, 2018
  18. Jan 25, 2018
  19. Oct 05, 2017
  20. Sep 21, 2017
  21. Sep 14, 2017
  22. Sep 01, 2017
  23. Jul 14, 2017
  24. Jul 04, 2017
  25. Jun 29, 2017
  26. May 17, 2017
    • Peter Xu's avatar
      ramblock: add new hmp command "info ramblock" · be9b23c4
      Peter Xu authored
      
      To dump information about ramblocks. It looks like:
      
      (qemu) info ramblock
                    Block Name    PSize              Offset               Used              Total
                  /objects/mem    2 MiB  0x0000000000000000 0x0000000080000000 0x0000000080000000
                      vga.vram    4 KiB  0x0000000080060000 0x0000000001000000 0x0000000001000000
          /rom@etc/acpi/tables    4 KiB  0x00000000810b0000 0x0000000000020000 0x0000000000200000
                       pc.bios    4 KiB  0x0000000080000000 0x0000000000040000 0x0000000000040000
        0000:00:03.0/e1000.rom    4 KiB  0x0000000081070000 0x0000000000040000 0x0000000000040000
                        pc.rom    4 KiB  0x0000000080040000 0x0000000000020000 0x0000000000020000
          0000:00:02.0/vga.rom    4 KiB  0x0000000081060000 0x0000000000010000 0x0000000000010000
         /rom@etc/table-loader    4 KiB  0x00000000812b0000 0x0000000000001000 0x0000000000001000
            /rom@etc/acpi/rsdp    4 KiB  0x00000000812b1000 0x0000000000001000 0x0000000000001000
      
      Ramblock is something hidden internally in QEMU implementation, and this
      command should only be used by mostly QEMU developers on RAM stuff. It
      is not a command suitable for QMP interface. So only HMP interface is
      provided for it.
      
      Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
      Message-Id: <1494562661-9063-4-git-send-email-peterx@redhat.com>
      Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      be9b23c4
  27. Mar 02, 2017
  28. Jan 27, 2017
Loading