1. 04 7月, 2018 2 次提交
    • 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
  2. 03 7月, 2018 1 次提交
  3. 02 7月, 2018 2 次提交
  4. 30 6月, 2018 1 次提交
    • P
      tests: iotests: drop some stderr line · cbc4ae2d
      Peter Xu 提交于
      In my Out-Of-Band test, "check -qcow2 060" fail with this:
      
        --- /home/peterx/git/qemu/tests/qemu-iotests/060.out
        +++ /home/peterx/git/qemu/bin/tests/qemu-iotests/060.out.bad
        @@ -427,8 +427,8 @@
        QMP_VERSION
        {"return": {}}
        qcow2: Image is corrupt: L2 table offset 0x2a2a2a00 unaligned (L1
        index: 0); further non-fatal corruption events will be suppressed
        -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_IMAGE_CORRUPTED", "data": {"device": "", "msg": "L2 table offset 0x2a2a2a0
        0 unaligned (L1 index: 0)", "node-name": "drive", "fatal": false}}
        read failed: Input/output error
        +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_IMAGE_CORRUPTED", "data": {"device": "", "msg": "L2 table offset 0x2a2a2a0
        0 unaligned (L1 index: 0)", "node-name": "drive", "fatal": false}}
        {"return": ""}
        {"return": {}}
        {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP},
        "event": "SHUTDOWN", "data": {"guest": false}}
      
      The order of the event and the in/out error line is swapped.  I didn't
      dig up the reason, but AFAIU what we want to verify is the event rather
      than stderr.  Let's drop the stderr line directly for this test.
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Message-Id: <20180620073223.31964-5-peterx@redhat.com>
      [Commit message touched up]
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      cbc4ae2d
  5. 29 6月, 2018 7 次提交
  6. 26 6月, 2018 1 次提交
    • P
      ahci: fix FIS I bit and PIO Setup FIS interrupt · ae79c2db
      Paolo Bonzini 提交于
      The "I" bit in PIO Setup and D2H FISes is exclusively a device concept
      and the irqstatus register in the controller does not matter.  The SATA
      spec says when it should be one; for D2H FISes in practice it is always
      set, while the PIO Setup FIS has several subcases that are documented in
      the patch.
      
      Also, the PIO Setup FIS interrupt is actually generated _after_ data
      has been received.
      
      Someone should probably spend some time reading the SATA specification and
      figuring out the more obscure fields in the PIO Setup FIS, but this is enough
      to fix SeaBIOS booting from ATAPI CD-ROMs over an AHCI controller.
      
      Fixes: 956556e1Reported-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NJohn Snow <jsnow@redhat.com>
      Message-id: 20180622165159.19863-1-pbonzini@redhat.com
      [Minor edit to avoid ATAPI comment ambiguity. --js]
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      ae79c2db
  7. 22 6月, 2018 3 次提交
  8. 21 6月, 2018 23 次提交