1. 24 10月, 2019 2 次提交
  2. 23 10月, 2019 21 次提交
  3. 22 10月, 2019 17 次提交
    • R
      target/arm: Fix sign-extension for SMLAL* · 1ab17086
      Richard Henderson 提交于
      The 32-bit product should be sign-extended, not zero-extended.
      
      Fixes: ea96b374Reported-by: NLaurent Desnogues <laurent.desnogues@gmail.com>
      Signed-off-by: NRichard Henderson <richard.henderson@linaro.org>
      Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Tested-by: NLaurent Desnogues <laurent.desnogues@gmail.com>
      Message-id: 20190912183058.17947-1-richard.henderson@linaro.org
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      1ab17086
    • V
      block/nbd: nbd reconnect · f7651539
      Vladimir Sementsov-Ogievskiy 提交于
      Implement reconnect. To achieve this:
      
      1. add new modes:
         connecting-wait: means, that reconnecting is in progress, and there
           were small number of reconnect attempts, so all requests are
           waiting for the connection.
         connecting-nowait: reconnecting is in progress, there were a lot of
           attempts of reconnect, all requests will return errors.
      
         two old modes are used too:
         connected: normal state
         quit: exiting after fatal error or on close
      
      Possible transitions are:
      
         * -> quit
         connecting-* -> connected
         connecting-wait -> connecting-nowait (transition is done after
                            reconnect-delay seconds in connecting-wait mode)
         connected -> connecting-wait
      
      2. Implement reconnect in connection_co. So, in connecting-* mode,
          connection_co, tries to reconnect unlimited times.
      
      3. Retry nbd queries on channel error, if we are in connecting-wait
          state.
      Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-Id: <20191009084158.15614-3-vsementsov@virtuozzo.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      f7651539
    • V
      qemu-coroutine-sleep: introduce qemu_co_sleep_wake · 3d692649
      Vladimir Sementsov-Ogievskiy 提交于
      Introduce a function to gracefully wake a coroutine sleeping in
      qemu_co_sleep_ns().
      Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20191009084158.15614-2-vsementsov@virtuozzo.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      3d692649
    • P
      Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20191022' into staging · f9bec781
      Peter Maydell 提交于
      s390x fixes in tcg vector instruction handling and in the
      cpu model code
      
      # gpg: Signature made Tue 22 Oct 2019 10:51:07 BST
      # gpg:                using RSA key C3D0D66DC3624FF6A8C018CEDECF6B93C6F02FAF
      # gpg:                issuer "cohuck@redhat.com"
      # gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>" [unknown]
      # gpg:                 aka "Cornelia Huck <huckc@linux.vnet.ibm.com>" [full]
      # gpg:                 aka "Cornelia Huck <cornelia.huck@de.ibm.com>" [full]
      # gpg:                 aka "Cornelia Huck <cohuck@kernel.org>" [unknown]
      # gpg:                 aka "Cornelia Huck <cohuck@redhat.com>" [unknown]
      # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF
      
      * remotes/cohuck/tags/s390x-20191022:
        s390x/kvm: Set default cpu model for all machine classes
        s390x/tcg: Fix VECTOR SUBTRACT WITH BORROW COMPUTE BORROW INDICATION
        s390x/tcg: Fix VECTOR SUBTRACT WITH BORROW INDICATION
        s390x/tcg: Fix VECTOR SUBTRACT COMPUTE BORROW INDICATION
        s390x/tcg: Fix VECTOR SHIFT RIGHT ARITHMETIC BY BYTE
        s390x/tcg: Fix VECTOR MULTIPLY AND ADD *
        s390x/tcg: Fix VECTOR MULTIPLY LOGICAL ODD
        s390x/mmu: Remove duplicate check for MMU_DATA_STORE
        s390x/cpumodel: Add missing visit_free
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      f9bec781
    • P
      qapi: Allow introspecting fix for savevm's cooperation with blockdev · 5f76a7aa
      Peter Krempa 提交于
      'savevm' was buggy as it considered all monitor-owned block device
      nodes for snapshot. With the introduction of -blockdev, the common
      usage made all nodes including protocol and backing file nodes be
      monitor-owned and thus considered for snapshot.
      
      This is a problem since the 'file' protocol nodes can't have internal
      snapshots and it does not make sense to take snapshot of nodes
      representing backing files.
      
      This was fixed by commit 05f4aced. Clients need to be able to
      detect whether this fix is present.
      
      Since savevm does not have an QMP alternative, add the feature for the
      'human-monitor-command' backdoor which is used to call this command in
      modern use.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20191018081454.21369-6-armbru@redhat.com>
      5f76a7aa
    • M
      tests/qapi-schema: Cover feature documentation comments · 79598c8a
      Markus Armbruster 提交于
      Commit 8aa3a33e "tests/qapi-schema: Test for good feature lists in
      structs" neglected to cover documentation comments, and the previous
      commit followed its example.  Make up for them.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20191018081454.21369-5-armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      79598c8a
    • P
      tests: qapi: Test 'features' of commands · 2e2e0df2
      Peter Krempa 提交于
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20191018081454.21369-4-armbru@redhat.com>
      2e2e0df2
    • P
      qapi: Add feature flags to commands · 23394b4c
      Peter Krempa 提交于
      Similarly to features for struct types introduce the feature flags also
      for commands. This will allow notifying management layers of fixes and
      compatible changes in the behaviour of a command which may not be
      detectable any other way.
      
      The changes were heavily inspired by commit 6a8c0b51.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20191018081454.21369-3-armbru@redhat.com>
      23394b4c
    • M
      tests/qapi-schema: Tidy up test output indentation · 758f272b
      Markus Armbruster 提交于
      Command and event details are indented three spaces, everything else
      four.  Messed up in commit 156402e5.  Use four spaces consistently.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
      Message-Id: <20191018081454.21369-2-armbru@redhat.com>
      758f272b
    • M
      qapi: Clear scripts/qapi/doc.py executable bits again · 02ac641a
      Markus Armbruster 提交于
      Commit fbf09a2f "qapi: add 'ifcond' to visitor methods" brought back
      the executable bits.  Fix that.  Drop the #! line for good measure.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20191018074345.24034-8-armbru@redhat.com>
      02ac641a
    • M
      qapi: Split up scripts/qapi/common.py · e6c42b96
      Markus Armbruster 提交于
      The QAPI code generator clocks in at some 3100 SLOC in 8 source files.
      Almost 60% of the code is in qapi/common.py.  Split it into more
      focused modules:
      
      * Move QAPISchemaPragma and QAPISourceInfo to qapi/source.py.
      
      * Move QAPIError and its sub-classes to qapi/error.py.
      
      * Move QAPISchemaParser and QAPIDoc to parser.py.  Use the opportunity
        to put QAPISchemaParser first.
      
      * Move check_expr() & friends to qapi/expr.py.  Use the opportunity to
        put the code into a more sensible order.
      
      * Move QAPISchema & friends to qapi/schema.py
      
      * Move QAPIGen and its sub-classes, ifcontext,
        QAPISchemaModularCVisitor, and QAPISchemaModularCVisitor to qapi/gen.py
      
      * Delete camel_case(), it's unused since commit e98859a9 "qapi:
        Clean up after recent conversions to QAPISchemaVisitor"
      
      A number of helper functions remain in qapi/common.py.  I considered
      moving the code generator helpers to qapi/gen.py, but decided not to.
      Perhaps we should rewrite them as methods of QAPIGen some day.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20191018074345.24034-7-armbru@redhat.com>
      [Add "# -*- coding: utf-8 -*-" lines]
      e6c42b96
    • P
      Merge remote-tracking branch 'remotes/vivier2/tags/trivial-branch-pull-request' into staging · 2152e740
      Peter Maydell 提交于
      Documentation update and a typo fix
      
      # gpg: Signature made Tue 22 Oct 2019 09:25:35 BST
      # gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
      # gpg:                issuer "laurent@vivier.eu"
      # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
      # gpg:                 aka "Laurent Vivier <laurent@vivier.eu>" [full]
      # gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]
      # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C
      
      * remotes/vivier2/tags/trivial-branch-pull-request:
        tests/migration: fix a typo in comment
        qemu-doc: Remove paragraph about requiring a HD image with -kernel
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      2152e740
    • P
      Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-4.2-pull-request' into staging · 419af24e
      Peter Maydell 提交于
      sockaddr alignment fixes, strace update and fd-trans fix.
      
      # gpg: Signature made Tue 22 Oct 2019 09:10:44 BST
      # gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
      # gpg:                issuer "laurent@vivier.eu"
      # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
      # gpg:                 aka "Laurent Vivier <laurent@vivier.eu>" [full]
      # gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]
      # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C
      
      * remotes/vivier2/tags/linux-user-for-4.2-pull-request:
        linux-user/syscall: Align target_sockaddr fields using ABI types
        linux-user/strace: Let print_sockaddr() have a 'last' argument
        linux-user/strace: Improve bind() output
        linux-user/strace: Add print_sockfd()
        linux-user/strace: Dump AF_NETLINK sockaddr content
        linux-user/syscall: Introduce target_sockaddr_nl
        linux-user/strace: Improve settimeofday()
        linux-user/strace: Add print_timezone()
        linux-user/strace: Display invalid pointer in print_timeval()
        Fix unsigned integer underflow in fd-trans.c
        linux-user: add strace for dup3
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      419af24e
    • M
      qapi: Move gen_enum(), gen_enum_lookup() back to qapi/types.py · 61bfb2e1
      Markus Armbruster 提交于
      The next commit will split up qapi/common.py.  gen_enum() needs
      QAPISchemaEnumMember, and that's in the way.  Move it to qapi/types.py
      along with its buddy gen_enum_lookup().
      
      Permit me a short a digression on history: how did gen_enum() end up
      in qapi/common.py?  Commit 21cd70df "qapi script: add event support"
      duplicated qapi-types.py's gen_enum() and gen_enum_lookup() in
      qapi-event.py.  Simply importing them would have been cleaner, but
      wasn't possible as qapi-types.py was a program, not a module.  Commit
      efd2eaa6 "qapi: De-duplicate enum code generation" de-duplicated by
      moving them to qapi.py, which was a module.
      
      Since then, program qapi-types.py has morphed into module types.py.
      It's where gen_enum() and gen_enum_lookup() started, and where they
      belong.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20191018074345.24034-6-armbru@redhat.com>
      61bfb2e1
    • M
      qapi: Speed up frontend tests · f01338cc
      Markus Armbruster 提交于
      "make check-qapi-schema" takes around 10s user + system time for me.
      With -j, it takes a bit over 3s real time.  We have worse tests.  It's
      still annoying when you work on the QAPI generator.
      
      Some 1.4s user + system time is consumed by make figuring out what to
      do, measured by making a target that does nothing.  There's nothing I
      can do about that right now.  But let's see what we can do about the
      other 8s.
      
      Almost 7s are spent running test-qapi.py for every test case, the rest
      normalizing and diffing test-qapi.py output.  We have 190 test cases.
      
      If I downgrade to python2, it's 4.5s, but python2 is a goner.
      
      Hacking up test-qapi.py to exit(0) without doing anything makes it
      only marginally faster.  The problem is Python startup overhead.
      
      Our configure puts -B into $(PYTHON).  Running without -B is faster:
      4.4s.
      
      We could improve the Makefile to run test cases only when the test
      case or the generator changed.  But I'm after improvement in the case
      where the generator changed.
      
      test-qapi.py is designed to be the simplest possible building block
      for a shell script to do the complete job (it's actually a Makefile,
      not a shell script; no real difference).  Python is just not meant for
      that.  It's for bigger blocks.
      
      Move the post-processing and diffing into test-qapi.py, and make it
      capable of testing multiple schema files.  Set executable bits while
      there.
      
      Running it once per test case now takes slightly longer than 8s.  But
      running it once for all of them takes under 0.2s.
      
      Messing with the Makefile to run it only on the tests that need
      retesting is clearly not worth the bother.
      
      Expected error output changes because the new normalization strips off
      $(SRCDIR)/tests/qapi-schema/ instead of just $(SRCDIR)/.
      
      The .exit files go away, because there is no exit status to test
      anymore.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20191018074345.24034-5-armbru@redhat.com>
      f01338cc
    • M
      qapi: Eliminate accidental global frontend state · 0002b557
      Markus Armbruster 提交于
      The frontend can't be run more than once due to its global state.
      A future commit will want to do that.
      
      The only global frontend state remaining is accidental:
      QAPISchemaParser.__init__()'s parameter previously_included=[].
      Python evaluates the default once, at definition time.  Any
      modifications to it are visible in subsequent calls.  Well-known
      Python trap.  Change the default to None and replace it by the real
      default in the function body.  Use the opportunity to convert
      previously_included to a set.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20191018074345.24034-4-armbru@redhat.com>
      0002b557
    • M
      qapi: Store pragma state in QAPISourceInfo, not global state · 2a7bbedd
      Markus Armbruster 提交于
      The frontend can't be run more than once due to its global state.
      A future commit will want to do that.
      
      Recent commit "qapi: Move context-sensitive checking to the proper
      place" got rid of many global variables already, but pragma state is
      still stored in global variables (that's why a pragma directive's
      scope is the complete schema).
      
      Move the pragma state to QAPISourceInfo.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20191018074345.24034-3-armbru@redhat.com>
      2a7bbedd