1. 04 7月, 2018 10 次提交
    • M
      qmp: Redo how the client requests out-of-band execution · 00ecec15
      Markus Armbruster 提交于
      Commit cf869d53 "qmp: support out-of-band (oob) execution" added a
      general mechanism for command-independent arguments just for an
      out-of-band flag:
      
          The "control" key is introduced to store this extra flag.  "control"
          field is used to store arguments that are shared by all the commands,
          rather than command specific arguments.  Let "run-oob" be the first.
      
      However, it failed to reject unknown members of "control".  For
      instance, in QMP command
      
          {"execute": "query-name", "id": 42, "control": {"crap": true}}
      
      "crap" gets silently ignored.
      
      Instead of fixing this, revert the general "control" mechanism
      (because YAGNI), and do it the way I initially proposed, with key
      "exec-oob".  Simpler code, simpler interface.
      
      An out-of-band command
      
          {"execute": "migrate-pause", "id": 42, "control": {"run-oob": true}}
      
      becomes
      
          {"exec-oob": "migrate-pause", "id": 42}
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20180703085358.13941-13-armbru@redhat.com>
      [Commit message typo fixed]
      00ecec15
    • M
      qmp qemu-ga: Fix qemu-ga not to accept "control" · 674ed722
      Markus Armbruster 提交于
      Commit cf869d53 "qmp: support out-of-band (oob) execution"
      accidentally made qemu-ga accept and ignore "control".  Fix that.
      
      Out-of-band execution in a monitor that doesn't support it now fails
      with
      
          {"error": {"class": "GenericError", "desc": "QMP input member 'control' is unexpected"}}
      
      instead of
      
          {"error": {"class": "GenericError", "desc": "Please enable out-of-band first for the session during capabilities negotiation"}}
      
      The old description is suboptimal when out-of-band cannot not be
      enabled, or the command doesn't support out-of-band execution.
      
      The new description is a bit unspecific, but it'll do.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20180703085358.13941-12-armbru@redhat.com>
      674ed722
    • M
      tests/test-qga: Demonstrate the guest-agent ignores "control" · d4d7ed73
      Markus Armbruster 提交于
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20180703085358.13941-11-armbru@redhat.com>
      d4d7ed73
    • M
      qmp qemu-ga: Revert change that accidentally made qemu-ga accept "id" · 0fa39d0b
      Markus Armbruster 提交于
      Commit cf869d53 "qmp: support out-of-band (oob) execution" changed
      how we check "id":
      
          Note that in the patch I exported qmp_dispatch_check_obj() to be
          used to check the request earlier, and at the same time allowed
          "id" field to be there since actually we always allow that.
      
      The part after "and" is ill-advised: it makes qemu-ga accept and
      ignore "id".  Revert.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20180703085358.13941-10-armbru@redhat.com>
      0fa39d0b
    • M
      tests/test-qga: Demonstrate the guest-agent ignores "id" · b5f84310
      Markus Armbruster 提交于
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20180703085358.13941-9-armbru@redhat.com>
      b5f84310
    • M
      qmp: Make "id" optional again even in "oob" monitors · 80cd93bd
      Markus Armbruster 提交于
      Commit cf869d53 "qmp: support out-of-band (oob) execution" made
      "id" mandatory for all commands when the client accepted capability
      "oob".  This is rather onerous when you play with QMP by hand, and
      unnecessarily so: only out-of-band commands need an ID for reliable
      matching of response to command.
      
      Revert that part of commit cf869d53 for now, but have documentation
      advise on the need to use "id" with out-of-band commands.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180703085358.13941-8-armbru@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      80cd93bd
    • M
      tests/qmp-test: Test in-band command doesn't overtake · 2970b446
      Markus Armbruster 提交于
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20180703085358.13941-7-armbru@redhat.com>
      2970b446
    • M
      qmp: Get rid of x-oob-test command · 97ca0712
      Markus Armbruster 提交于
      tests/qmp-test tests an out-of-band command overtaking a slow in-band
      command.  To do that, it needs:
      
      1. An in-band command that *reliably* takes long enough to be
         overtaken.
      
      2. An out-of-band command to do the overtaking.
      
      3. To avoid delays, a way to make the in-band command complete quickly
         after it was overtaken.
      
      To satisfy these needs, commit 469638f9 provides the rather
      peculiar oob-capable QMP command x-oob-test:
      
      * With "lock": true, it waits for a global semaphore.
      
      * With "lock": false, it signals the global semaphore.
      
      To satisfy 1., the test runs x-oob-test in-band with "lock": true.
      To satisfy 2. and 3., it runs x-oob-test out-of-band with "lock": false.
      
      Note that waiting for a semaphore violates the rules for oob-capable
      commands.  Running x-oob-test with "lock": true hangs the monitor
      until you run x-oob-test with "lock": false on another monitor (which
      you might not have set up).
      
      Having an externally visible QMP command that may hang the monitor is
      not nice.  Let's apply a little more ingenuity to the problem.  Idea:
      have an existing command block on reading a FIFO special file, unblock
      it by opening the FIFO for writing.
      
      For 1., use
      
          {"execute": "blockdev-add",  "id": ID1,
           "arguments": {
              "driver": "blkdebug", "node-name": ID1, "config": FIFO,
              "image": { "driver": "null-co"}}}
      
      where ID1 is an arbitrary string, and FIFO is the name of the FIFO.
      
      For 2., use
      
          {"execute": "migrate-pause", "id": ID2, "control": {"run-oob": true}}
      
      where ID2 is a different arbitrary string.  Since there's no migration
      to pause, the command will fail, but that's fine; instant failure is
      still a test of out-of-band responses overtaking in-band commands.
      
      For 3., open FIFO for writing.
      
      Drop QMP command x-oob-test.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20180703085358.13941-6-armbru@redhat.com>
      [Error checking tweaked]
      97ca0712
    • M
      qmp: Document COMMAND_DROPPED design flaw · d621cfe0
      Markus Armbruster 提交于
      Events are broadcast to all monitors.  If another monitor's client has
      a command with the same ID in flight, the event will incorrectly claim
      that command was dropped.  This must be fixed before out-of-band
      execution can graduate from "experimental".
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20180703085358.13941-5-armbru@redhat.com>
      d621cfe0
    • M
      docs/interop/qmp: Improve OOB documentation · 71696cc6
      Markus Armbruster 提交于
      OOB documentation is spread over qmp-spec.txt sections 2.2.1
      Capabilities and 2.3 Issuing Commands.  The amount of detail is a bit
      distracting there.  Move the meat of the matter to new section 2.3.1
      Out of band execution.
      
      Throw in a few other improvements while there:
      
      * 2.2 Server Greeting: Drop advice to search entire capabilities
        array; should be obvious.
      
      * 3. QMP Examples
      
        - 3.1 Server Greeting: Update greeting to the one we expect for the
          release.  Now shows capability "oob".  Update qmp-intro.txt
          likewise.
      
        - 3.2 Capabilities negotiation: Show client accepting capability
          "oob".
      
        - 3.7 Out-of-band execution: New.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20180703085358.13941-4-armbru@redhat.com>
      [Whitespace tidied up]
      71696cc6
  2. 03 7月, 2018 5 次提交
    • M
      monitor: Spell "I/O thread" consistently in comments · c5f57ed0
      Markus Armbruster 提交于
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20180703085358.13941-3-armbru@redhat.com>
      c5f57ed0
    • M
      qmp: Say "out-of-band" instead of "Out-Of-Band" · c0698212
      Markus Armbruster 提交于
      Affects documentation and a few error messages.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20180703085358.13941-2-armbru@redhat.com>
      c0698212
    • P
      Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging · e8c85894
      Peter Maydell 提交于
      * IEC units series (Philippe)
      * Hyper-V PV TLB flush (Vitaly)
      * git archive detection (Daniel)
      * host serial passthrough fix (David)
      * NPT support for SVM emulation (Jan)
      * x86 "info mem" and "info tlb" fix (Doug)
      
      # gpg: Signature made Mon 02 Jul 2018 16:18:21 BST
      # gpg:                using RSA key BFFBD25F78C7AE83
      # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
      # gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>"
      # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
      #      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83
      
      * remotes/bonzini/tags/for-upstream: (50 commits)
        tcg: simplify !CONFIG_TCG handling of tb_invalidate_*
        i386/monitor.c: make addresses canonical for "info mem" and "info tlb"
        target-i386: Add NPT support
        serial: Open non-block
        bsd-user: Use the IEC binary prefix definitions
        linux-user: Use the IEC binary prefix definitions
        tests/crypto: Use the IEC binary prefix definitions
        vl: Use the IEC binary prefix definitions
        monitor: Use the IEC binary prefix definitions
        cutils: Do not include "qemu/units.h" directly
        hw/rdma: Use the IEC binary prefix definitions
        hw/virtio: Use the IEC binary prefix definitions
        hw/vfio: Use the IEC binary prefix definitions
        hw/sd: Use the IEC binary prefix definitions
        hw/usb: Use the IEC binary prefix definitions
        hw/net: Use the IEC binary prefix definitions
        hw/i386: Use the IEC binary prefix definitions
        hw/ppc: Use the IEC binary prefix definitions
        hw/mips: Use the IEC binary prefix definitions
        hw/mips/r4k: Constify params_size
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      e8c85894
    • P
      Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20180702' into staging · ab08440a
      Peter Maydell 提交于
      Assorted tlb and tb caching fixes
      
      # gpg: Signature made Mon 02 Jul 2018 17:03:07 BST
      # gpg:                using RSA key 64DF38E8AF7E215F
      # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>"
      # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F
      
      * remotes/rth/tags/pull-tcg-20180702:
        cpu: Assert asidx_from_attrs return value in range
        accel/tcg: Avoid caching overwritten tlb entries
        accel/tcg: Don't treat invalid TLB entries as needing recheck
        accel/tcg: Correct "is this a TLB miss" check in get_page_addr_code()
        tcg: Define and use new tlb_hit() and tlb_hit_page() functions
        translate-all: fix locking of TBs whose two pages share the same physical page
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      ab08440a
    • P
      Merge remote-tracking branch... · e14dcc9c
      Peter Maydell 提交于
      Merge remote-tracking branch 'remotes/kraxel/tags/seabios-1.11.2-20180702-pull-request' into staging
      
      seabios: update to release 1.11.2, add/update configuration.
      vgabios: remove (old unused lgpl'ed vgabios).
      ramfb,bochs-display: use new vgabios roms.
      
      # gpg: Signature made Mon 02 Jul 2018 16:42:06 BST
      # gpg:                using RSA key 4CB6D8EED3E87138
      # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
      # gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
      # gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
      # Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138
      
      * remotes/kraxel/tags/seabios-1.11.2-20180702-pull-request:
        ramfb: enable vgabios
        bochs-display: enable vgabios
        seabios: update bios and vgabios binaries
        vgabios: remove submodule and build rules.
        seabios: enable ide dma
        seabios: add vga configs for bochs-display and ramfb
        seabios: update submodule to release 1.11.2
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      e14dcc9c
  3. 02 7月, 2018 25 次提交