1. 03 3月, 2018 4 次提交
    • 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
  2. 16 2月, 2018 1 次提交
  3. 13 2月, 2018 2 次提交
  4. 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
  5. 31 1月, 2018 1 次提交
  6. 29 1月, 2018 3 次提交
    • D
      ui: fix alphabetical ordering of keymaps · 5a15e6b1
      Daniel P. Berrange 提交于
      The qcode-to-linux keymaps was accidentally added in the wrong place
      by
      
        commit de80d785
        Author: Owen Smith <owen.smith@citrix.com>
        Date:   Fri Nov 3 11:56:28 2017 +0000
      
          ui: generate qcode to linux mappings
      
      breaking the alphabetical ordering of keymaps
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-id: 20180117164118.8510-4-berrange@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      5a15e6b1
    • D
      hw: convert the escc device to keycodemapdb · e709a61a
      Daniel P. Berrange 提交于
      Replace the qcode_to_keycode table with automatically
      generated tables.
      
      Missing entries in qcode_to_keycode now fixed:
      
       - Q_KEY_CODE_KP_COMMA -> 0x2d
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 20180117164118.8510-3-berrange@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      e709a61a
    • D
      hw: convert ps2 device to keycodemapdb · ab8f9d49
      Daniel P. Berrange 提交于
      Replace the qcode_to_keycode_set1, qcode_to_keycode_set2,
      and qcode_to_keycode_set3 tables with automatically
      generated tables.
      
      Missing entries in qcode_to_keycode_set1 now fixed:
      
       - Q_KEY_CODE_SYSRQ -> 0x54
       - Q_KEY_CODE_PRINT -> 0x54 (NB ignored due to special case)
       - Q_KEY_CODE_AGAIN -> 0xe005
       - Q_KEY_CODE_PROPS -> 0xe006
       - Q_KEY_CODE_UNDO -> 0xe007
       - Q_KEY_CODE_FRONT -> 0xe00c
       - Q_KEY_CODE_COPY -> 0xe078
       - Q_KEY_CODE_OPEN -> 0x64
       - Q_KEY_CODE_PASTE -> 0x65
       - Q_KEY_CODE_CUT -> 0xe03c
       - Q_KEY_CODE_LF -> 0x5b
       - Q_KEY_CODE_HELP -> 0xe075
       - Q_KEY_CODE_COMPOSE -> 0xe05d
       - Q_KEY_CODE_PAUSE -> 0xe046
       - Q_KEY_CODE_KP_EQUALS -> 0x59
      
      And some mistakes corrected:
      
       - Q_KEY_CODE_HIRAGANA was mapped to 0x70 (Katakanahiragana)
         instead of of 0x77 (Hirigana)
       - Q_KEY_CODE_MENU was incorrectly mapped to the compose
         scancode (0xe05d) and is now mapped to 0xe01e
       - Q_KEY_CODE_FIND was mapped to 0xe065 (Search) instead
         of to 0xe041 (Find)
       - Q_KEY_CODE_POWER, SLEEP & WAKE had 0x0e instead of 0xe0
         as the prefix
      
      Missing entries in qcode_to_keycode_set2 now fixed:
      
       - Q_KEY_CODE_PRINT -> 0x7f (NB ignored due to special case)
       - Q_KEY_CODE_COMPOSE -> 0xe02f
       - Q_KEY_CODE_PAUSE -> 0xe077
       - Q_KEY_CODE_KP_EQUALS -> 0x0f
      
      And some mistakes corrected:
      
       - Q_KEY_CODE_HIRAGANA was mapped to 0x13 (Katakanahiragana)
         instead of of 0x62 (Hirigana)
       - Q_KEY_CODE_MENU was incorrectly mapped to the compose
         scancode (0xe02f) and is now not mapped
       - Q_KEY_CODE_FIND was mapped to 0xe010 (Search) and is now
         not mapped.
       - Q_KEY_CODE_POWER, SLEEP & WAKE had 0x0e instead of 0xe0
         as the prefix
      
      Missing entries in qcode_to_keycode_set3 now fixed:
      
       - Q_KEY_CODE_ASTERISK -> 0x7e
       - Q_KEY_CODE_SYSRQ -> 0x57
       - Q_KEY_CODE_LESS -> 0x13
       - Q_KEY_CODE_STOP -> 0x0a
       - Q_KEY_CODE_AGAIN -> 0x0b
       - Q_KEY_CODE_PROPS -> 0x0c
       - Q_KEY_CODE_UNDO -> 0x10
       - Q_KEY_CODE_COPY -> 0x18
       - Q_KEY_CODE_OPEN -> 0x20
       - Q_KEY_CODE_PASTE -> 0x28
       - Q_KEY_CODE_FIND -> 0x30
       - Q_KEY_CODE_CUT -> 0x38
       - Q_KEY_CODE_HELP -> 0x09
       - Q_KEY_CODE_COMPOSE -> 0x8d
       - Q_KEY_CODE_AUDIONEXT -> 0x93
       - Q_KEY_CODE_AUDIOPREV -> 0x94
       - Q_KEY_CODE_AUDIOSTOP -> 0x98
       - Q_KEY_CODE_AUDIOMUTE -> 0x9c
       - Q_KEY_CODE_VOLUMEUP -> 0x95
       - Q_KEY_CODE_VOLUMEDOWN -> 0x9d
       - Q_KEY_CODE_CALCULATOR -> 0xa3
       - Q_KEY_CODE_AC_HOME -> 0x97
      
      And some mistakes corrected:
      
       - Q_KEY_CODE_MENU was incorrectly mapped to the compose
         scancode (0x8d) and is now 0x91
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 20180117164118.8510-2-berrange@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      ab8f9d49
  7. 25 1月, 2018 2 次提交
    • D
      ui: convert GTK and SDL1 frontends to keycodemapdb · 2ec78706
      Daniel P. Berrange 提交于
      The x_keycode_to_pc_keycode and evdev_keycode_to_pc_keycode
      tables are replaced with automatically generated tables.
      In addition the X11 heuristics are improved to detect running
      on XQuartz and XWin X11 servers, to activate the correct OS-X
      and Win32 keycode maps.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 20180117164717.15855-3-berrange@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      2ec78706
    • D
      ui: convert the SDL2 frontend to keycodemapdb · ed7b2624
      Daniel P. Berrange 提交于
      The SDL2 scancodes are conveniently identical to the USB
      scancodes. Replace the sdl2_scancode_to_qcode table with
      an automatically generated table.
      
      Missing entries in sdl2_scancode_to_qcode now fixed:
      
        - 0x32 -> Q_KEY_CODE_BACKSLASH
        - 0x66 -> Q_KEY_CODE_POWER
        - 0x67 -> Q_KEY_CODE_KP_EQUALS
        - 0x74 -> Q_KEY_CODE_OPEN
        - 0x77 -> Q_KEY_CODE_FRONT
        - 0x7f -> Q_KEY_CODE_AUDIOMUTE
        - 0x80 -> Q_KEY_CODE_VOLUMEUP
        - 0x81 -> Q_KEY_CODE_VOLUMEDOWN
        - 0x85 -> Q_KEY_CODE_KP_COMMA
        - 0x87 -> Q_KEY_CODE_RO
        - 0x89 -> Q_KEY_CODE_YEN
        - 0x8a -> Q_KEY_CODE_HENKAN
        - 0x93 -> Q_KEY_CODE_HIRAGANA
        - 0xe8 -> Q_KEY_CODE_AUDIOPLAY
        - 0xe9 -> Q_KEY_CODE_AUDIOSTOP
        - 0xea -> Q_KEY_CODE_AUDIOPREV
        - 0xeb -> Q_KEY_CODE_AUDIONEXT
        - 0xed -> Q_KEY_CODE_VOLUMEUP
        - 0xee -> Q_KEY_CODE_VOLUMEDOWN
        - 0xef -> Q_KEY_CODE_AUDIOMUTE
        - 0xf1 -> Q_KEY_CODE_AC_BACK
        - 0xf2 -> Q_KEY_CODE_AC_FORWARD
        - 0xf3 -> Q_KEY_CODE_STOP
        - 0xf4 -> Q_KEY_CODE_FIND
        - 0xf8 -> Q_KEY_CODE_SLEEP
        - 0xfa -> Q_KEY_CODE_AC_REFRESH
        - 0xfb -> Q_KEY_CODE_CALCULATOR
      
      And some mistakes corrected:
      
        - 0x65 -> Q_KEY_CODE_COMPOSE, not duplicating Q_KEY_CODE_MENU
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 20180117164717.15855-2-berrange@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      ed7b2624
  8. 19 1月, 2018 1 次提交
  9. 12 1月, 2018 2 次提交
  10. 18 12月, 2017 2 次提交
    • P
      Makefile: add more targets to the UNCHECKED_GOALS rule · 28fa2927
      Philippe Mathieu-Daudé 提交于
      These targets don't need a full build of git submodules.
      (See b8e535ae and eaa2ddbb).
      Signed-off-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      28fa2927
    • P
      Makefile: use $(MAKE) variable · b98a3bae
      Philippe Mathieu-Daudé 提交于
      For some systems (i.e. FreeBSD) the default 'make' is not compatible with the
      GNU extensions used by QEMU makefiles.
      
      Calling the GNU make (gmake) works, however the help displayed refers to the
      host 'make' and copy/paste leads to lot of unobvious errors:
      
        $ gmake check-help
        [...]
         make check                Run all tests
      
        $ make check
        make: "Makefile" line 28: Missing dependency operator
        make: "Makefile" line 37: Need an operator
        make: "Makefile" line 41: warning: duplicate script for target "git-submodule-update" ignored
        make: "rules.mak" line 70: warning: duplicate script for target "%.o" ignored
        make: Unknown modifier ' '
        make: Unclosed substitution for eval modules (= missing)
        make: "tests/Makefile.include" line 24: Variable/Value missing from "export"
        make: "tests/" line 1: warning: Zero byte read from file, skipping rest of line.
        make: "tests/" line 1: Need an operator
        make: "Makefile" line 660: warning: duplicate script for target "ifneq" ignored
        make: "Makefile" line 78: warning: using previous script for "ifneq" defined here
        make: Fatal errors encountered -- cannot continue
      
      Using the $(MAKE) variable, the help displayed is consistent with the 'make'
      program used.
      Signed-off-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      b98a3bae
  11. 15 12月, 2017 1 次提交
  12. 21 11月, 2017 1 次提交
  13. 14 11月, 2017 1 次提交
  14. 09 11月, 2017 1 次提交
  15. 06 11月, 2017 3 次提交
    • D
      build: remove use of MAKELEVEL optimization in submodule handling · c4b01c7c
      Daniel P. Berrange 提交于
      The Makefile attempts to optimize the handling of submodules by using MAKELEVEL
      to only check the submodule status when running from the top level make
      invokation. This causes problems for people who are using a makefile of their
      own to in turn invoke QEMU's makefile, as MAKELEVEL is already set to 1 (or
      more) when QEMU's makefile runs.
      
      This optimization should not really be needed, since the git-submodule.sh
      script is already used to detect if a submodule update is required. This by
      removing the MAKELEVEL check, we at most add an extra 'git-submodule.sh status'
      call to each make level, the overhead of which is lost in noise of building
      QEMU.
      Reviewed-by: NGreg Kurz <groug@kaod.org>
      Tested-by: NGreg Kurz <groug@kaod.org>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      c4b01c7c
    • D
      build: allow automatic git submodule updates to be disabled · f62bbee5
      Daniel P. Berrange 提交于
      Some people building QEMU use VPATH builds where the source directory is on a
      read-only volume. In such a case 'scripts/git-submodules.sh update' will always
      fail and users are required to run it manually themselves on their original
      writable source directory.
      
      While this is already supported, it is nice to give users a command line flag
      to configure to permanently disable automatic submodule updates, as it means
      they won't get hard to diagnose failures from git-submodules.sh at an arbitrary
      later date.
      
      This patch thus introduces a flag '--disable-git-update' which will prevent
      'make' from ever running 'scripts/git-submodules.sh update'. It will still run
      the 'status' command to determine if a submodule update is needed, but when it
      does this it'll simply stop and print a message instructing the developer what
      todo. eg
      
      $ ./configure  --target-list=x86_64-softmmu --disable-git-update
      ...snip...
      
      $ make
        GEN     config-host.h
        GEN     trace/generated-tcg-tracers.h
        GEN     trace/generated-helpers-wrappers.h
        GEN     trace/generated-helpers.h
        GEN     trace/generated-helpers.c
        GEN     module_block.h
      
      GIT submodule checkout is out of date. Please run
        scripts/git-submodule.sh update ui/keycodemapdb
      from the source directory checkout /home/berrange/src/virt/qemu
      
      make: *** [Makefile:31: git-submodule-update] Error 1
      Tested-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      f62bbee5
    • D
      build: allow setting a custom GIT binary for transparent proxying · cc84d63a
      Daniel P. Berrange 提交于
      Some users can't run a bare 'git' command, due to need for a transparent
      proxying solution such as 'tsocks'. This adds an argument to configure to
      let users specify such a thing:
      
        ./configure --with-git="tsocks git"
      
      The submodule script is also updated to give the user a hint about using this
      flag, if we fail to checkout modules.
      Tested-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      cc84d63a
  16. 26 10月, 2017 1 次提交
  17. 19 10月, 2017 1 次提交
    • A
      build: Fix dtc-checkout race condition in Makefile · 00525864
      Aaron Lindsay 提交于
      This was introduced by:
          commit aef45d51
          Author: Daniel P. Berrange <berrange@redhat.com>
          Date:   Fri Sep 29 11:11:56 2017 +0100
      
      	build: automatically handle GIT submodule checkout for dtc
      
      On my system, I see the following with a fresh clone:
      
      % ./configure --disable-gtk --target-list=aarch64-softmmu
      % make -j8
        GEN     aarch64-softmmu/config-devices.mak.tmp
        GEN     config-host.h
      mkdir -p dtc/libfdt
        GIT     ui/keycodemapdb dtc
      mkdir -p dtc/tests
        GEN     qemu-options.def
      [snip]
        GEN     migration/trace.h
      make: *** [git-submodule-update] Error 1
      make: *** Waiting for unfinished jobs....
      
      Upon closer inspection, the root cause of the error is:
      
      % git submodule update --init ui/keycodemapdb dtc
      fatal: destination path 'dtc' already exists and is not an empty directory.
      Clone of 'git://git.qemu-project.org/dtc.git' into submodule path 'dtc' failed
      
      This patch fixes this race condition by forcing the 'dtc/%' rule which caused
      'dtc' to be non-empty to wait on '.git-submodule-status'.
      Signed-off-by: NAaron Lindsay <alindsay@codeaurora.org>
      Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
      Acked-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-id: 1508352023-28591-1-git-send-email-alindsay@codeaurora.org
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      00525864
  18. 17 10月, 2017 2 次提交
  19. 16 10月, 2017 4 次提交
    • G
      tools: add qemu-keymap · 6a021536
      Gerd Hoffmann 提交于
      qemu-keymap generates qemu reverse keymaps from xkb keymaps,
      which can be used with the qemu "-k" command line switch.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 20171005153330.19210-2-kraxel@redhat.com
      6a021536
    • D
      ui: convert common input code to keycodemapdb · bcd5ac9b
      Daniel P. Berrange 提交于
      Replace the number_to_qcode, qcode_to_number and linux_to_qcode
      tables with automatically generated tables.
      
      Missing entries in linux_to_qcode now fixed:
      
        KEY_LINEFEED -> Q_KEY_CODE_LF
        KEY_KPEQUAL -> Q_KEY_CODE_KP_EQUALS
        KEY_COMPOSE -> Q_KEY_CODE_COMPOSE
        KEY_AGAIN -> Q_KEY_CODE_AGAIN
        KEY_PROPS -> Q_KEY_CODE_PROPS
        KEY_UNDO -> Q_KEY_CODE_UNDO
        KEY_FRONT -> Q_KEY_CODE_FRONT
        KEY_COPY -> Q_KEY_CODE_COPY
        KEY_OPEN -> Q_KEY_CODE_OPEN
        KEY_PASTE -> Q_KEY_CODE_PASTE
        KEY_CUT -> Q_KEY_CODE_CUT
        KEY_HELP -> Q_KEY_CODE_HELP
        KEY_MEDIA -> Q_KEY_CODE_MEDIASELECT
      
      In addition, some fixes:
      
       - KEY_PLAYPAUSE now maps to Q_KEY_CODE_AUDIOPLAY, instead of
         KEY_PLAYCD. KEY_PLAYPAUSE is defined across almost all scancodes
         sets, while KEY_PLAYCD only appears in AT set1, so the former is
         a more useful mapping.
      
      Missing entries in qcode_to_number now fixed:
      
        Q_KEY_CODE_AGAIN -> 0x85
        Q_KEY_CODE_PROPS -> 0x86
        Q_KEY_CODE_UNDO -> 0x87
        Q_KEY_CODE_FRONT -> 0x8c
        Q_KEY_CODE_COPY -> 0xf8
        Q_KEY_CODE_OPEN -> 0x64
        Q_KEY_CODE_PASTE -> 0x65
        Q_KEY_CODE_CUT -> 0xbc
        Q_KEY_CODE_LF -> 0x5b
        Q_KEY_CODE_HELP -> 0xf5
        Q_KEY_CODE_COMPOSE -> 0xdd
        Q_KEY_CODE_KP_EQUALS -> 0x59
        Q_KEY_CODE_MEDIASELECT -> 0xed
      
      In addition, some fixes:
      
       - Q_KEY_CODE_MENU was incorrectly mapped to the compose
         scancode (0xdd) and is now mapped to 0x9e
       - Q_KEY_CODE_FIND was mapped to 0xe065 (Search) instead
         of to 0xe041 (Find)
       - Q_KEY_CODE_HIRAGANA was mapped to 0x70 (Katakanahiragana)
         instead of of 0x77 (Hirigana)
       - Q_KEY_CODE_PRINT was mapped to 0xb7 which is not a defined
         scan code in AT set 1, it is now mapped to 0x54 (sysrq)
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 20170929101201.21039-5-berrange@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      bcd5ac9b
    • D
      ui: add keycodemapdb repository as a GIT submodule · 92712822
      Daniel P. Berrange 提交于
      The https://gitlab.com/keycodemap/keycodemapdb/ repo contains a
      data file mapping between all the different scancode/keycode/keysym
      sets that are known, and a tool to auto-generate lookup tables for
      different combinations.
      
      It is used by GTK-VNC, SPICE-GTK and libvirt for mapping keys.
      Using it in QEMU will let us replace many hand written lookup
      tables with auto-generated tables from a master data source,
      reducing bugs. Adding new QKeyCodes will now only require the
      master table to be updated, all ~20 other tables will be
      automatically updated to follow.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 20170929101201.21039-4-berrange@redhat.com
      
      [ kraxel: fix build ]
      [ kraxel: switch repo to qemu.git mirror ]
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      92712822
    • D
      build: automatically handle GIT submodule checkout for dtc · aef45d51
      Daniel P. Berrange 提交于
      Currently if DTC is required by configure and not available in the host
      OS install, we exit with an error message telling the user to checkout a
      git submodule or install the library.
      
      This introduces automatic handling of the git submodule checkout process
      and enables it for dtc. This only runs if building from GIT, so users of
      release tarballs still need the system library install. The current state
      of the git checkout is stashed in .git-submodule-status, and a helper
      program is used to determine if this state matches the desired submodule
      state. A dependency against 'Makefile' ensures that the submodule state
      is refreshed at the start of the build process
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 20170929101201.21039-2-berrange@redhat.com
      
      [ kraxel: use /bin/sh not bash for scripts/git-submodule.sh ]
      [ kraxel: fix Makefile dependencies ]
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      
      [fixup] Makefile dep
      aef45d51
  20. 11 10月, 2017 2 次提交
  21. 26 9月, 2017 1 次提交
  22. 23 9月, 2017 2 次提交
    • P
      scsi: add multipath support to qemu-pr-helper · fe8fc5ae
      Paolo Bonzini 提交于
      Proper support of persistent reservation for multipath devices requires
      communication with the multipath daemon, so that the reservation is
      registered and applied when a path comes up.  The device mapper
      utilities provide a library to do so; this patch makes qemu-pr-helper.c
      detect multipath devices and, when one is found, delegate the operation
      to libmpathpersist.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      fe8fc5ae
    • P
      scsi: build qemu-pr-helper · b855f8d1
      Paolo Bonzini 提交于
      Introduce a privileged helper to run persistent reservation commands.
      This lets virtual machines send persistent reservations without using
      CAP_SYS_RAWIO or out-of-tree patches.  The helper uses Unix permissions
      and SCM_RIGHTS to restrict access to processes that can access its socket
      and prove that they have an open file descriptor for a raw SCSI device.
      
      The next patch will also correct the usage of persistent reservations
      with multipath devices.
      
      It would also be possible to support for Linux's IOC_PR_* ioctls in
      the future, to support NVMe devices.  For now, however, only SCSI is
      supported.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      b855f8d1
  23. 22 9月, 2017 1 次提交