1. 20 12月, 2018 1 次提交
  2. 12 12月, 2018 1 次提交
  3. 15 10月, 2018 1 次提交
  4. 03 10月, 2018 1 次提交
    • V
      contrib: add elf2dmp tool · 3fa2d384
      Viktor Prutyanov 提交于
      elf2dmp is a converter from ELF dump (produced by 'dump-guest-memory') to
      Windows MEMORY.DMP format (also know as 'Complete Memory Dump') which can be
      opened in WinDbg.
      
      This tool can help if VMCoreInfo device/driver is absent in Windows VM and
      'dump-guest-memory -w' is not available but dump can be created in ELF format.
      
      The tool works as follows:
      1. Determine the system paging root looking at GS_BASE or KERNEL_GS_BASE
      to locate the PRCB structure and finds the kernel CR3 nearby if QEMU CPU
      state CR3 is not suitable.
      2. Find an address within the kernel image by dereferencing the first
      IDT entry and scans virtual memory upwards until the start of the
      kernel.
      3. Download a PDB matching the kernel from the Microsoft symbol store,
      and figure out the layout of certain relevant structures necessary for
      the dump.
      4. Populate the corresponding structures in the memory image and create
      the appropriate dump header.
      Signed-off-by: NViktor Prutyanov <viktor.prutyanov@virtuozzo.com>
      Message-Id: <1535546488-30208-3-git-send-email-viktor.prutyanov@virtuozzo.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      3fa2d384
  5. 27 9月, 2018 1 次提交
    • G
      display/edid: add edid generator to qemu. · 72d277a7
      Gerd Hoffmann 提交于
      EDID is a metadata format to describe monitors.  On physical hardware
      the monitor has an eeprom with that data block which can be read over
      i2c bus.
      
      On a linux system you can usually find the EDID data block in
      /sys/class/drm/$card/$connector/edid.  xorg ships a edid-decode utility
      which you can use to turn the blob into readable form.
      
      I think it would be a good idea to use EDID for virtual displays too.
      Needs changes in both qemu and guest kms drivers.  This patch is the
      first step, it adds an generator for EDID blobs to qemu.  Comes with a
      qemu-edid test tool included.
      
      With EDID we can pass more information to the guest.  Names and serial
      numbers, so the guests display configuration has no boring "Unknown
      Monitor".  List of video modes.  Display resolution, pretty important
      in case we want add HiDPI support some day.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 20180925075646.25114-2-kraxel@redhat.com
      72d277a7
  6. 25 9月, 2018 1 次提交
  7. 27 8月, 2018 1 次提交
  8. 17 8月, 2018 1 次提交
    • D
      docs: add guidance on configuring CPU models for x86 · 2544e9e4
      Daniel P. Berrangé 提交于
      With the recent set of CPU hardware vulnerabilities on x86, it is
      increasingly difficult to understand which CPU configurations are
      good to use and what flaws they might be vulnerable to.
      
      This doc attempts to help management applications and administrators in
      picking sensible CPU configuration on x86 hosts. It outlines which of
      the named CPU models are good choices, and describes which extra CPU
      flags should be enabled to allow the guest to mitigate hardware flaws.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      Message-Id: <20180627160103.13634-1-berrange@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      2544e9e4
  9. 05 7月, 2018 3 次提交
  10. 22 6月, 2018 1 次提交
  11. 14 6月, 2018 1 次提交
  12. 13 6月, 2018 1 次提交
  13. 11 6月, 2018 1 次提交
  14. 09 6月, 2018 1 次提交
  15. 05 6月, 2018 1 次提交
  16. 23 5月, 2018 1 次提交
  17. 11 5月, 2018 1 次提交
  18. 16 4月, 2018 1 次提交
  19. 20 3月, 2018 1 次提交
  20. 14 3月, 2018 1 次提交
  21. 12 3月, 2018 4 次提交
  22. 06 3月, 2018 2 次提交
  23. 03 3月, 2018 7 次提交
    • M
      qapi: Don't create useless directory qapi-generated · 418b1d0a
      Markus Armbruster 提交于
      We used to generate first test and later QGA QAPI code into
      qapi-generated/.  Commit b93b63f5 moved the test code to tests/.
      Commit 54c2e502 moved the QGA code to qga/qapi-generated/.  The
      directory has been unused since.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180211093607.27351-30-armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      418b1d0a
    • M
      qapi: Move qapi-schema.json to qapi/, rename generated files · eb815e24
      Markus Armbruster 提交于
      Move qapi-schema.json to qapi/, so it's next to its modules, and all
      files get generated to qapi/, not just the ones generated for modules.
      
      Consistently name the generated files qapi-MODULE.EXT:
      qmp-commands.[ch] become qapi-commands.[ch], qapi-event.[ch] become
      qapi-events.[ch], and qmp-introspect.[ch] become qapi-introspect.[ch].
      This gets rid of the temporary hacks in scripts/qapi/commands.py,
      scripts/qapi/events.py, and scripts/qapi/common.py.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180211093607.27351-28-armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      [eblake: Fix trailing dot in tpm.c, undo temporary hack for OSX toolchain]
      Signed-off-by: NEric Blake <eblake@redhat.com>
      eb815e24
    • 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
      qapi: Generate separate .h, .c for each module · 252dc310
      Markus Armbruster 提交于
      Our qapi-schema.json is composed of modules connected by include
      directives, but the generated code is monolithic all the same: one
      qapi-types.h with all the types, one qapi-visit.h with all the
      visitors, and so forth.  These monolithic headers get included all
      over the place.  In my "build everything" tree, adding a QAPI type
      recompiles about 4800 out of 5100 objects.
      
      We wouldn't write such monolithic headers by hand.  It stands to
      reason that we shouldn't generate them, either.
      
      Split up generated qapi-types.h to mirror the schema's modular
      structure: one header per module.  Name the main module's header
      qapi-types.h, and sub-module D/B.json's header D/qapi-types-B.h.
      
      Mirror the schema's includes in the headers, so that qapi-types.h gets
      you everything exactly as before.  If you need less, you can include
      one or more of the sub-module headers.  To be exploited shortly.
      
      Split up qapi-types.c, qapi-visit.h, qapi-visit.c, qmp-commands.h,
      qmp-commands.c, qapi-event.h, qapi-event.c the same way.
      qmp-introspect.h, qmp-introspect.c and qapi.texi remain monolithic.
      
      The split of qmp-commands.c duplicates static helper function
      qmp_marshal_output_str() in qapi-commands-char.c and
      qapi-commands-misc.c.  This happens when commands returning the same
      type occur in multiple modules.  Not worth avoiding.
      
      Since I'm going to rename qapi-event.[ch] to qapi-events.[ch], and
      qmp-commands.[ch] to qapi-commands.[ch], name the shards that way
      already, to reduce churn.  This requires temporary hacks in
      commands.py and events.py.  Similarly, c_name() must temporarily
      be taught to munge '/' in common.py.  They'll go away with the rename.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180211093607.27351-23-armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      [eblake: declare a dummy variable in each .c file, to shut up OSX
      toolchain warnings about empty .o files, including hacking c_name()]
      Signed-off-by: NEric Blake <eblake@redhat.com>
      252dc310
    • M
      qapi/types qapi/visit: Generate built-in stuff into separate files · cdb6610a
      Markus Armbruster 提交于
      Linking code from multiple separate QAPI schemata into the same
      program is possible, but involves some weirdness around built-in
      types:
      
      * We generate code for built-in types into .c only with option
        --builtins.  The user is responsible for generating code for exactly
        one QAPI schema per program with --builtins.
      
      * We generate code for built-in types into .h regardless of
        --builtins, but guarded by #ifndef QAPI_VISIT_BUILTIN.  Because all
        copies of this code are exactly the same, including any combination
        of these headers works.
      
      Replace this contraption by something more conventional: generate code
      for built-in types into their very own files: qapi-builtin-types.c,
      qapi-builtin-visit.c, qapi-builtin-types.h, qapi-builtin-visit.h, but
      only with --builtins.  Obey --output-dir, but ignore --prefix for
      them.
      
      Make qapi-types.h include qapi-builtin-types.h.  With multiple
      schemata you now have multiple qapi-types.[ch], but only one
      qapi-builtin-types.[ch].  Same for qapi-visit.[ch] and
      qapi-builtin-visit.[ch].
      
      Bonus: if all you need is built-in stuff, you can include a much
      smaller header.  To be exploited shortly.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180211093607.27351-21-armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      [eblake: fix octal constant for python 3]
      Signed-off-by: NEric Blake <eblake@redhat.com>
      cdb6610a
    • M
      qapi: Rename generated qmp-marshal.c to qmp-commands.c · 834a3f34
      Markus Armbruster 提交于
      All generated .c are named like their .h, except for qmp-marshal.c and
      qmp-commands.h.  To add to the confusion, tests-qmp-commands.c falsely
      matches generated test-qmp-commands.h.
      
      Get rid of this unnecessary complication.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180211093607.27351-19-armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      834a3f34
    • M
      qapi-gen: New common driver for code and doc generators · fb0bc835
      Markus Armbruster 提交于
      Whenever qapi-schema.json changes, we run six programs eleven times to
      update eleven files.  Similar for qga/qapi-schema.json.  This is
      silly.  Replace the six programs by a single program that spits out
      all eleven files.
      
      The programs become modules in new Python package qapi, along with the
      helper library.  This requires moving them to scripts/qapi/.  While
      moving them, consistently drop executable mode bits.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <20180211093607.27351-9-armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      [eblake: move change to one-line 'blurb' earlier in series, mention mode
      bit change as intentional, update qapi-code-gen.txt to match actual
      generated events.c file]
      Signed-off-by: NEric Blake <eblake@redhat.com>
      fb0bc835
  24. 16 2月, 2018 1 次提交
  25. 13 2月, 2018 2 次提交
  26. 06 2月, 2018 1 次提交
    • D
      qapi: force a UTF-8 locale for running Python · d4e5ec87
      Daniel P. Berrange 提交于
      Python2 did not validate locale correctness when reading input data, so
      would happily read UTF-8 data in non-UTF-8 locales. Python3 is strict so
      if you try to read UTF-8 data in the C locale, it will raise an error
      for any UTF-8 bytes that aren't representable in 7-bit ascii encoding.
      e.g.
      
      UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 54: ordinal not in range(128)
      Traceback (most recent call last):
        File "/tmp/qemu-test/src/scripts/qapi-commands.py", line 317, in <module>
          schema = QAPISchema(input_file)
        File "/tmp/qemu-test/src/scripts/qapi.py", line 1468, in __init__
          parser = QAPISchemaParser(open(fname, 'r'))
        File "/tmp/qemu-test/src/scripts/qapi.py", line 301, in __init__
          previously_included)
        File "/tmp/qemu-test/src/scripts/qapi.py", line 348, in _include
          exprs_include = QAPISchemaParser(fobj, previously_included, info)
        File "/tmp/qemu-test/src/scripts/qapi.py", line 271, in __init__
          self.src = fp.read()
        File "/usr/lib64/python3.5/encodings/ascii.py", line 26, in decode
          return codecs.ascii_decode(input, self.errors)[0]
      
      More background on this can be seen in
      
        https://www.python.org/dev/peps/pep-0538/
      
      Many distros support a new C.UTF-8 locale that is like the C locale,
      but with UTF-8 instead of 7-bit ASCII. That is not entirely portable
      though. This patch thus sets the LANG to "C", but overrides LC_CTYPE
      to be en_US.UTF-8 locale. This gets us pretty close to C.UTF-8, but
      in a way that should be portable to everywhere QEMU builds.
      
      This patch only forces UTF-8 for QAPI scripts, since that is the one
      showing the immediate error under Python3 with C locale, but potentially
      we ought to force this for all python scripts used in the build process.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <20180116134217.8725-9-berrange@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      d4e5ec87
  27. 31 1月, 2018 1 次提交