1. 31 5月, 2018 1 次提交
    • I
      qapi: introduce new cmd option "allow-preconfig" · d6fe3d02
      Igor Mammedov 提交于
      New option will be used to allow commands, which are prepared/need
      to run, during preconfig state. Other commands that should be able
      to run in preconfig state, should be amended to not expect machine
      in initialized state or deal with it.
      
      For compatibility reasons, commands that don't use new flag
      'allow-preconfig' explicitly are not permitted to run in
      preconfig state but allowed in all other states like they used
      to be.
      
      Within this patch allow following commands in preconfig state:
         qmp_capabilities
         query-qmp-schema
         query-commands
         query-command-line-options
         query-status
         exit-preconfig
      to allow qmp connection, basic introspection and moving to the next
      state.
      
      PS:
      set-numa-node and query-hotpluggable-cpus will be enabled later in
      a separate patches.
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Message-Id: <1526057503-39287-1-git-send-email-imammedo@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      [ehabkost: Changed "since 2.13" to "since 3.0"]
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      d6fe3d02
  2. 04 5月, 2018 1 次提交
    • L
      qapi: add SysEmuTarget to "common.json" · 9a801c7d
      Laszlo Ersek 提交于
      We'll soon need an enumeration type that lists all the softmmu targets
      that QEMU (the project) supports. Introduce @SysEmuTarget to
      "common.json".
      
      The enum constant @x86_64 doesn't match the QAPI convention of preferring
      hyphen ("-") over underscore ("_"). This is intentional; the @SysEmuTarget
      constants are supposed to produce QEMU executable names when stringified
      and appended to the "qemu-system-" prefix. Put differently, the
      replacement text of the TARGET_NAME preprocessor macro must be possible to
      look up in the list of (stringified) enum constants.
      
      Like other enum types, @SysEmuTarget too can be used for discriminator
      fields in unions. For the @i386 constant, a C-language union member called
      "i386" would be generated. On mingw build hosts, "i386" is a macro
      however. Add "i386" to "polluted_words" at once.
      
      Cc: "Daniel P. Berrange" <berrange@redhat.com>
      Cc: Eric Blake <eblake@redhat.com>
      Cc: Markus Armbruster <armbru@redhat.com>
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Message-Id: <20180427192852.15013-3-lersek@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      9a801c7d
  3. 27 3月, 2018 1 次提交
  4. 20 3月, 2018 1 次提交
  5. 03 3月, 2018 18 次提交
  6. 06 2月, 2018 6 次提交
  7. 21 12月, 2017 6 次提交
  8. 04 9月, 2017 3 次提交
  9. 01 9月, 2017 1 次提交
    • E
      qapi: Fix error handling code on alternate conflict · fda72ab4
      Eduardo Habkost 提交于
      The conflict check added by commit c0644771 ("qapi: Reject
      alternates that can't work with keyval_parse()") doesn't work
      with the following declaration:
      
        { 'alternate': 'Alt',
          'data': { 'one': 'bool',
                    'two': 'str' } }
      
      It crashes with:
      
        Traceback (most recent call last):
          File "./scripts/qapi-types.py", line 295, in <module>
            schema = QAPISchema(input_file)
          File "/home/ehabkost/rh/proj/virt/qemu/scripts/qapi.py", line 1468, in __init__
            self.exprs = check_exprs(parser.exprs)
          File "/home/ehabkost/rh/proj/virt/qemu/scripts/qapi.py", line 958, in check_exprs
            check_alternate(expr, info)
          File "/home/ehabkost/rh/proj/virt/qemu/scripts/qapi.py", line 830, in check_alternate
            % (name, key, types_seen[qtype]))
        KeyError: 'QTYPE_QSTRING'
      
      This happens because the previously-seen conflicting member
      ('one') can't be found at types_seen[qtype], but at
      types_seen['QTYPE_BOOL'].
      
      Fix the bug by moving the error check to the same loop that adds
      new items to types_seen, raising an exception if types_seen[qt]
      is already set.
      
      Add two additional test cases that can detect the bug.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170717180926.14924-1-ehabkost@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      fda72ab4
  10. 24 7月, 2017 1 次提交
  11. 12 7月, 2017 1 次提交