1. 20 8月, 2015 2 次提交
  2. 11 8月, 2015 2 次提交
  3. 04 8月, 2015 1 次提交
    • R
      xen/events/fifo: Handle linked events when closing a port · fcdf31a7
      Ross Lagerwall 提交于
      An event channel bound to a CPU that was offlined may still be linked
      on that CPU's queue.  If this event channel is closed and reused,
      subsequent events will be lost because the event channel is never
      unlinked and thus cannot be linked onto the correct queue.
      
      When a channel is closed and the event is still linked into a queue,
      ensure that it is unlinked before completing.
      
      If the CPU to which the event channel bound is online, spin until the
      event is handled by that CPU. If that CPU is offline, it can't handle
      the event, so clear the event queue during the close, dropping the
      events.
      
      This fixes the missing interrupts (and subsequent disk stalls etc.)
      when offlining a CPU.
      Signed-off-by: NRoss Lagerwall <ross.lagerwall@citrix.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
      fcdf31a7
  4. 20 7月, 2015 1 次提交
    • J
      xen: release lock occasionally during ballooning · 929423fa
      Juergen Gross 提交于
      When dom0 is being ballooned balloon_process() will hold the balloon
      mutex until it is finished. This will block e.g. creation of new
      domains as the device backends for the new domain need some
      autoballooned pages for the ring buffers.
      
      Avoid this by releasing the balloon mutex from time to time during
      ballooning. Adjust the comment above balloon_process() regarding
      multiple instances of balloon_process().
      
      Instead of open coding it, just use cond_resched().
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
      929423fa
  5. 30 6月, 2015 1 次提交
  6. 25 6月, 2015 1 次提交
    • D
      frontswap: allow multiple backends · d1dc6f1b
      Dan Streetman 提交于
      Change frontswap single pointer to a singly linked list of frontswap
      implementations.  Update Xen tmem implementation as register no longer
      returns anything.
      
      Frontswap only keeps track of a single implementation; any
      implementation that registers second (or later) will replace the
      previously registered implementation, and gets a pointer to the previous
      implementation that the new implementation is expected to pass all
      frontswap functions to if it can't handle the function itself.  However
      that method doesn't really make much sense, as passing that work on to
      every implementation adds unnecessary work to implementations; instead,
      frontswap should simply keep a list of all registered implementations
      and try each implementation for any function.  Most importantly, neither
      of the two currently existing frontswap implementations in the kernel
      actually do anything with any previous frontswap implementation that
      they replace when registering.
      
      This allows frontswap to successfully manage multiple implementations by
      keeping a list of them all.
      Signed-off-by: NDan Streetman <ddstreet@ieee.org>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
      Cc: David Vrabel <david.vrabel@citrix.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d1dc6f1b
  7. 17 6月, 2015 3 次提交
  8. 16 6月, 2015 3 次提交
  9. 02 6月, 2015 1 次提交
    • B
      target: Minimize SCSI header #include directives · ba929992
      Bart Van Assche 提交于
      Only include SCSI initiator header files in target code that needs
      these header files, namely the SCSI pass-through code and the tcm_loop
      driver. Change SCSI_SENSE_BUFFERSIZE into TRANSPORT_SENSE_BUFFER in
      target code because the former is intended for initiator code and the
      latter for target code. With this patch the only initiator include
      directives in target code that remain are as follows:
      
      $ git grep -nHE 'include .scsi/(scsi.h|scsi_host.h|scsi_device.h|scsi_cmnd.h)' drivers/target drivers/infiniband/ulp/{isert,srpt} drivers/usb/gadget/legacy/tcm_*.[ch] drivers/{vhost,xen} include/{target,trace/events/target.h}
      drivers/target/loopback/tcm_loop.c:29:#include <scsi/scsi.h>
      drivers/target/loopback/tcm_loop.c:31:#include <scsi/scsi_host.h>
      drivers/target/loopback/tcm_loop.c:32:#include <scsi/scsi_device.h>
      drivers/target/loopback/tcm_loop.c:33:#include <scsi/scsi_cmnd.h>
      drivers/target/target_core_pscsi.c:39:#include <scsi/scsi_device.h>
      drivers/target/target_core_pscsi.c:40:#include <scsi/scsi_host.h>
      drivers/xen/xen-scsiback.c:52:#include <scsi/scsi_host.h> /* SG_ALL */
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
      ba929992
  10. 01 6月, 2015 1 次提交
    • N
      target: Convert se_portal_group->tpg_lun_list[] to RCU hlist · 6bb82612
      Nicholas Bellinger 提交于
      This patch converts the fixed size se_portal_group->tpg_lun_list[]
      to use modern RCU with hlist_head in order to support an arbitary
      number of se_lun ports per target endpoint.
      
      It includes dropping core_tpg_alloc_lun() from core_dev_add_lun(),
      and calling it directly from target_fabric_make_lun() to allocate
      a new se_lun.  And add a new target_fabric_port_release() configfs
      item callback to invoke kfree_rcu() to release memory during
      se_lun->lun_group shutdown.
      
      Also now that se_node_acl->lun_entry_hlist is using RCU, convert
      existing tpg_lun_lock to struct mutex so core_tpg_add_node_to_devs()
      can perform RCU updater logic without releasing ->tpg_lun_mutex.
      
      Also, drop core_tpg_clear_object_luns() and it's single consumer
      in iscsi-target, which is duplicating TPG LUN shutdown logic and
      is current code results in a NOP.
      
      Finally, sbp-target and xen-scsiback fabric driver conversions are
      included, which are required due to the non-standard way they use
      ->tpg_lun_hlist.
      Reviewed-by: NHannes Reinecke <hare@suse.de>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Chris Boot <bootc@bootc.net>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      6bb82612
  11. 31 5月, 2015 9 次提交
  12. 28 5月, 2015 2 次提交
  13. 20 5月, 2015 1 次提交
    • D
      xen/events: don't bind non-percpu VIRQs with percpu chip · 77bb3dfd
      David Vrabel 提交于
      A non-percpu VIRQ (e.g., VIRQ_CONSOLE) may be freed on a different
      VCPU than it is bound to.  This can result in a race between
      handle_percpu_irq() and removing the action in __free_irq() because
      handle_percpu_irq() does not take desc->lock.  The interrupt handler
      sees a NULL action and oopses.
      
      Only use the percpu chip/handler for per-CPU VIRQs (like VIRQ_TIMER).
      
        # cat /proc/interrupts | grep virq
         40:      87246          0  xen-percpu-virq      timer0
         44:          0          0  xen-percpu-virq      debug0
         47:          0      20995  xen-percpu-virq      timer1
         51:          0          0  xen-percpu-virq      debug1
         69:          0          0   xen-dyn-virq      xen-pcpu
         74:          0          0   xen-dyn-virq      mce
         75:         29          0   xen-dyn-virq      hvc_console
      Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
      Cc: <stable@vger.kernel.org>
      77bb3dfd
  14. 14 5月, 2015 2 次提交
  15. 06 5月, 2015 4 次提交
  16. 30 4月, 2015 2 次提交
    • B
      xen-pciback: Add name prefix to global 'permissive' variable · 8014bcc8
      Ben Hutchings 提交于
      The variable for the 'permissive' module parameter used to be static
      but was recently changed to be extern.  This puts it in the kernel
      global namespace if the driver is built-in, so its name should begin
      with a prefix identifying the driver.
      Signed-off-by: NBen Hutchings <ben@decadent.org.uk>
      Fixes: af6fc858 ("xen-pciback: limit guest control of command register")
      Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
      8014bcc8
    • B
      xen: Suspend ticks on all CPUs during suspend · 2b953a5e
      Boris Ostrovsky 提交于
      Commit 77e32c89 ("clockevents: Manage device's state separately for
      the core") decouples clockevent device's modes from states. With this
      change when a Xen guest tries to resume, it won't be calling its
      set_mode op which needs to be done on each VCPU in order to make the
      hypervisor aware that we are in oneshot mode.
      
      This happens because clockevents_tick_resume() (which is an intermediate
      step of resuming ticks on a processor) doesn't call clockevents_set_state()
      anymore and because during suspend clockevent devices on all VCPUs (except
      for the one doing the suspend) are left in ONESHOT state. As result, during
      resume the clockevents state machine will assume that device is already
      where it should be and doesn't need to be updated.
      
      To avoid this problem we should suspend ticks on all VCPUs during
      suspend.
      Signed-off-by: NBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
      2b953a5e
  17. 27 4月, 2015 1 次提交
  18. 15 4月, 2015 3 次提交
    • R
      xen/pci: Try harder to get PXM information for Xen · 0b97b03d
      Ross Lagerwall 提交于
      If the device being added to Xen is not contained in the ACPI table,
      walk the PCI device tree to find a parent that is contained in the ACPI
      table before finding the PXM information from this device.
      
      Previously, it would try to get a handle for the device, then the
      device's bridge, then the physfn.  This changes the order so that it
      tries to get a handle for the device, then the physfn, the walks up the
      PCI device tree.
      Signed-off-by: NRoss Lagerwall <ross.lagerwall@citrix.com>
      Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
      0b97b03d
    • W
      xenbus_client: Extend interface to support multi-page ring · ccc9d90a
      Wei Liu 提交于
      Originally Xen PV drivers only use single-page ring to pass along
      information. This might limit the throughput between frontend and
      backend.
      
      The patch extends Xenbus driver to support multi-page ring, which in
      general should improve throughput if ring is the bottleneck. Changes to
      various frontend / backend to adapt to the new interface are also
      included.
      
      Affected Xen drivers:
      * blkfront/back
      * netfront/back
      * pcifront/back
      * scsifront/back
      * vtpmfront
      
      The interface is documented, as before, in xenbus_client.c.
      Signed-off-by: NWei Liu <wei.liu2@citrix.com>
      Signed-off-by: NPaul Durrant <paul.durrant@citrix.com>
      Signed-off-by: NBob Liu <bob.liu@oracle.com>
      Cc: Konrad Wilk <konrad.wilk@oracle.com>
      Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
      Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
      ccc9d90a
    • V
      cleancache: forbid overriding cleancache_ops · 53d85c98
      Vladimir Davydov 提交于
      Currently, cleancache_register_ops returns the previous value of
      cleancache_ops to allow chaining.  However, chaining, as it is
      implemented now, is extremely dangerous due to possible pool id
      collisions.  Suppose, a new cleancache driver is registered after the
      previous one assigned an id to a super block.  If the new driver assigns
      the same id to another super block, which is perfectly possible, we will
      have two different filesystems using the same id.  No matter if the new
      driver implements chaining or not, we are likely to get data corruption
      with such a configuration eventually.
      
      This patch therefore disables the ability to override cleancache_ops
      altogether as potentially dangerous.  If there is already cleancache
      driver registered, all further calls to cleancache_register_ops will
      return EBUSY.  Since no user of cleancache implements chaining, we only
      need to make minor changes to the code outside the cleancache core.
      Signed-off-by: NVladimir Davydov <vdavydov@parallels.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
      Cc: David Vrabel <david.vrabel@citrix.com>
      Cc: Mark Fasheh <mfasheh@suse.com>
      Cc: Joel Becker <jlbec@evilplan.org>
      Cc: Stefan Hengelein <ilendir@googlemail.com>
      Cc: Florian Schmaus <fschmaus@gmail.com>
      Cc: Andor Daam <andor.daam@googlemail.com>
      Cc: Dan Magenheimer <dan.magenheimer@oracle.com>
      Cc: Bob Liu <lliubbo@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      53d85c98