1. 30 5月, 2017 7 次提交
    • S
      Merge remote-tracking branch 'kraxel/tags/pull-usb-20170529-1' into staging · 697e42de
      Stefan Hajnoczi 提交于
      usb: depricate legacy options and hmp commands
      usb: fixes for ehci and hub, split xhci variants
      
      # gpg: Signature made Mon 29 May 2017 02:07:17 PM BST
      # gpg:                using RSA key 0x4CB6D8EED3E87138
      # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
      # gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
      # gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
      # Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138
      
      * kraxel/tags/pull-usb-20170529-1:
        ehci: fix frame timer invocation.
        usb: don't wakeup during coldplug
        usb-hub: set PORT_STAT_C_SUSPEND on host-initiated wake-up
        xhci: add CONFIG_USB_XHCI_NEC option
        xhci: split into multiple files
        usb: Simplify the parameter parsing of the legacy usb serial device
        usb: Deprecate HMP commands usb_add and usb_del
        usb: Deprecate the legacy -usbdevice option
        ehci: fix overflow in frame timer code
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      697e42de
    • S
      Merge remote-tracking branch 'mst/tags/for_upstream' into staging · a3203e7d
      Stefan Hajnoczi 提交于
      pci, virtio, vhost: fixes
      
      A bunch of fixes all over the place. Most notably this fixes
      the new MTU feature when using vhost.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      
      # gpg: Signature made Mon 29 May 2017 01:10:24 AM BST
      # gpg:                using RSA key 0x281F0DB8D28D5469
      # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>"
      # gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>"
      # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
      #      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469
      
      * mst/tags/for_upstream:
        acpi-test: update expected files
        pc: ACPI BIOS: use highest NUMA node for hotplug mem hole SRAT entry
        vhost-user: pass message as a pointer to process_message_reply()
        virtio_net: Bypass backends for MTU feature negotiation
        intel_iommu: turn off pt before 2.9
        intel_iommu: support passthrough (PT)
        intel_iommu: allow dev-iotlb context entry conditionally
        intel_iommu: use IOMMU_ACCESS_FLAG()
        intel_iommu: provide vtd_ce_get_type()
        intel_iommu: renaming context entry helpers
        x86-iommu: use DeviceClass properties
        memory: remove the last param in memory_region_iommu_replay()
        memory: tune last param of iommu_ops.translate()
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      a3203e7d
    • S
      Merge remote-tracking branch 'sthibault/tags/samuel-thibault' into staging · 08f44282
      Stefan Hajnoczi 提交于
      slirp updates
      
      # gpg: Signature made Sat 27 May 2017 10:36:33 PM BST
      # gpg:                using RSA key 0xB0A51BF58C9179C5
      # gpg: Good signature from "Samuel Thibault <samuel.thibault@aquilenet.fr>"
      # gpg:                 aka "Samuel Thibault <sthibault@debian.org>"
      # gpg:                 aka "Samuel Thibault <samuel.thibault@gnu.org>"
      # gpg:                 aka "Samuel Thibault <samuel.thibault@inria.fr>"
      # gpg:                 aka "Samuel Thibault <samuel.thibault@labri.fr>"
      # gpg:                 aka "Samuel Thibault <samuel.thibault@ens-lyon.org>"
      # gpg:                 aka "Samuel Thibault <samuel.thibault@u-bordeaux.fr>"
      # Primary key fingerprint: 900C B024 B679 31D4 0F82  304B D017 8C76 7D06 9EE6
      #      Subkey fingerprint: AEBF 7448 FAB9 453A 4552  390E B0A5 1BF5 8C91 79C5
      
      * sthibault/tags/samuel-thibault:
        Fix total IP header length in forwarded TCP packets
        slirp: fix leak
        slirp: Fix wrong mss bug.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      08f44282
    • S
      Merge remote-tracking branch 'jtc/tags/block-pull-request' into staging · 7b6badb6
      Stefan Hajnoczi 提交于
      # 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: NStefan Hajnoczi <stefanha@redhat.com>
      7b6badb6
    • S
      Merge remote-tracking branch 'dgibson/tags/ppc-for-2.10-20170525' into staging · 5bb0d22c
      Stefan Hajnoczi 提交于
      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: NStefan Hajnoczi <stefanha@redhat.com>
      5bb0d22c
    • S
      Merge remote-tracking branch 'armbru/tags/pull-qapi-2017-05-23' into staging · d0eda029
      Stefan Hajnoczi 提交于
      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: NStefan Hajnoczi <stefanha@redhat.com>
      d0eda029
    • S
      Merge remote-tracking branch 'ehabkost/tags/numa-pull-request' into staging · 62e570b1
      Stefan Hajnoczi 提交于
      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: NStefan Hajnoczi <stefanha@redhat.com>
      62e570b1
  2. 29 5月, 2017 11 次提交
  3. 28 5月, 2017 3 次提交
  4. 26 5月, 2017 11 次提交
  5. 25 5月, 2017 8 次提交
    • G
      xics: add unrealize handler · 62f94fc9
      Greg Kurz 提交于
      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: NGreg Kurz <groug@kaod.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      62f94fc9
    • D
      hw/ppc/spapr.c: recover pending LMB unplug info in spapr_lmb_release · 16ee9980
      Daniel Henrique Barboza 提交于
      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: NDaniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
      [dwg: Minor stylistic changes, simplify error handling]
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      16ee9980
    • D
      hw/ppc: migrating the DRC state of hotplugged devices · a50919dd
      Daniel Henrique Barboza 提交于
      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: NDaniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      a50919dd
    • D
      hw/ppc: removing drc->detach_cb and drc->detach_cb_opaque · 31834723
      Daniel Henrique Barboza 提交于
      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: NDaniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      31834723
    • D
      hw/ppc/spapr.c: adding pending_dimm_unplugs to sPAPRMachineState · 0cffce56
      David Gibson 提交于
      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: NDaniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
      [dwg: Minor stylistic cleanups]
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      0cffce56
    • J
      block/gluster: glfs_lseek() workaround · 223a23c1
      Jeff Cody 提交于
      On current released versions of glusterfs, glfs_lseek() will sometimes
      return invalid values for SEEK_DATA or SEEK_HOLE.  For SEEK_DATA and
      SEEK_HOLE, the returned value should be >= the passed offset, or < 0 in
      the case of error:
      
      LSEEK(2):
      
          off_t lseek(int fd, off_t offset, int whence);
      
          [...]
      
          SEEK_HOLE
                    Adjust  the file offset to the next hole in the file greater
                    than or equal to offset.  If offset points into the middle of
                    a hole, then the file offset is set to offset.  If there is no
                    hole past offset, then the file offset is adjusted to the end
                    of the file (i.e., there is  an implicit hole at the end of
                    any file).
      
          [...]
      
          RETURN VALUE
                    Upon  successful  completion,  lseek()  returns  the resulting
                    offset location as measured in bytes from the beginning of the
                    file.  On error, the value (off_t) -1 is returned and errno is
                    set to indicate the error
      
      However, occasionally glfs_lseek() for SEEK_HOLE/DATA will return a
      value less than the passed offset, yet greater than zero.
      
      For instance, here are example values observed from this call:
      
          offs = glfs_lseek(s->fd, start, SEEK_HOLE);
          if (offs < 0) {
              return -errno;          /* D1 and (H3 or H4) */
          }
      
      start == 7608336384
      offs == 7607877632
      
      This causes QEMU to abort on the assert test.  When this value is
      returned, errno is also 0.
      
      This is a reported and known bug to glusterfs:
      https://bugzilla.redhat.com/show_bug.cgi?id=1425293
      
      Although this is being fixed in gluster, we still should work around it
      in QEMU, given that multiple released versions of gluster behave this
      way.
      
      This patch treats the return case of (offs < start) the same as if an
      error value other than ENXIO is returned; we will assume we learned
      nothing, and there are no holes in the file.
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NNiels de Vos <ndevos@redhat.com>
      Message-id: 87c0140e9407c08f6e74b04131b610f2e27c014c.1495560397.git.jcody@redhat.com
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      223a23c1
    • P
      blockjob: use deferred_to_main_loop to indicate the coroutine has ended · eb05e011
      Paolo Bonzini 提交于
      All block jobs are using block_job_defer_to_main_loop as the final
      step just before the coroutine terminates.  At this point,
      block_job_enter should do nothing, but currently it restarts
      the freed coroutine.
      
      Now, the job->co states should probably be changed to an enum
      (e.g. BEFORE_START, STARTED, YIELDED, COMPLETED) subsuming
      block_job_started, job->deferred_to_main_loop and job->busy.
      For now, this patch eliminates the problematic reenter by
      removing the reset of job->deferred_to_main_loop (which served
      no purpose, as far as I could see) and checking the flag in
      block_job_enter.
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 20170508141310.8674-12-pbonzini@redhat.com
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      eb05e011
    • P
      blockjob: reorganize block_job_completed_txn_abort · 4fb588e9
      Paolo Bonzini 提交于
      This splits the part that touches job states from the part that invokes
      callbacks.  It will make the code simpler to understand once job states will
      be protected by a different mutex than the AioContext lock.
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 20170508141310.8674-11-pbonzini@redhat.com
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      4fb588e9