Skip to content
Snippets Groups Projects
  1. May 30, 2017
    • Stefan Hajnoczi's avatar
      Merge remote-tracking branch 'jtc/tags/block-pull-request' into staging · 7b6badb6
      Stefan Hajnoczi authored
      
      # gpg: Signature made Fri 26 May 2017 08:22:27 PM BST
      # gpg:                using RSA key 0xBDBE7B27C0DE3057
      # gpg: Good signature from "Jeffrey Cody <jcody@redhat.com>"
      # gpg:                 aka "Jeffrey Cody <jeff@codyprime.org>"
      # gpg:                 aka "Jeffrey Cody <codyprime@gmail.com>"
      # Primary key fingerprint: 9957 4B4D 3474 90E7 9D98  D624 BDBE 7B27 C0DE 3057
      
      * jtc/tags/block-pull-request:
        block/gluster: glfs_lseek() workaround
        blockjob: use deferred_to_main_loop to indicate the coroutine has ended
        blockjob: reorganize block_job_completed_txn_abort
        blockjob: strengthen a bit test-blockjob-txn
        blockjob: group BlockJob transaction functions together
        blockjob: introduce block_job_cancel_async, check iostatus invariants
        blockjob: move iostatus reset inside block_job_user_resume
        blockjob: separate monitor and blockjob APIs
        blockjob: introduce block_job_pause/resume_all
        blockjob: introduce block_job_early_fail
        blockjob: remove iostatus_reset callback
        blockjob: remove unnecessary check
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      7b6badb6
    • Stefan Hajnoczi's avatar
      Merge remote-tracking branch 'dgibson/tags/ppc-for-2.10-20170525' into staging · 5bb0d22c
      Stefan Hajnoczi authored
      
      ppc patch queue 2017-05-25
      
      Assorted accumulated patches.  These are nearly all bugfixes at one
      level or another - some for longstanding problems, others for some
      regressions caused by more recent cleanups.
      
      This includes preliminary patches towards fixing migration for Radix
      Page Table guests under POWER9 and also fixing some migration
      regressions due to the re-organization of the interrupt controller
      code.  Not all the pieces are there yet, so those still won't quite
      work, but the preliminary changes make sense on their own.
      
      # gpg: Signature made Thu 25 May 2017 04:50:00 AM BST
      # gpg:                using RSA key 0x6C38CACA20D9B392
      # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>"
      # gpg:                 aka "David Gibson (kernel.org) <dwg@kernel.org>"
      # gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>"
      # gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>"
      # Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392
      
      * dgibson/tags/ppc-for-2.10-20170525:
        xics: add unrealize handler
        hw/ppc/spapr.c: recover pending LMB unplug info in spapr_lmb_release
        hw/ppc: migrating the DRC state of hotplugged devices
        hw/ppc: removing drc->detach_cb and drc->detach_cb_opaque
        hw/ppc/spapr.c: adding pending_dimm_unplugs to sPAPRMachineState
        spapr: add pre_plug function for memory
        pseries: Restore support for total vcpus not a multiple of threads-per-core for old machine types
        pseries: Split CAS PVR negotiation out into a separate function
        spapr: fix error reporting in xics_system_init()
        spapr_cpu_core: drop reference on ICP object during CPU realization
        hw/ppc/spapr_events.c: removing 'exception' from sPAPREventLogEntry
        spapr: ensure core_slot isn't NULL in spapr_core_unplug()
        xics_kvm: cache already enabled vCPU ids
        spapr: Consolidate HPT freeing code into a routine
        spapr-cpu-core: release ICP object when realization fails
        spapr: sanitize error handling in spapr_ics_create()
        ppc/xics: simplify prototype of xics_spapr_init()
        target/ppc: reset reservation in do_rfi()
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      5bb0d22c
    • Stefan Hajnoczi's avatar
      Merge remote-tracking branch 'armbru/tags/pull-qapi-2017-05-23' into staging · d0eda029
      Stefan Hajnoczi authored
      
      QAPI patches for 2017-05-23
      
      # gpg: Signature made Tue 23 May 2017 12:33:32 PM BST
      # gpg:                using RSA key 0x3870B400EB918653
      # 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
      
      * armbru/tags/pull-qapi-2017-05-23:
        qapi-schema: Remove obsolete note from ObjectTypeInfo
        block: Use QDict helpers for --force-share
        shutdown: Expose bool cause in SHUTDOWN and RESET events
        shutdown: Add source information to SHUTDOWN and RESET
        shutdown: Preserve shutdown cause through replay
        shutdown: Prepare for use of an enum in reset/shutdown_request
        shutdown: Simplify shutdown_signal
        sockets: Plug memory leak in socket_address_flatten()
        scripts/qmp/qom-set: fix the value argument passed to srv.command()
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      d0eda029
    • Stefan Hajnoczi's avatar
      Merge remote-tracking branch 'ehabkost/tags/numa-pull-request' into staging · 62e570b1
      Stefan Hajnoczi authored
      
      Silence "make check" warnings on NUMA test
      
      # gpg: Signature made Tue 23 May 2017 11:44:24 AM BST
      # gpg:                using RSA key 0x2807936F984DC5A6
      # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"
      # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6
      
      * ehabkost/tags/numa-pull-request:
        numa: Silence incomplete mapping warning under qtest
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      62e570b1
  2. May 25, 2017
    • Greg Kurz's avatar
      xics: add unrealize handler · 62f94fc9
      Greg Kurz authored
      
      Now that ICPState objects get finalized on CPU unplug, we should unregister
      reset handlers as well to avoid a QEMU crash at machine reset time.
      
      Signed-off-by: default avatarGreg Kurz <groug@kaod.org>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      62f94fc9
    • Daniel Henrique Barboza's avatar
      hw/ppc/spapr.c: recover pending LMB unplug info in spapr_lmb_release · 16ee9980
      Daniel Henrique Barboza authored
      
      When a LMB hot unplug starts, the current DRC LMB status is stored at
      spapr->pending_dimm_unplugs QTAILQ. This queue isn't migrated, thus
      if a migration occurs in the middle of a LMB unplug the
      spapr_lmb_release callback will lost track of the LMB unplug progress.
      
      This patch implements a new recover function spapr_recover_pending_dimm_state
      that is used inside spapr_lmb_release to recover this DRC LMB release
      status that is lost during the migration.
      
      Signed-off-by: default avatarDaniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
      [dwg: Minor stylistic changes, simplify error handling]
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      16ee9980
    • Daniel Henrique Barboza's avatar
      hw/ppc: migrating the DRC state of hotplugged devices · a50919dd
      Daniel Henrique Barboza authored
      In pseries, a firmware abstraction called Dynamic Reconfiguration
      Connector (DRC) is used to assign a particular dynamic resource
      to the guest and provide an interface to manage configuration/removal
      of the resource associated with it. In other words, DRC is the
      'plugged state' of a device.
      
      Before this patch, DRC wasn't being migrated. This causes
      post-migration problems due to DRC state mismatch between source and
      target. The DRC state of a device X in the source might
      change, while in the target the DRC state of X is still fresh. When
      migrating the guest, X will not have the same hotplugged state as it
      did in the source. This means that we can't hot unplug X in the
      target after migration is completed because its DRC state is not consistent.
      https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1677552
      
       is one
      bug that is caused by this DRC state mismatch between source and
      target.
      
      To migrate the DRC state, we defined the VMStateDescription struct for
      spapr_drc to enable the transmission of spapr_drc state in migration.
      Not all the elements in the DRC state are migrated - only those
      that can be modified by guest actions or device add/remove
      operations:
      
      - 'isolation_state', 'allocation_state' and 'indicator_state'
      are involved in the DR state transition diagram from
      PAPR+ 2.7, 13.4;
      
      - 'configured', 'signalled', 'awaiting_release' and 'awaiting_allocation'
      are needed in attaching and detaching devices;
      
      - 'indicator_state' provides users with hardware state information.
      
      These are the DRC elements that are migrated.
      
      In this patch the DRC state is migrated for PCI, LMB and CPU
      connector types. At this moment there is no support to migrate
      DRC for the PHB (PCI Host Bridge) type.
      
      In the 'realize' function the DRC is registered using vmstate_register,
      similar to what hw/ppc/spapr_iommu.c does in 'spapr_tce_table_realize'.
      This approach works because  DRCs are bus-less and do not sit
      on a BusClass that implements bc->get_dev_path, so as a fallback the
      VMSD gets identified via "spapr_drc"/get_index(drc).
      
      Signed-off-by: default avatarDaniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      a50919dd
    • Daniel Henrique Barboza's avatar
      hw/ppc: removing drc->detach_cb and drc->detach_cb_opaque · 31834723
      Daniel Henrique Barboza authored
      
      The pointer drc->detach_cb is being used as a way of informing
      the detach() function inside spapr_drc.c which cb to execute. This
      information can also be retrieved simply by checking drc->type and
      choosing the right callback based on it. In this context, detach_cb
      is redundant information that must be managed.
      
      After the previous spapr_lmb_release change, no detach_cb_opaques
      are being used by any of the three callbacks functions. This is
      yet another information that is now unused and, on top of that, can't
      be migrated either.
      
      This patch makes the following changes:
      
      - removal of detach_cb_opaque. the 'opaque' argument was removed from
      the callbacks and from the detach() function of sPAPRConnectorClass. The
      attribute detach_cb_opaque of sPAPRConnector was removed.
      
      - removal of detach_cb from the detach() call. The function pointer
      detach_cb of sPAPRConnector was removed. detach() now uses a
      switch(drc->type) to execute the apropriate callback. To achieve this,
      spapr_core_release, spapr_lmb_release and spapr_phb_remove_pci_device_cb
      callbacks were made public to be visible inside detach().
      
      Signed-off-by: default avatarDaniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      31834723
    • David Gibson's avatar
      hw/ppc/spapr.c: adding pending_dimm_unplugs to sPAPRMachineState · 0cffce56
      David Gibson authored
      
      The LMB DRC release callback, spapr_lmb_release(), uses an opaque
      parameter, a sPAPRDIMMState struct that stores the current LMBs that
      are allocated to a DIMM (nr_lmbs). After each call to this callback,
      the nr_lmbs is decremented by one and, when it reaches zero, the callback
      proceeds with the qdev calls to hot unplug the LMB.
      
      Using drc->detach_cb_opaque is problematic because it can't be migrated in
      the future DRC migration work. This patch makes the following changes to
      eliminate the usage of this opaque callback inside spapr_lmb_release:
      
      - sPAPRDIMMState was moved from spapr.c and added to spapr.h. A new
      attribute called 'addr' was added to it. This is used as an unique
      identifier to associate a sPAPRDIMMState to a PCDIMM element.
      
      - sPAPRMachineState now hosts a new QTAILQ called 'pending_dimm_unplugs'.
      This queue of sPAPRDIMMState elements will store the DIMM state of DIMMs
      that are currently going under an unplug process.
      
      - spapr_lmb_release() will now retrieve the nr_lmbs value by getting the
      correspondent sPAPRDIMMState. A helper function called spapr_dimm_get_address
      was created to fetch the address of a PCDIMM device inside spapr_lmb_release.
      When nr_lmbs reaches zero and the callback proceeds with the qdev hot unplug
      calls, the sPAPRDIMMState struct is removed from spapr->pending_dimm_unplugs.
      
      After these changes, the opaque argument for spapr_lmb_release is now
      unused and is passed as NULL inside spapr_del_lmbs. This and the other
      opaque arguments can now be safely removed from the code.
      
      As an additional cleanup made by this patch, the spapr_del_lmbs function
      was merged with spapr_memory_unplug_request. The former was being called
      only by the latter and both were small enough to fit one single function.
      
      Signed-off-by: default avatarDaniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
      [dwg: Minor stylistic cleanups]
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      0cffce56
  3. May 24, 2017
  4. May 23, 2017
    • Stefan Hajnoczi's avatar
      Merge remote-tracking branch 'jasowang/tags/net-pull-request' into staging · 9964e96d
      Stefan Hajnoczi authored
      
      # gpg: Signature made Tue 23 May 2017 03:27:37 AM BST
      # gpg:                using RSA key 0xEF04965B398D6211
      # gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>"
      # Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211
      
      * jasowang/tags/net-pull-request:
        e1000e: Fix ICR "Other" causes clear logic
        net/filter-rewriter: Remove unused option in filter-rewriter
        net/filter-mirror.c: Rename filter_mirror_send() and fix codestyle
        net/filter-mirror.c: Remove duplicate check code.
        hmp / net: Mark host_net_add/remove as deprecated
        COLO-compare: Improve tcp compare trace event readability
        virtio-net: fix wild pointer when remove virtio-net queues
        net/dump: Issue a warning for the deprecated "-net dump"
        net/tap: Replace tap-haiku.c and tap-aix.c by a generic tap-stub.c
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      9964e96d
    • Eduardo Habkost's avatar
      qapi-schema: Remove obsolete note from ObjectTypeInfo · 8c1bc1e9
      Eduardo Habkost authored
      
      The "This command is experimental" note in ObjectTypeInfo is obsolete
      since 2012.  Commit 51920820 removed the
      warning from the qom-list-types command documentation, but we forgot to
      remove the warning from ObjectTypeInfo.
      
      Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170516205351.12101-1-ehabkost@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      8c1bc1e9
    • Eric Blake's avatar
      block: Use QDict helpers for --force-share · 579cf1d1
      Eric Blake authored
      
      Fam's addition of --force-share in commits 459571f7 and 335e9937
      were developed prior to the addition of QDict scalar insertion
      macros, but merged after the general cleanup in commit 46f5ac20.
      Patch created mechanically by rerunning:
      
       spatch --sp-file scripts/coccinelle/qobject.cocci \
              --macro-file scripts/cocci-macro-file.h --dir . --in-place
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20170515195439.17677-1-eblake@redhat.com>
      Reviewed-by: default avatarFam Zheng <famz@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      579cf1d1
    • Eric Blake's avatar
      shutdown: Expose bool cause in SHUTDOWN and RESET events · 08fba7ac
      Eric Blake authored
      Libvirt would like to be able to distinguish between a SHUTDOWN
      event triggered solely by guest request and one triggered by a
      SIGTERM or other action on the host.  While qemu_kill_report() was
      already able to give different output to stderr based on whether a
      shutdown was triggered by a host signal (but NOT by a host UI event,
      such as clicking the X on the window), that information was then
      lost to management.  The previous patches improved things to use an
      enum throughout all callsites, so now we have something ready to
      expose through QMP.
      
      Note that for now, the decision was to expose ONLY a boolean,
      rather than promoting ShutdownCause to a QAPI enum; this is because
      libvirt has not expressed an interest in anything finer-grained.
      We can still add additional details, in a backwards-compatible
      manner, if a need later arises (if the addition happens before 2.10,
      we can replace the bool with an enum; otherwise, the enum will have
      to be in addition to the bool); this patch merely adds a helper
      shutdown_caused_by_guest() to map the internal enum into the
      external boolean.
      
      Update expected iotest outputs to match the new data (complete
      coverage of the affected tests is obtained by -raw, -qcow2, and -nbd).
      
      Here is output from 'virsh qemu-monitor-event --loop' with the
      patch installed:
      
      event SHUTDOWN at 1492639680.731251 for domain fedora_13: {"guest":true}
      event STOP at 1492639680.732116 for domain fedora_13: <null>
      event SHUTDOWN at 1492639680.732830 for domain fedora_13: {"guest":false}
      
      Note that libvirt runs qemu with -no-shutdown: the first SHUTDOWN event
      was triggered by an action I took directly in the guest (shutdown -h),
      at which point qemu stops the vcpus and waits for libvirt to do any
      final cleanups; the second SHUTDOWN event is the result of libvirt
      sending SIGTERM now that it has completed cleanup.  Libvirt is already
      smart enough to only feed the first qemu SHUTDOWN event to the end user
      (remember, virsh qemu-monitor-event is a low-level debugging interface
      that is explicitly unsupported by libvirt, so it sees things that normal
      end users do not); changing qemu to emit SHUTDOWN only once is outside
      the scope of this series.
      
      See also https://bugzilla.redhat.com/1384007
      
      
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20170515214114.15442-6-eblake@redhat.com>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      08fba7ac
    • Eric Blake's avatar
      shutdown: Add source information to SHUTDOWN and RESET · cf83f140
      Eric Blake authored
      
      Time to wire up all the call sites that request a shutdown or
      reset to use the enum added in the previous patch.
      
      It would have been less churn to keep the common case with no
      arguments as meaning guest-triggered, and only modified the
      host-triggered code paths, via a wrapper function, but then we'd
      still have to audit that I didn't miss any host-triggered spots;
      changing the signature forces us to double-check that I correctly
      categorized all callers.
      
      Since command line options can change whether a guest reset request
      causes an actual reset vs. a shutdown, it's easy to also add the
      information to reset requests.
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Acked-by: David Gibson <david@gibson.dropbear.id.au> [ppc parts]
      Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> [SPARC part]
      Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> [s390x parts]
      Message-Id: <20170515214114.15442-5-eblake@redhat.com>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      cf83f140
Loading