1. 27 3月, 2018 1 次提交
    • P
      monitor: new parameter "x-oob" · be933ffc
      Peter Xu 提交于
      Add new parameter to optionally enable Out-Of-Band for a QMP server.
      
      An example command line:
      
        ./qemu-system-x86_64 -chardev stdio,id=char0 \
                             -mon chardev=char0,mode=control,x-oob=on
      
      By default, Out-Of-Band is off.
      
      It is not allowed if either MUX or non-QMP is detected, since
      Out-Of-Band is currently only for QMP, and non-MUX chardev backends.
      
      Note that the client STILL has to request 'oob' during qmp_capabilities;
      in part because the x-oob command line option may disappear in the
      future if we decide the capabilities negotiation is sufficient.
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Message-Id: <20180326063901.27425-4-peterx@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      [eblake: enhance commit message]
      Tested-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      be933ffc
  2. 20 3月, 2018 3 次提交
  3. 14 3月, 2018 1 次提交
  4. 13 3月, 2018 1 次提交
  5. 12 3月, 2018 2 次提交
  6. 09 3月, 2018 1 次提交
    • S
      vl: introduce vm_shutdown() · 4486e89c
      Stefan Hajnoczi 提交于
      Commit 00d09fdb ("vl: pause vcpus before
      stopping iothreads") and commit dce8921b
      ("iothread: Stop threads before main() quits") tried to work around the
      fact that emulation was still active during termination by stopping
      iothreads.  They suffer from race conditions:
      1. virtio_scsi_handle_cmd_vq() racing with iothread_stop_all() hits the
         virtio_scsi_ctx_check() assertion failure because the BDS AioContext
         has been modified by iothread_stop_all().
      2. Guest vq kick racing with main loop termination leaves a readable
         ioeventfd that is handled by the next aio_poll() when external
         clients are enabled again, resulting in unwanted emulation activity.
      
      This patch obsoletes those commits by fully disabling emulation activity
      when vcpus are stopped.
      
      Use the new vm_shutdown() function instead of pause_all_vcpus() so that
      vm change state handlers are invoked too.  Virtio devices will now stop
      their ioeventfds, preventing further emulation activity after vm_stop().
      
      Note that vm_stop(RUN_STATE_SHUTDOWN) cannot be used because it emits a
      QMP STOP event that may affect existing clients.
      
      It is no longer necessary to call replay_disable_events() directly since
      vm_shutdown() does so already.
      
      Drop iothread_stop_all() since it is no longer used.
      
      Cc: Fam Zheng <famz@redhat.com>
      Cc: Kevin Wolf <kwolf@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Acked-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 20180307144205.20619-5-stefanha@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      4486e89c
  7. 06 3月, 2018 4 次提交
  8. 05 3月, 2018 8 次提交
  9. 03 3月, 2018 2 次提交
    • M
      qapi: Empty out qapi-schema.json · 112ed241
      Markus Armbruster 提交于
      The previous commit improved compile time by including less of the
      generated QAPI headers.  This is impossible for stuff defined directly
      in qapi-schema.json, because that ends up in headers that that pull in
      everything.
      
      Move everything but include directives from qapi-schema.json to new
      sub-module qapi/misc.json, then include just the "misc" shard where
      possible.
      
      It's possible everywhere, except:
      
      * monitor.c needs qmp-command.h to get qmp_init_marshal()
      
      * monitor.c, ui/vnc.c and the generated qapi-event-FOO.c need
        qapi-event.h to get enum QAPIEvent
      
      Perhaps we'll get rid of those some other day.
      
      Adding a type to qapi/migration.json now recompiles some 120 instead
      of 2300 out of 5100 objects.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180211093607.27351-25-armbru@redhat.com>
      [eblake: rebase to master]
      Signed-off-by: NEric Blake <eblake@redhat.com>
      112ed241
    • M
      Include less of the generated modular QAPI headers · 9af23989
      Markus Armbruster 提交于
      In my "build everything" tree, a change to the types in
      qapi-schema.json triggers a recompile of about 4800 out of 5100
      objects.
      
      The previous commit split up qmp-commands.h, qmp-event.h, qmp-visit.h,
      qapi-types.h.  Each of these headers still includes all its shards.
      Reduce compile time by including just the shards we actually need.
      
      To illustrate the benefits: adding a type to qapi/migration.json now
      recompiles some 2300 instead of 4800 objects.  The next commit will
      improve it further.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180211093607.27351-24-armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      [eblake: rebase to master]
      Signed-off-by: NEric Blake <eblake@redhat.com>
      9af23989
  10. 02 3月, 2018 1 次提交
  11. 26 2月, 2018 1 次提交
    • C
      s390x/cpu: expose the guest crash information · 4ada99ad
      Christian Borntraeger 提交于
      This patch is the s390 implementation of guest crash information,
      similar to commit d187e08d ("i386/cpu: add crash-information QOM
      property") and the related commits. We will detect several crash
      reasons, with the "disabled wait" being the most important one, since
      this is used by all s390 guests as a "panic like" notification.
      
      Demonstrate these ways with examples as follows.
      
        1. crash-information QOM property;
      
        Run qemu with -qmp unix:qmp-sock,server, then use utility "qmp-shell"
        to execute "qom-get" command, and might get the result like,
      
        (QEMU) (QEMU) qom-get path=/machine/unattached/device[0] \
            property=crash-information
        {"return": {"core": 0, "reason": "disabled-wait", "psw-mask": 562956395872256, \
            "type": "s390", "psw-addr": 1102832}}
      
        2. GUEST_PANICKED event reporting;
      
        Run qemu with a socket option, and telnet or nc to that,
        -chardev socket,id=qmp,port=4444,host=localhost,server \
        -mon chardev=qmp,mode=control,pretty=on \
        Negotiating the mode by { "execute": "qmp_capabilities" }, and the crash
        information will be reported on a guest crash event like,
      
        {
          "timestamp": {
              "seconds": 1518004739,
              "microseconds": 552563
          },
          "event": "GUEST_PANICKED",
          "data": {
              "action": "pause",
              "info": {
                  "core": 0,
                  "psw-addr": 1102832,
                  "reason": "disabled-wait",
                  "psw-mask": 562956395872256,
                  "type": "s390"
              }
          }
        }
      
        3. log;
      
        Run qemu with the parameters: -D <logfile> -d guest_errors, to
        specify the logfile and log item. The results might be,
      
        Guest crashed on cpu 0: disabled-wait
        PSW: 0x0002000180000000 0x000000000010d3f0
      Co-authored-by: NJing Liu <liujbjl@linux.vnet.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Message-Id: <20180209122543.25755-1-borntraeger@de.ibm.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      [CH: tweaked qapi comment]
      Signed-off-by: NCornelia Huck <cohuck@redhat.com>
      4ada99ad
  12. 20 2月, 2018 11 次提交
  13. 17 2月, 2018 1 次提交
  14. 15 2月, 2018 1 次提交
    • S
      vl: pause vcpus before stopping iothreads · 00d09fdb
      Stefan Hajnoczi 提交于
      Commit dce8921b ("iothread: Stop threads
      before main() quits") introduced iothread_stop_all() to avoid the
      following virtio-scsi assertion failure:
      
        assert(blk_get_aio_context(d->conf.blk) == s->ctx);
      
      Back then the assertion failed because when bdrv_close_all() made
      d->conf.blk NULL, blk_get_aio_context() returned the global AioContext
      instead of s->ctx.
      
      The same assertion can still fail today when vcpus submit new I/O
      requests after iothread_stop_all() has moved the BDS to the global
      AioContext.
      
      This patch hardens the iothread_stop_all() approach by pausing vcpus
      before calling iothread_stop_all().
      
      Note that the assertion failure is a race condition.  It is not possible
      to reproduce it reliably.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 20180201110708.8080-1-stefanha@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      00d09fdb
  15. 09 2月, 2018 2 次提交