1. 22 6月, 2015 6 次提交
  2. 15 6月, 2015 1 次提交
  3. 12 6月, 2015 1 次提交
    • S
      qmp/hmp: add rocker device support · fafa4d50
      Scott Feldman 提交于
      Add QMP/HMP support for rocker devices.  This is mostly for debugging purposes
      to see inside the device's tables and port configurations.  Some examples:
      
      (qemu) info rocker sw1
      name: sw1
      id: 0x0000013512005452
      ports: 4
      
      (qemu) info rocker-ports sw1
                  ena/    speed/ auto
            port  link    duplex neg?
           sw1.1  up     10G  FD  No
           sw1.2  up     10G  FD  No
           sw1.3  !ena   10G  FD  No
           sw1.4  !ena   10G  FD  No
      
      (qemu) info rocker-of-dpa-flows sw1
      prio tbl hits key(mask) --> actions
      2    60       pport 1 vlan 1 LLDP src 00:02:00:00:02:00 dst 01:80:c2:00:00:0e
      2    60       pport 1 vlan 1 ARP src 00:02:00:00:02:00 dst 00:02:00:00:03:00
      2    60       pport 2 vlan 2 IPv6 src 00:02:00:00:03:00 dst 33:33:ff:00:00:02 proto 58
      3    50       vlan 2 dst 33:33:ff:00:00:02 --> write group 0x32000001 goto tbl 60
      2    60       pport 2 vlan 2 IPv6 src 00:02:00:00:03:00 dst 33:33:ff:00:03:00 proto 58
      3    50  1    vlan 2 dst 33:33:ff:00:03:00 --> write group 0x32000001 goto tbl 60
      2    60       pport 2 vlan 2 ARP src 00:02:00:00:03:00 dst 00:02:00:00:02:00
      3    50  2    vlan 2 dst 00:02:00:00:02:00 --> write group 0x02000001 goto tbl 60
      2    60  1    pport 2 vlan 2 IP src 00:02:00:00:03:00 dst 00:02:00:00:02:00 proto 1
      3    50  2    vlan 1 dst 00:02:00:00:03:00 --> write group 0x01000002 goto tbl 60
      2    60  1    pport 1 vlan 1 IP src 00:02:00:00:02:00 dst 00:02:00:00:03:00 proto 1
      2    60       pport 1 vlan 1 IPv6 src 00:02:00:00:02:00 dst 33:33:ff:00:00:01 proto 58
      3    50       vlan 1 dst 33:33:ff:00:00:01 --> write group 0x31000000 goto tbl 60
      2    60       pport 1 vlan 1 IPv6 src 00:02:00:00:02:00 dst 33:33:ff:00:02:00 proto 58
      3    50  1    vlan 1 dst 33:33:ff:00:02:00 --> write group 0x31000000 goto tbl 60
      1    60  173  pport 2 vlan 2 LLDP src <any> dst 01:80:c2:00:00:0e --> write group 0x02000000
      1    60  6    pport 2 vlan 2 IPv6 src <any> dst <any> --> write group 0x02000000
      1    60  174  pport 1 vlan 1 LLDP src <any> dst 01:80:c2:00:00:0e --> write group 0x01000000
      1    60  174  pport 2 vlan 2 IP src <any> dst <any> --> write group 0x02000000
      1    60  6    pport 1 vlan 1 IPv6 src <any> dst <any> --> write group 0x01000000
      1    60  181  pport 2 vlan 2 ARP src <any> dst <any> --> write group 0x02000000
      1    10  715  pport 2 --> apply new vlan 2 goto tbl 20
      1    60  177  pport 1 vlan 1 ARP src <any> dst <any> --> write group 0x01000000
      1    60  174  pport 1 vlan 1 IP src <any> dst <any> --> write group 0x01000000
      1    10  717  pport 1 --> apply new vlan 1 goto tbl 20
      1    0   1432 pport 0(0xffff) --> goto tbl 10
      
      (qemu) info rocker-of-dpa-groups sw1
      id (decode) --> buckets
      0x32000001 (type L2 multicast vlan 2 index 1) --> groups [0x02000001,0x02000000]
      0x02000001 (type L2 interface vlan 2 pport 1) --> pop vlan out pport 1
      0x01000002 (type L2 interface vlan 1 pport 2) --> pop vlan out pport 2
      0x02000000 (type L2 interface vlan 2 pport 0) --> pop vlan out pport 0
      0x01000000 (type L2 interface vlan 1 pport 0) --> pop vlan out pport 0
      0x31000000 (type L2 multicast vlan 1 index 0) --> groups [0x01000002,0x01000000]
      
      [Added "query-" prefixes to rocker.json commands as suggested by Eric
      Blake <eblake@redhat.com>.
      --Stefan]
      Signed-off-by: NScott Feldman <sfeldma@gmail.com>
      Signed-off-by: NJiri Pirko <jiri@resnulli.us>
      Message-id: 1433985681-56138-5-git-send-email-sfeldma@gmail.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      fafa4d50
  4. 08 6月, 2015 1 次提交
  5. 02 6月, 2015 19 次提交
  6. 08 5月, 2015 1 次提交
  7. 30 4月, 2015 1 次提交
  8. 28 4月, 2015 2 次提交
  9. 27 4月, 2015 1 次提交
    • M
      monitor: Make client_migrate_info synchronous · 3b5704b2
      Markus Armbruster 提交于
      Live migration with spice works like this today:
      
        (1) client_migrate_info monitor cmd
        (2) spice server notifies client, client connects to target host.
        (3) qemu waits until spice client connect is finished.
        (4) send over vmstate (i.e. main part of live migration).
        (5) spice handover to target host.
      
      (3) is implemented by making client_migrate_info a async monitor
      command.  This is the only async monitor command we have.
      
      The original reason to implement this dance was that qemu did not accept
      new tcp connections while the incoming migration was running, so (2) and
      (4) could not be done in parallel.  That issue was fixed long ago though.
      Qemu version 1.3.0 (released Dec 2012) and newer happily accept tcp
      connects while the incoming migration runs.
      
      Time to drop step (3).  This patch does exactly that, by making the
      monitor command synchronous and removing the code needed to handle the
      async monitor command in ui/spice-core.c
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      3b5704b2
  10. 26 4月, 2015 1 次提交
    • P
      Switch non-CPU callers from ld/st*_phys to address_space_ld/st* · 42874d3a
      Peter Maydell 提交于
      Switch all the uses of ld/st*_phys to address_space_ld/st*,
      except for those cases where the address space is the CPU's
      (ie cs->as). This was done with the following script which
      generates a Coccinelle patch.
      
      A few over-80-columns lines in the result were rewrapped by
      hand where Coccinelle failed to do the wrapping automatically,
      as well as one location where it didn't put a line-continuation
      '\' when wrapping lines on a change made to a match inside
      a macro definition.
      
      ===begin===
      #!/bin/sh -e
      # Usage:
      # ./ldst-phys.spatch.sh > ldst-phys.spatch
      # spatch -sp_file ldst-phys.spatch -dir . | sed -e '/^+/s/\t/        /g' > out.patch
      # patch -p1 < out.patch
      
      for FN in ub uw_le uw_be l_le l_be q_le q_be uw l q; do
      cat <<EOF
      @ cpu_matches_ld_${FN} @
      expression E1,E2;
      identifier as;
      @@
      
      ld${FN}_phys(E1->as,E2)
      
      @ other_matches_ld_${FN} depends on !cpu_matches_ld_${FN} @
      expression E1,E2;
      @@
      
      -ld${FN}_phys(E1,E2)
      +address_space_ld${FN}(E1,E2, MEMTXATTRS_UNSPECIFIED, NULL)
      
      EOF
      
      done
      
      for FN in b w_le w_be l_le l_be q_le q_be w l q; do
      cat <<EOF
      @ cpu_matches_st_${FN} @
      expression E1,E2,E3;
      identifier as;
      @@
      
      st${FN}_phys(E1->as,E2,E3)
      
      @ other_matches_st_${FN} depends on !cpu_matches_st_${FN} @
      expression E1,E2,E3;
      @@
      
      -st${FN}_phys(E1,E2,E3)
      +address_space_st${FN}(E1,E2,E3, MEMTXATTRS_UNSPECIFIED, NULL)
      
      EOF
      
      done
      ===endit===
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      42874d3a
  11. 25 4月, 2015 1 次提交
    • E
      qmp: Give saner messages related to qmp_capabilities misuse · 2d5a8346
      Eric Blake 提交于
      Pretending that QMP doesn't understand a command merely because
      we are not in the right mode doesn't help first-time users figure
      out what to do to correct things.  Although the documentation for
      QMP calls out capabilities negotiation, we should also make it
      clear in our error messages what we were expecting.  With this
      patch, I now get the following transcript:
      
      $ ./x86_64-softmmu/qemu-system-x86_64 -qmp stdio -nodefaults
      {"QMP": {"version": {"qemu": {"micro": 93, "minor": 2, "major": 2}, "package": ""}, "capabilities": []}}
      {"execute":"huh"}
      {"error": {"class": "CommandNotFound", "desc": "The command huh has not been found"}}
      {"execute":"quit"}
      {"error": {"class": "CommandNotFound", "desc": "Expecting capabilities negotiation with 'qmp_capabilities' before command 'quit'"}}
      {"execute":"qmp_capabilities"}
      {"return": {}}
      {"execute":"qmp_capabilities"}
      {"error": {"class": "CommandNotFound", "desc": "Capabilities negotiation is already complete, command 'qmp_capabilities' ignored"}}
      {"execute":"quit"}
      {"return": {}}
      {"timestamp": {"seconds": 1429110729, "microseconds": 181935}, "event": "SHUTDOWN"}
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Tested-By: NKashyap Chamarthy <kchamart@redhat.com>
      Reviewed-by: NPaulo Vital <paulo.vital@profitbricks.com>
      Reviewed-by: NJohn Snow <jsnow@redhat.com>
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      2d5a8346
  12. 19 3月, 2015 1 次提交
    • S
      Fix remaining warnings from Sparse (void return) · e7ae771f
      Stefan Weil 提交于
      Sparse report:
      
      hw/display/vga.c:2000:5: warning: returning void-valued expression
      hw/intc/arm_gic.c:707:9: warning: returning void-valued expression
      hw/intc/etraxfs_pic.c:138:9: warning: returning void-valued expression
      hw/nvram/fw_cfg.c:475:5: warning: returning void-valued expression
      hw/timer/a9gtimer.c:124:5: warning: returning void-valued expression
      hw/tpm/tpm_tis.c:794:5: warning: returning void-valued expression
      hw/usb/hcd-musb.c:558:9: warning: returning void-valued expression
      hw/usb/hcd-musb.c:776:13: warning: returning void-valued expression
      hw/usb/hcd-musb.c:867:5: warning: returning void-valued expression
      hw/usb/hcd-musb.c:932:5: warning: returning void-valued expression
      include/qom/cpu.h:584:5: warning: returning void-valued expression
      monitor.c:4686:13: warning: returning void-valued expression
      monitor.c:4690:13: warning: returning void-valued expression
      
      Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Andreas Färber <afaerber@suse.de>
      Cc: Luiz Capitulino <lcapitulino@redhat.com>
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      e7ae771f
  13. 18 3月, 2015 1 次提交
    • A
      profiler: Reenable built-in profiler · 89d5cbdd
      Alexey Kardashevskiy 提交于
      2ed1ebcf "timer: replace time() with QEMU_CLOCK_HOST" broke compile
      when configured with --enable-profiler. Turned out the profiler has been
      broken for a while.
      
      This does s/qemu_time/tcg_time/ as the profiler only works in a TCG mode.
      This also fixes the compile error.
      
      This changes profile_getclock() to return nanoseconds rather than
      CPU ticks as the "profile" HMP command prints seconds and there is no
      platform-independent way to get ticks-per-second rate.
      Since TCG is quite slow and get_clock() returns nanoseconds (fine
      enough), this should not affect precision much.
      
      This removes unused qemu_time_start and tlb_flush_time.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Message-Id: <1426478258-29961-1-git-send-email-aik@ozlabs.ru>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      89d5cbdd
  14. 17 3月, 2015 3 次提交