1. 18 6月, 2019 8 次提交
  2. 12 6月, 2019 2 次提交
  3. 15 5月, 2019 1 次提交
  4. 01 5月, 2019 1 次提交
    • D
      hmp: gva2gpa debug command · 574d9693
      Dr. David Alan Gilbert 提交于
      Add a gva2gpa command purely for debug which performs
      address translation on the gva, the existing gpa2hva
      command can then also be used to find it in the qemu
      userspace; e.g.
      
      (qemu) info registers
      .... RSP=ffffffff81c03e98
      ....
      (qemu) gva2gpa 0xffffffff81c03e98
      gpa: 0x1c03e98
      (qemu) gpa2hva 0x1c03e98
      Host virtual address for 0x1c03e98 (pc.ram) is 0x7f0599a03e98
      (qemu) x/10x 0xffffffff81c03e98
      ffffffff81c03e98: 0x81c03eb8 0xffffffff 0x8101ea3f 0xffffffff
      ffffffff81c03ea8: 0x81d27b00 0xffffffff 0x00000000 0x00000000
      ffffffff81c03eb8: 0x81c03ec8 0xffffffff
      
      gdb -p ...qemu...
      (gdb) x/10x 0x7f0599a03e98
      0x7f0599a03e98:	0x81c03eb8	0xffffffff	0x8101ea3f	0xffffffff
      0x7f0599a03ea8:	0x81d27b00	0xffffffff	0x00000000	0x00000000
      0x7f0599a03eb8:	0x81c03ec8	0xffffffff
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Message-Id: <20190412152652.827-1-dgilbert@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      574d9693
  5. 19 4月, 2019 11 次提交
  6. 18 3月, 2019 1 次提交
  7. 11 3月, 2019 1 次提交
  8. 26 2月, 2019 1 次提交
  9. 18 2月, 2019 7 次提交
  10. 05 2月, 2019 1 次提交
    • P
      monitor: do not use QTAILQ_FOREACH_SAFE across critical sections · 82e870ba
      Paolo Bonzini 提交于
      monitor_qmp_requests_pop_any_with_lock cannot modify the monitor list
      concurrently with monitor_cleanup, since the dispatch bottom half
      runs in the main thread, but anyway it is a bit ugly to keep
      "next" live across critical sections of monitor_lock and Coverity
      complains (CID 1397072).
      
      Replace QTAILQ_FOREACH_SAFE with a while loop and QTAILQ_FIRST,
      it is cleaner and more future-proof.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      82e870ba
  11. 24 1月, 2019 1 次提交
    • M
      qapi: Eliminate indirection through qmp_event_get_func_emit() · a9529100
      Markus Armbruster 提交于
      The qapi_event_send_FOO() functions emit events like this:
      
          QMPEventFuncEmit emit;
      
          emit = qmp_event_get_func_emit();
          if (!emit) {
              return;
          }
      
          qmp = qmp_event_build_dict("FOO");
          [put event arguments into @qmp...]
      
          emit(QAPI_EVENT_FOO, qmp);
      
      The value of qmp_event_get_func_emit() depends only on the program:
      
      * In qemu-system-FOO, it's always monitor_qapi_event_queue.
      
      * In tests/test-qmp-event, it's always event_test_emit.
      
      * In all other programs, it's always null.
      
      This is exactly the kind of dependence the linker is supposed to
      resolve; we don't actually need an indirection.
      
      Note that things would fall apart if we linked more than one QAPI
      schema into a single program: each set of qapi_event_send_FOO() uses
      its own event enumeration, yet they share a single emit function.
      Which takes the event enumeration as an argument.  Which one if
      there's more than one?
      
      More seriously: how does this work even now?  qemu-system-FOO wants
      QAPIEvent, and passes a function taking that to
      qmp_event_set_func_emit().  test-qmp-event wants test_QAPIEvent, and
      passes a function taking that to qmp_event_set_func_emit().
      
      It works by type trickery, of course:
      
          typedef void (*QMPEventFuncEmit)(unsigned event, QDict *dict);
      
          void qmp_event_set_func_emit(QMPEventFuncEmit emit);
      
          QMPEventFuncEmit qmp_event_get_func_emit(void);
      
      We use unsigned instead of the enumeration type.  Relies on both
      enumerations boiling down to unsigned, which happens to be true for
      the compilers we use.
      
      Clean this up as follows:
      
      * Generate qapi_event_send_FOO() that call PREFIX_qapi_event_emit()
        instead of the value of qmp_event_set_func_emit().
      
      * Generate a prototype for PREFIX_qapi_event_emit() into
        qapi-events.h.
      
      * PREFIX_ is empty for qapi/qapi-schema.json, and test_ for
        tests/qapi-schema/qapi-schema-test.json.  It's qga_ for
        qga/qapi-schema.json, and doc-good- for
        tests/qapi-schema/doc-good.json, but those don't define any events.
      
      * Rename monitor_qapi_event_queue() to qapi_event_emit() instead of
        passing it to qmp_event_set_func_emit().  This takes care of
        qemu-system-FOO.
      
      * Rename event_test_emit() to test_qapi_event_emit() instead of
        passing it to qmp_event_set_func_emit().  This takes care of
        tests/test-qmp-event.
      
      * Add a qapi_event_emit() that does nothing to stubs/monitor.c.  This
        takes care of all other programs that link code emitting QMP events.
      
      * Drop qmp_event_set_func_emit(), qmp_event_get_func_emit().
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20181218182234.28876-3-armbru@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      [Commit message typos fixed]
      a9529100
  12. 11 1月, 2019 1 次提交
    • P
      qemu/queue.h: leave head structs anonymous unless necessary · b58deb34
      Paolo Bonzini 提交于
      Most list head structs need not be given a name.  In most cases the
      name is given just in case one is going to use QTAILQ_LAST, QTAILQ_PREV
      or reverse iteration, but this does not apply to lists of other kinds,
      and even for QTAILQ in practice this is only rarely needed.  In addition,
      we will soon reimplement those macros completely so that they do not
      need a name for the head struct.  So clean up everything, not giving a
      name except in the rare case where it is necessary.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      b58deb34
  13. 14 12月, 2018 3 次提交
  14. 12 12月, 2018 1 次提交