1. 19 12月, 2018 1 次提交
    • P
      Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2018-12-18' into staging · adf02c44
      Peter Maydell 提交于
      QAPI patches for 2018-12-18
      
      # gpg: Signature made Tue 18 Dec 2018 07:20:11 GMT
      # 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-qapi-2018-12-18:
        qapi: fix flat union on uncovered branches conditionals
        qmp hmp: Make system_wakeup check wake-up support and run state
        qga: update guest-suspend-ram and guest-suspend-hybrid descriptions
        qmp: query-current-machine with wakeup-suspend-support
        qmp: Split ShutdownCause host-qmp into quit and system-reset
        qmp: Add reason to SHUTDOWN and RESET events
        qapi: Turn ShutdownCause into QAPI enum
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      adf02c44
  2. 18 12月, 2018 9 次提交
    • P
      Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2018-12-17' into staging · e85c5771
      Peter Maydell 提交于
      - Replace global_qtest in some tests
      - Exit boot-serial-test loop if child dies
      - Sanitize verbose output in biot-tables-test
      
      # gpg: Signature made Mon 17 Dec 2018 16:08:07 GMT
      # gpg:                using RSA key 2ED9D774FE702DB5
      # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>"
      # gpg:                 aka "Thomas Huth <thuth@redhat.com>"
      # gpg:                 aka "Thomas Huth <huth@tuxfamily.org>"
      # gpg:                 aka "Thomas Huth <th.huth@posteo.de>"
      # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5
      
      * remotes/huth-gitlab/tags/pull-request-2018-12-17:
        tests/bios-tables-test: Sanitize test verbose output
        tests: acpi: remove not used ACPI_READ_GENERIC_ADDRESS macro
        tests: Exit boot-serial-test loop if child dies
        tests/pxe: Make test independent of global_qtest
        tests/prom-env: Make test independent of global_qtest
        tests/machine-none: Make test independent of global_qtest
        tests/test-filter: Make tests independent of global_qtest
        tests/boot-serial: Get rid of global_qtest variable
        tests/pvpanic: Make the pvpanic test independent of global_qtest
        tests/vmgenid: Make test independent of global_qtest
        tests/acpi-utils: Drop dependence on global_qtest
        ivshmem-test: Drop dependence on global_qtest
        tests/libqos/pci: Make PCI access functions independent of global_qtest
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      e85c5771
    • M
      qapi: fix flat union on uncovered branches conditionals · ce1a1aec
      Marc-André Lureau 提交于
      Default branches variant should use the member conditional.
      
      This fixes compilation with --disable-replication.
      
      Fixes: 335d10cdSigned-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <20181217204046.14861-1-marcandre.lureau@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      [Long line wrapped]
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      ce1a1aec
    • D
      qmp hmp: Make system_wakeup check wake-up support and run state · fb064112
      Daniel Henrique Barboza 提交于
      The qmp/hmp command 'system_wakeup' is simply a direct call to
      'qemu_system_wakeup_request' from vl.c. This function verifies if
      runstate is SUSPENDED and if the wake up reason is valid before
      proceeding. However, no error or warning is thrown if any of those
      pre-requirements isn't met. There is no way for the caller to
      differentiate between a successful wakeup or an error state caused
      when trying to wake up a guest that wasn't suspended.
      
      This means that system_wakeup is silently failing, which can be
      considered a bug. Adding error handling isn't an API break in this
      case - applications that didn't check the result will remain broken,
      the ones that check it will have a chance to deal with it.
      
      Adding to that, the commit before previous created a new QMP API called
      query-current-machine, with a new flag called wakeup-suspend-support,
      that indicates if the guest has the capability of waking up from suspended
      state. Although such guest will never reach SUSPENDED state and erroring
      it out in this scenario would suffice, it is more informative for the user
      to differentiate between a failure because the guest isn't suspended versus
      a failure because the guest does not have support for wake up at all.
      
      All this considered, this patch changes qmp_system_wakeup to check if
      the guest is capable of waking up from suspend, and if it is suspended.
      After this patch, this is the output of system_wakeup in a guest that
      does not have wake-up from suspend support (ppc64):
      
      (qemu) system_wakeup
      wake-up from suspend is not supported by this guest
      (qemu)
      
      And this is the output of system_wakeup in a x86 guest that has the
      support but isn't suspended:
      
      (qemu) system_wakeup
      Unable to wake up: guest is not in suspended state
      (qemu)
      Reported-by: NBalamuruhan S <bala24@linux.vnet.ibm.com>
      Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Message-Id: <20181205194701.17836-4-danielhb413@gmail.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Acked-by: NEduardo Habkost <ehabkost@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      fb064112
    • D
      qga: update guest-suspend-ram and guest-suspend-hybrid descriptions · f8a57777
      Daniel Henrique Barboza 提交于
      This patch updates the descriptions of 'guest-suspend-ram' and
      'guest-suspend-hybrid' to mention that both commands relies now
      on the proper support for wake up from suspend, retrieved by the
      'wakeup-suspend-support' attribute of the 'query-current-machine'
      QMP command.
      Reported-by: NBalamuruhan S <bala24@linux.vnet.ibm.com>
      Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Message-Id: <20181205194701.17836-3-danielhb413@gmail.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Acked-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      f8a57777
    • D
      qmp: query-current-machine with wakeup-suspend-support · 46ea94ca
      Daniel Henrique Barboza 提交于
      When issuing the qmp/hmp 'system_wakeup' command, what happens in a
      nutshell is:
      
      - qmp_system_wakeup_request set runstate to RUNNING, sets a wakeup_reason
      and notify the event
      - in the main_loop, all vcpus are paused, a system reset is issued, all
      subscribers of wakeup_notifiers receives a notification, vcpus are then
      resumed and the wake up QAPI event is fired
      
      Note that this procedure alone doesn't ensure that the guest will awake
      from SUSPENDED state - the subscribers of the wake up event must take
      action to resume the guest, otherwise the guest will simply reboot. At
      this moment, only the ACPI machines via acpi_pm1_cnt_init and xen_hvm_init
      have wake-up from suspend support.
      
      However, only the presence of 'system_wakeup' is required for QGA to
      support 'guest-suspend-ram' and 'guest-suspend-hybrid' at this moment.
      This means that the user/management will expect to suspend the guest using
      one of those suspend commands and then resume execution using system_wakeup,
      regardless of the support offered in system_wakeup in the first place.
      
      This patch creates a new API called query-current-machine [1], that holds
      a new flag called 'wakeup-suspend-support' that indicates if the guest
      supports wake up from suspend via system_wakeup. The machine is considered
      to implement wake-up support if a call to a new 'qemu_register_wakeup_support'
      is made during its init, as it is now being done inside acpi_pm1_cnt_init
      and xen_hvm_init. This allows for any other machine type to declare wake-up
      support regardless of ACPI state or wakeup_notifiers subscription, making easier
      for newer implementations that might have their own mechanisms in the future.
      
      This is the expected output of query-current-machine when running a x86
      guest:
      
      {"execute" : "query-current-machine"}
      {"return": {"wakeup-suspend-support": true}}
      
      Running the same x86 guest, but with the --no-acpi option:
      
      {"execute" : "query-current-machine"}
      {"return": {"wakeup-suspend-support": false}}
      
      This is the output when running a pseries guest:
      
      {"execute" : "query-current-machine"}
      {"return": {"wakeup-suspend-support": false}}
      
      With this extra tool, management can avoid situations where a guest
      that does not have proper suspend/wake capabilities ends up in
      inconsistent state (e.g.
      https://github.com/open-power-host-os/qemu/issues/31).
      
      [1] the decision of creating the query-current-machine API is based
      on discussions in the QEMU mailing list where it was decided that
      query-target wasn't a proper place to store the wake-up flag, neither
      was query-machines because this isn't a static property of the
      machine object. This new API can then be used to store other
      dynamic machine properties that are scattered around the code
      ATM. More info at:
      https://lists.gnu.org/archive/html/qemu-devel/2018-05/msg04235.htmlReported-by: NBalamuruhan S <bala24@linux.vnet.ibm.com>
      Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Message-Id: <20181205194701.17836-2-danielhb413@gmail.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Acked-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      46ea94ca
    • D
      qmp: Split ShutdownCause host-qmp into quit and system-reset · 92548938
      Dominik Csapak 提交于
      It is interesting to know whether the shutdown cause was 'quit' or
      'reset', especially when using "--no-reboot". In that case, a management
      layer can now determine if the guest wanted a reboot or shutdown, and
      can act accordingly.
      
      Changes the output of the reason in the iotests from 'host-qmp' to
      'host-qmp-quit'. This does not break compatibility because
      the field was introduced in the same version.
      Signed-off-by: NDominik Csapak <d.csapak@proxmox.com>
      Message-Id: <20181205110131.23049-4-d.csapak@proxmox.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      [Commit message tweaked]
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      92548938
    • D
      qmp: Add reason to SHUTDOWN and RESET events · ecd7a0d5
      Dominik Csapak 提交于
      This makes it possible to determine what the exact reason was for
      a RESET or a SHUTDOWN. A management layer might need the specific reason
      of those events to determine which cleanups or other actions it needs to do.
      
      This patch also updates the iotests to the new expected output that includes
      the reason.
      Signed-off-by: NDominik Csapak <d.csapak@proxmox.com>
      Message-Id: <20181205110131.23049-3-d.csapak@proxmox.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      [Commit message tweaked]
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      ecd7a0d5
    • D
      qapi: Turn ShutdownCause into QAPI enum · d43013e2
      Dominik Csapak 提交于
      Needed so the patch after next can add ShutdownCause to QMP events
      SHUTDOWN and RESET.
      Signed-off-by: NDominik Csapak <d.csapak@proxmox.com>
      Message-Id: <20181205110131.23049-2-d.csapak@proxmox.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      d43013e2
    • P
      Merge remote-tracking branch 'remotes/stsquad/tags/pull-hardfloat-and-gitdm-171218-3' into staging · ec3c927f
      Peter Maydell 提交于
      Hardfloat + maintainers and gitdm
      
      # gpg: Signature made Mon 17 Dec 2018 10:55:19 GMT
      # gpg:                using RSA key FBD0DB095A9E2A44
      # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>"
      # Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44
      
      * remotes/stsquad/tags/pull-hardfloat-and-gitdm-171218-3:
        hardfloat: implement float32/64 comparison
        hardfloat: implement float32/64 square root
        hardfloat: implement float32/64 fused multiply-add
        hardfloat: implement float32/64 division
        hardfloat: implement float32/64 multiplication
        hardfloat: implement float32/64 addition and subtraction
        fpu: introduce hardfloat
        tests/fp: add fp-bench
        softfloat: add float{32,64}_is_zero_or_normal
        softfloat: rename canonicalize to sf_canonicalize
        target/tricore: use float32_is_denormal
        softfloat: add float{32,64}_is_{de,}normal
        fp-test: pick TARGET_ARM to get its specialization
        MAINTAINERS: update status of FPU emulation
        contrib: add a basic gitdm config
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      ec3c927f
  3. 17 12月, 2018 30 次提交