1. 17 7月, 2018 28 次提交
  2. 16 7月, 2018 12 次提交
    • P
      Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2018-07-16' into staging · 102ad0a8
      Peter Maydell 提交于
      Miscellaneous patches for 2018-07-16 (3.0.0-rc1)
      
      # gpg: Signature made Mon 16 Jul 2018 14:50:07 BST
      # gpg:                using RSA key 3870B400EB918653
      # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
      # gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>"
      # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653
      
      * remotes/armbru/tags/pull-misc-2018-07-16:
        monitor: Fix tracepoint crash on JSON syntax error
        MAINTAINERS: New section "Incompatible changes", copy libvir-list
        qemu-doc: Move appendix "Deprecated features" to its own file
        cli qmp: Mark --preconfig, exit-preconfig experimental
        qapi: Do not expose "allow-preconfig" in query-qmp-schema
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      102ad0a8
    • M
      monitor: Fix tracepoint crash on JSON syntax error · 8720e63e
      Markus Armbruster 提交于
      When tracepoint handle_qmp_command is enabled, we crash on JSON syntax
      errors.  Broken in commit 1cc37471.  Fix by skipping the tracepoint
      on JSON syntax error.  Before the flawed commit, we skipped it by
      returning early.
      
      Fixes: CID 1394216
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180716091012.29510-1-armbru@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: NPeter Xu <peterx@redhat.com>
      8720e63e
    • M
      MAINTAINERS: New section "Incompatible changes", copy libvir-list · b02c9bc3
      Markus Armbruster 提交于
      Libvirt developers would like to be copied on patches to qemu-doc
      appendix "Deprecated features".  Do them the favor.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180716073226.21127-3-armbru@redhat.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Reviewed-by: NCornelia Huck <cohuck@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      b02c9bc3
    • M
      qemu-doc: Move appendix "Deprecated features" to its own file · 44c67847
      Markus Armbruster 提交于
      Consumers of QEMU need to track feature deprecation.  Keeping
      deprecation documentation in its own file helps in two small ways:
      
      * You can track changes the easy and obvious way, with git-log.
        Before, you had to resort to more complex gittery like "git-log
        --oneline -L '/@node Deprecated features/,/@node Supported build
        platforms/:qemu-doc.texi'"
      
      * It lets us use MAINTAINERS to copy interested parties on deprecation
        patches, so they can advise or object before they're a done deal.
        The next commit will do that for libvirt.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180716073226.21127-2-armbru@redhat.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Reviewed-by: NCornelia Huck <cohuck@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      44c67847
    • M
      cli qmp: Mark --preconfig, exit-preconfig experimental · 361ac948
      Markus Armbruster 提交于
      Committing to the current --preconfig / exit-preconfig interface
      before it has seen any use is premature.  Mark both as experimental,
      the former in documentation, the latter by renaming it to
      x-exit-preconfig.
      
      See the previous commit for more detailed rationale.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180705091402.26244-3-armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Acked-by: NEduardo Habkost <ehabkost@redhat.com>
      Acked-by: NIgor Mammedov <imammedo@redhat.com>
      [Straightforward conflict with commit 514337c1 resolved]
      361ac948
    • M
      qapi: Do not expose "allow-preconfig" in query-qmp-schema · 1f214ee1
      Markus Armbruster 提交于
      According to commit 047f7038, option --preconfig
      
          [...] allows pausing QEMU in the new RUN_STATE_PRECONFIG state,
          allowing the configuration of QEMU from QMP before the machine
          jumps into board initialization code of machine_run_board_init()
      
          The intent is to allow management to query machine state and
          additionally configure it using previous query results within one
          QEMU instance (i.e. eliminate the need to start QEMU twice, 1st to
          query board specific parameters and 2nd for actual VM start using
          query results for additional parameters).
      
      The implementation is a bit of a hack: it splices in an additional
      main loop before machine creation, in special runstate preconfig.  New
      command exit-preconfig exits that main loop.  QEMU continues
      initializing, creates the machine, and runs the good old main loop.
      The replacement of the main loop is transparent to monitors.
      
      Sadly, some commands expect initialization to be complete.  Running
      them in --preconfig's main loop violates their preconditions.  Since
      we don't really know which commands are safe, we use a whitelist.
      This drags the concept of run state into the QMP core.
      
      The whitelist is done as a command flag in the QAPI schema (commit
      d6fe3d02).  Drags the concept of run state further into the QAPI
      language.
      
      The command flag is exposed in query-qmp-schema (also commit
      d6fe3d02).  This makes it ABI.
      
      I consider the whole thing an offensively ugly hack, but sometimes an
      ugly hack is the best we can do to solve a problem people have.
      
      The need described by the commit message quote above is genuine.  The
      proper solution would be a main loop that permits complete
      configuration via QMP.  This is out of reach, thus the hack.
      
      However, even though the need is genuine, it isn't urgent: libvirt is
      not going to use this anytime soon.  Baking a hack into ABI before it
      has any users is a bad idea.
      
      This commit reverts the parts of commit d6fe3d02 that affect ABI
      via query-qmp-schema.  The commit did the following:
      
      (1) Add command flag 'allow-preconfig' to the QAPI schema language
      
      (2) Pass it to code generators
      
      (3) Have the commands.py code generator pass it to the command
          registry (so commit 047f7038 can use it as whitelist)
      
      (4) Add 'allow-preconfig' to SchemaInfoCommand (neglecting to update
          qapi-code-gen.txt section "Client JSON Protocol introspection")
      
      (5) Set 'allow-preconfig': true for commands qmp_capabilities,
          query-commands, query-command-line-options, query-status
      
      Revert exactly (4), plus a bit of documentation added to
      qemu-tech.info in commit 047f7038.
      
      Shrinks query-qmp-schema's output from 126.5KiB to 121.8KiB for me.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180705091402.26244-2-armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Acked-by: NEduardo Habkost <ehabkost@redhat.com>
      Acked-by: NIgor Mammedov <imammedo@redhat.com>
      [Straightforward conflict with commit d626b6c1 resolved]
      1f214ee1
    • P
      Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-3.0-20180716' into staging · 633e8240
      Peter Maydell 提交于
      ppc patch queue 2018-07-16
      
      Here's my first hard freeze pull request for qemu-3.0.  This contains
      an assortment of bugfixes. Several are for regressions, others are for
      bugs that I think are significant enough to address during hard freeze.
      
      # gpg: Signature made Mon 16 Jul 2018 09:28:37 BST
      # gpg:                using RSA key 6C38CACA20D9B392
      # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>"
      # gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>"
      # gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>"
      # gpg:                 aka "David Gibson (kernel.org) <dwg@kernel.org>"
      # Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392
      
      * remotes/dgibson/tags/ppc-for-3.0-20180716:
        sm501: Fix warning about unreachable code
        sam460ex: Correct use after free error
        etsec: fix IRQ (un)masking
        ppc/xics: fix ICP reset path
        spapr: Correct inverted test in spapr_pc_dimm_node()
        sm501: Update screen on frame buffer address change
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      633e8240
    • P
      Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-3.0-pull-request' into staging · b808d200
      Peter Maydell 提交于
      Some fixes for linux-user:
      - workaround for CMSG_NXTHDR bug
      - two patches for ppc64/ppc64le host:
        fix fcntl() with *LK64 commands
        (seen when dpkg wants to lock the DB)
        fix reserved_va alignment (ppc64 needs
        a 64kB alignment)
      - convert a forgotten fcntl() to safe_fcntl()
      
      # gpg: Signature made Sun 15 Jul 2018 20:51:19 BST
      # gpg:                using RSA key F30C38BD3F2FBE3C
      # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>"
      # gpg:                 aka "Laurent Vivier <laurent@vivier.eu>"
      # gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>"
      # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C
      
      * remotes/vivier2/tags/linux-user-for-3.0-pull-request:
        Zero out the host's `msg_control` buffer
        linux-user: fix mmap_find_vma_reserved()
        linux-user: convert remaining fcntl() to safe_fcntl()
        linux-user: ppc64: use the correct values for F_*LK64s
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      b808d200
    • B
      sm501: Fix warning about unreachable code · 6730df05
      BALATON Zoltan 提交于
      Coverity warned that the false arm of conditional expression is
      unreachable when it is inside an if with the same condition.
      Remove the unreachable code to avoid the warning.
      
      Fixes: CID 1394215
      Reported-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NBALATON Zoltan <balaton@eik.bme.hu>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      6730df05
    • B
      sam460ex: Correct use after free error · 3cc702d6
      BALATON Zoltan 提交于
      Commit 51b0d834 changed error handling to report file name in error
      message but forgot to move freeing it after usage. Noticed by Coverity.
      
      Fixes: CID 1394217
      Reported-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NBALATON Zoltan <balaton@eik.bme.hu>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      3cc702d6
    • M
      etsec: fix IRQ (un)masking · fd8e3381
      Michael Davidsaver 提交于
      Interrupt conditions occurring while masked are not being
      signaled when later unmasked.
      The fix is to raise/lower IRQs when IMASK is changed.
      
      To avoid problems like this in future, consolidate
      IRQ pin update logic in one function.
      
      Also fix probable typo "IEVENT_TXF | IEVENT_TXF",
      and update IRQ pins on reset.
      Signed-off-by: NMichael Davidsaver <mdavidsaver@gmail.com>
      Reviewed-by: NCédric Le Goater <clg@kaod.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      fd8e3381
    • G
      ppc/xics: fix ICP reset path · b585395b
      Greg Kurz 提交于
      Recent cleanup in commit a028dd42 dropped the ICPStateClass::reset
      handler. It is now up to child ICP classes to call the DeviceClass::reset
      handler of the parent class, thanks to device_class_set_parent_reset().
      This is a better object programming pattern, but unfortunately it causes
      QEMU to crash during CPU hotplug:
      
      (qemu) device_add host-spapr-cpu-core,id=core1,core-id=1
      Segmentation fault (core dumped)
      
      When the hotplug path tries to reset the ICP device, we end up calling:
      
      static void icp_kvm_reset(DeviceState *dev)
      {
          ICPStateClass *icpc = ICP_GET_CLASS(dev);
      
          icpc->parent_reset(dev);
      
      but icpc->parent_reset is NULL... This happens because icp_kvm_class_init()
      calls:
      
          device_class_set_parent_reset(dc, icp_kvm_reset,
                                        &icpc->parent_reset);
      
      but dc->reset, ie, DeviceClass::reset for the TYPE_ICP type, is
      itself NULL.
      
      This patch hence sets DeviceClass::reset for the TYPE_ICP type to
      point to icp_reset(). It then registers a reset handler that calls
      DeviceClass::reset. If the ICP subtype has configured its own reset
      handler with device_class_set_parent_reset(), this ensures it will
      be called first and it can then call ICPStateClass::parent_reset
      safely. This fixes the reset path for the TYPE_KVM_ICP type, which
      is the only subtype that defines its own reset function.
      Reported-by: NSatheesh Rajendran <sathnaga@linux.vnet.ibm.com>
      Suggested-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Fixes: a028dd42Signed-off-by: NGreg Kurz <groug@kaod.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      b585395b