]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/log
mirror_ubuntu-artful-kernel.git
8 years agoqla2xxx: Check for online flag instead of active reset when transmitting responses
Dilip Kumar Uppugandla [Thu, 17 Dec 2015 19:57:11 +0000 (14:57 -0500)]
qla2xxx: Check for online flag instead of active reset when transmitting responses

BugLink: http://bugs.launchpad.net/bugs/1541456
Driver has following initialization sequence for Target mode

1. Driver initialization starts

2. ISP Abort is scheduled when the target is enabled.

qla2xxx [0000:04:00.0]-4807:25: ISP abort scheduled
qla2xxx [0000:04:00.0]-00af:25: Performing ISP error recovery - ha=ffff880caa9e0000.

3. DPC thread starts the ISP Abort

4. While DPC is resetting the chip and initializing the firmware, we get
   async events from the firmware about P2P mode, LOOP UP and PORT UPDATE.

5. PRLI from a initiator is delivered to us followed by a PLOGI and then a
   SCSI command which creates a session.

6. If the SCSI command is a WRITE in this case, we issue XFR RDY and it
   gets dropped as can be seen with messages RESET-XFR because ISP Abort
   is still active

qla2xxx [0000:04:00.0]-e902:25: RESET-XFR active/old-count/new-count = 1/1/1.

7. If the SCSI command is a READ, we issue RESPONSE and they get dropped
   as well because Abort is still active.

qla2xxx [0000:04:00.0]-e901:25: RESET-RSP active/old-count/new-count = 1/1/1

8. Now eventually, ISP Abort finishes clearing the DPC flags.

qla2xxx [0000:04:00.0]-8822:25: qla2x00_abort_isp succeeded.
qla2xxx [0000:04:00.0]-4808:25: ISP abort end.

9. Since we dropped SCSI commands silently (without any responses sent
   to the initiator) initiator waits for a SCSI timeout (which is 60
   seconds in our case), Sends an ABTS which fails since there
   no se_cmd found for the tag that ABTS is referencing as the
   commands were cleaned up in Step 6 and 7.

10. Initiator send an IO after the ABTS which succeed fine.

To fix the above case, the following changes have been made:
  - To prevent target from dropping commands silently, use the online flag
    instead to check for an active chip reset. Once the port is online during
    a chip reset phase, we are good to process the commands.
  - Clean up qla2x00_restart_isp to not set the online flag and process ATIO
    as it is unnecessary. During a chip reset, interrupts are enabled only
    after setting the online flag to 1, so ATIO's won't be missed and hence
    no need to process ATIO's after setting the online flag.

Signed-off-by: Dilip Kumar Uppugandla <dilip@purestorage.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
(cherry picked from commit 3bb67df5b5f880a1c9c1086308cf2b981d824da5)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoqla2xxx: Set all queues to 4k
Quinn Tran [Thu, 17 Dec 2015 19:57:09 +0000 (14:57 -0500)]
qla2xxx: Set all queues to 4k

BugLink: http://bugs.launchpad.net/bugs/1541456
set ATIO/Request/Response Queues and Default number
of outstanding command to 4k.

Signed-off-by: Quinn Tran <quinn.tran@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
(cherry picked from commit e7b42e335f129f0685ab94bcd34104163df38323)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoqla2xxx: Disable ZIO at start time.
Quinn Tran [Thu, 17 Dec 2015 19:57:08 +0000 (14:57 -0500)]
qla2xxx: Disable ZIO at start time.

BugLink: http://bugs.launchpad.net/bugs/1541456
Signed-off-by: Quinn Tran <quinn.tran@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
(cherry picked from commit 481ce73342b190987c2553e8df0075c3df23632e)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoqla2xxx: Move atioq to a different lock to reduce lock contention
Quinn Tran [Thu, 17 Dec 2015 19:57:07 +0000 (14:57 -0500)]
qla2xxx: Move atioq to a different lock to reduce lock contention

BugLink: http://bugs.launchpad.net/bugs/1541456
99% of the time the ATIOQ has SCSI command.  The other 1% of time
is something else.  Most of the time this interrupt does not need
to hold the hardware_lock.  We're moving the ATIO interrupt thread
to a different lock to reduce lock contention.

Signed-off-by: Quinn Tran <quinn.tran@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
(cherry picked from commit 2f424b9b36ad7062e9ade41a9fb034d21a9e4e4b)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoqla2xxx: Add selective command queuing
Quinn Tran [Thu, 17 Dec 2015 19:57:06 +0000 (14:57 -0500)]
qla2xxx: Add selective command queuing

BugLink: http://bugs.launchpad.net/bugs/1541456
queue work element to specific process lessen cache miss

Signed-off-by: Quinn Tran <quinn.tran@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
(cherry picked from commit fb3269baf4ecc2ce6d17d4eb537080035bdf6d5b)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoqla2xxx: Add irq affinity notification
Quinn Tran [Thu, 17 Dec 2015 19:57:05 +0000 (14:57 -0500)]
qla2xxx: Add irq affinity notification

BugLink: http://bugs.launchpad.net/bugs/1541456
Register to receive notification of when irq setting change
occured.

Signed-off-by: Quinn Tran <quinn.tran@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
(cherry picked from commit cdb898c52d1dfad4b4800b83a58b3fe5d352edde)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoqla2xxx: Remove dependency on hardware_lock to reduce lock contention.
Quinn Tran [Thu, 17 Dec 2015 19:57:04 +0000 (14:57 -0500)]
qla2xxx: Remove dependency on hardware_lock to reduce lock contention.

BugLink: http://bugs.launchpad.net/bugs/1541456
Sessions management (add, deleted, modify) currently are serialized
through the hardware_lock.  Hardware_lock is a high traffic lock.
This lock is accessed by both the transmit & receive sides.

Sessions management is now moved off to another lock call sess_lock.
This is done to reduce lock contention and increase traffic throughput.

Signed-off-by: Quinn Tran <quinn.tran@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
(cherry picked from commit 7560151b6b3c1f4432c1c5b5b6496070d1f38484)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoqla2xxx: Replace QLA_TGT_STATE_ABORTED with a bit.
Quinn Tran [Thu, 17 Dec 2015 19:57:03 +0000 (14:57 -0500)]
qla2xxx: Replace QLA_TGT_STATE_ABORTED with a bit.

BugLink: http://bugs.launchpad.net/bugs/1541456
Replace QLA_TGT_STATE_ABORTED state with a bit because
the current state of the command is lost when an abort
is requested by upper layer.

Signed-off-by: Quinn Tran <quinn.tran@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
(cherry picked from commit 193b50b9d54a4fcb723a8005b29d8dd5518e3ae2)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoqla2xxx: Wait for all conflicts before ack'ing PLOGI
Alexei Potashnik [Thu, 17 Dec 2015 19:57:02 +0000 (14:57 -0500)]
qla2xxx: Wait for all conflicts before ack'ing PLOGI

BugLink: http://bugs.launchpad.net/bugs/1541456
Until now ack'ing of a new PLOGI has only been delayed if there
was an existing session for the same WWN. Ack was released when
the session deletion completed.

If there was another WWN session with the same fc_id/loop_id pair
(aka "conflicting session"), PLOGI was still ack'ed immediately.
This potentially caused a problem when old session deletion logged
fc_id/loop_id out of FW after new session has been established.

Two work-arounds were attempted before:
1. Dropping PLOGIs until conflicting session goes away.
2. Detecting initiator being logged out of FW and issuing LOGO
to force re-login.

This patch introduces proper solution to the problem where PLOGI
is held until either existing session with same WWN or any
conflicting session goes away. Mechanism supports one session holding
two PLOGI acks as well as one PLOGI ack being held by many sessions.

Signed-off-by: Alexei Potashnik <alexei@purestorage.com>
Acked-by: Quinn Tran <quinn.tran@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
(cherry picked from commit b7bd104e6f1c3be2bf881dc1ca7db40da3ee65fd)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoqla2xxx: Delete session if initiator is gone from FW
Alexei Potashnik [Thu, 17 Dec 2015 19:57:01 +0000 (14:57 -0500)]
qla2xxx: Delete session if initiator is gone from FW

BugLink: http://bugs.launchpad.net/bugs/1541456
1. Initiator A is logged in with fc_id(1)/loop_id(1)
2. Initiator A re-logs in with fc_id(2)/loop_id(2)
3. Part of old session deletion async logoout for 1/1 is queued
4. Initiator B logs in with fc_id(1)/loop_id(1), starts
   passing data and creates session.
5. Async logo from 3 is processed by DPC and sent to FW

Now initiator B has the session but is logged out from FW.

This condition is detected first with CTIO error 29 at which
point we should delete current session. During session
deletion we will send LOGO to initiator to force re-login.

Under rare circumstances initiator might be logged out of FW,
not have driver session, but still think it's logged in.
E.g. the above sequence plus session deletion due to re-config.
Incoming commands will fail to create local session because
initiator is not found in FW. In this case we also issue LOGO
to initiator to force him re-login.

Finally this patch fixes exchange leak when commands where
received in logged out state. In this case loop_id must be
set to FFFF when corresponding exchange is terminated. The
patch modifies exchange termination to always use FFFF,
since in certain scenarios it's impossible to tell whether
command was received in logged in or logged out state.

Signed-off-by: Alexei Potashnik <alexei@purestorage.com>
Acked-by: Quinn Tran <quinn.tran@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
(cherry picked from commit 71cdc07964651db51ddeea05245ac899357f0e71)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoqla2xxx: Added interface to send explicit LOGO.
Himanshu Madhani [Thu, 17 Dec 2015 19:57:00 +0000 (14:57 -0500)]
qla2xxx: Added interface to send explicit LOGO.

BugLink: http://bugs.launchpad.net/bugs/1541456
This patch adds interface to send explicit LOGO
explicit LOGO using using ELS commands from driver.

Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
(cherry picked from commit 6eb54715b54bb8324f3293e49635277652730e55)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoqla2xxx: Add FW resource count in DebugFS.
Quinn Tran [Thu, 17 Dec 2015 19:56:59 +0000 (14:56 -0500)]
qla2xxx: Add FW resource count in DebugFS.

BugLink: http://bugs.launchpad.net/bugs/1541456
DebugFS now will show fw_resource_count node.

FW Resource count

Original TGT exchg count[0]
current TGT exchg count[0]
original Initiator Exchange count[2048]
Current Initiator Exchange count[2048]
Original IOCB count[2078]
Current IOCB count[2067]
MAX VP count[254]
MAX FCF count[0]

Signed-off-by: Quinn Tran <quinn.tran@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
(cherry picked from commit 03e8c680d9b3b68ddae648a6e2c91c381e90066f)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoqla2xxx: Enable Target counters in DebugFS.
Himanshu Madhani [Thu, 17 Dec 2015 19:56:58 +0000 (14:56 -0500)]
qla2xxx: Enable Target counters in DebugFS.

BugLink: http://bugs.launchpad.net/bugs/1541456
Following counters are added in target mode to help debugging efforts.

Target Counters

qla_core_sbt_cmd = 0
qla_core_ret_sta_ctio = 0
qla_core_ret_ctio = 0
core_qla_que_buf = 0
core_qla_snd_status = 0
core_qla_free_cmd = 0
num alloc iocb failed = 0
num term exchange sent = 0
num Q full sent = 0

Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
(cherry picked from commit ce1025cd4b8eb7afe07c3625f2ad080d8bee7cc4)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoqla2xxx: Enable Exchange offload support.
Himanshu Madhani [Thu, 17 Dec 2015 19:56:57 +0000 (14:56 -0500)]
qla2xxx: Enable Exchange offload support.

BugLink: http://bugs.launchpad.net/bugs/1541456
This patch enables Exchange offload support in Qlogic ISP.
To enable exchange offload with Qlogic ISP24XX/25XX/26XX,
set module parameter ql2xexchoffld to any non-zero number.
This will alow ISP firmware to store exchange data structures
used by firmware to host memory provided by driver. ISP firmware
can supports upto 32k total active exchanges.

Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
(cherry picked from commit 2f56a7f1b5d8cf3d8bc84cc08dda09c991b698a7)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoqla2xxx: Enable Extended Logins support
Himanshu Madhani [Thu, 17 Dec 2015 19:56:56 +0000 (14:56 -0500)]
qla2xxx: Enable Extended Logins support

BugLink: http://bugs.launchpad.net/bugs/1541456
This patch enables Extended Logins support in Qlogic ISP.
To enable extended login with Qlogic ISP24XX/25XX/26XX,
set module parameter ql2xexlogins to any non-zero number.
This will alow ISP firmware to store port database structure
information of remote login sessions to host memory provided
by driver. ISP firmware supports upto 16k total logins.

Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
(cherry picked from commit b0d6cabd355ae9c13c53680cfe8b5ae58a84d2c1)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoqla2xxx: Remove unavailable firmware files
Himanshu Madhani [Tue, 17 Nov 2015 20:44:48 +0000 (15:44 -0500)]
qla2xxx: Remove unavailable firmware files

BugLink: http://bugs.launchpad.net/bugs/1541456
Remove firmware binary names for the ISPs, which are not submitted to
linux-firmware.

Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Reviewed-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 940a7f09ad645b6be7ff85b034499fcffdfe0ebc)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agogenirq/msi: Export functions to allow MSI domains in modules
Jake Oshins [Thu, 10 Dec 2015 17:52:59 +0000 (17:52 +0000)]
genirq/msi: Export functions to allow MSI domains in modules

BugLink: http://bugs.launchpad.net/bugs/1541120
The Linux kernel already has the concept of IRQ domain, wherein a
component can expose a set of IRQs which are managed by a particular
interrupt controller chip or other subsystem. The PCI driver exposes
the notion of an IRQ domain for Message-Signaled Interrupts (MSI) from
PCI Express devices. This patch exposes the functions which are
necessary for creating a MSI IRQ domain within a module.

[ tglx: Split it into x86 and core irq parts ]

Signed-off-by: Jake Oshins <jakeo@microsoft.com>
Cc: gregkh@linuxfoundation.org
Cc: kys@microsoft.com
Cc: devel@linuxdriverproject.org
Cc: olaf@aepfle.de
Cc: apw@canonical.com
Cc: vkuznets@redhat.com
Cc: haiyangz@microsoft.com
Cc: marc.zyngier@arm.com
Cc: bhelgaas@google.com
Link: http://lkml.kernel.org/r/1449769983-12948-4-git-send-email-jakeo@microsoft.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
(cherry picked from commit a4289dc2ec3a5821076a78ee9678909b4eff297e)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agox86/irq: Export functions to allow MSI domains in modules
Jake Oshins [Thu, 10 Dec 2015 17:52:59 +0000 (17:52 +0000)]
x86/irq: Export functions to allow MSI domains in modules

BugLink: http://bugs.launchpad.net/bugs/1541120
The Linux kernel already has the concept of IRQ domain, wherein a
component can expose a set of IRQs which are managed by a particular
interrupt controller chip or other subsystem. The PCI driver exposes
the notion of an IRQ domain for Message-Signaled Interrupts (MSI) from
PCI Express devices. This patch exposes the functions which are
necessary for creating a MSI IRQ domain within a module.

[ tglx: Split it into x86 and core irq parts ]

Signed-off-by: Jake Oshins <jakeo@microsoft.com>
Cc: gregkh@linuxfoundation.org
Cc: kys@microsoft.com
Cc: devel@linuxdriverproject.org
Cc: olaf@aepfle.de
Cc: apw@canonical.com
Cc: vkuznets@redhat.com
Cc: haiyangz@microsoft.com
Cc: marc.zyngier@arm.com
Cc: bhelgaas@google.com
Link: http://lkml.kernel.org/r/1449769983-12948-4-git-send-email-jakeo@microsoft.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
(cherry picked from commit c8f3e518d3444ee9200a4987421fcee60f768f11)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agolpfc: Update version to 11.0.0.10 for upstream patch set
James Smart [Wed, 16 Dec 2015 23:12:08 +0000 (18:12 -0500)]
lpfc: Update version to 11.0.0.10 for upstream patch set

BugLink: http://bugs.launchpad.net/bugs/1541592
Update version to 11.0.0.10 for upstream patch set

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit b034573c7eb39aa58cd4a08e487869fea6d4ad2d)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agolpfc: Use kzalloc instead of kmalloc
Punit Vara [Wed, 16 Dec 2015 23:12:07 +0000 (18:12 -0500)]
lpfc: Use kzalloc instead of kmalloc

BugLink: http://bugs.launchpad.net/bugs/1541592
This patch is to the lpfc_els.c which resolves following warning
reported by coccicheck:

WARNING: kzalloc should be used for rdp_context, instead of
kmalloc/memset

Signed-off-by: Punit Vara <punitvara@gmail.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Reviewed-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Reviewed-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 699acd6220ea5b20b25d5eec0ab448827d745357)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agolpfc: Delete unnecessary checks before the function call "mempool_destroy"
Markus Elfring [Wed, 16 Dec 2015 23:12:06 +0000 (18:12 -0500)]
lpfc: Delete unnecessary checks before the function call "mempool_destroy"

BugLink: http://bugs.launchpad.net/bugs/1541592
The mempool_destroy() function tests whether its argument is NULL
and then returns immediately. Thus the test around the calls is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Reviewed-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 9be321819c43417432a8376428b90fe3fe3a3510)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agolpfc: Add logging for misconfigured optics.
James Smart [Wed, 16 Dec 2015 23:12:05 +0000 (18:12 -0500)]
lpfc: Add logging for misconfigured optics.

BugLink: http://bugs.launchpad.net/bugs/1541592
Add logging for misconfigured optics acqe reported by fw.

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 448193b5b5e2471fc90ea11e78c39bcfd167efb6)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agolpfc: Fix external loopback failure.
James Smart [Wed, 16 Dec 2015 23:12:04 +0000 (18:12 -0500)]
lpfc: Fix external loopback failure.

BugLink: http://bugs.launchpad.net/bugs/1541592
Fix external loopback failure.

Rx sequence reassembly was incorrect.

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 4360ca9c24388e44cb0e14861a62fff43cf225c0)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agolpfc: Fix mbox reuse in PLOGI completion
James Smart [Wed, 16 Dec 2015 23:12:03 +0000 (18:12 -0500)]
lpfc: Fix mbox reuse in PLOGI completion

BugLink: http://bugs.launchpad.net/bugs/1541592
Fix mbox reuse in PLOGI completion. Moved allocations so that buffer
properly init'd.

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 01c73bbcd7cc4f31f45a1b0caeacdba46acd9c9c)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agolpfc: Use new FDMI speed definitions for 10G, 25G and 40G FCoE.
James Smart [Wed, 16 Dec 2015 23:12:02 +0000 (18:12 -0500)]
lpfc: Use new FDMI speed definitions for 10G, 25G and 40G FCoE.

BugLink: http://bugs.launchpad.net/bugs/1541592
Use new FDMI speed definitions for 10G, 25G and 40G FCoE.

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit a085e87c814567c94e5d375e7362f9f25030aac1)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agolpfc: Make write check error processing more resilient
James Smart [Wed, 16 Dec 2015 23:12:01 +0000 (18:12 -0500)]
lpfc: Make write check error processing more resilient

BugLink: http://bugs.launchpad.net/bugs/1541592
Make write check error processing more resilient.

Checks to catch writes that fw reports weren't fully complete yet SCSI
status indicated fine needed correction.

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 5afab6bbf3f026b7d50451acbfdc12300c5f4353)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agolpfc: Fix RDP ACC being too long.
James Smart [Wed, 16 Dec 2015 23:12:00 +0000 (18:12 -0500)]
lpfc: Fix RDP ACC being too long.

BugLink: http://bugs.launchpad.net/bugs/1541592
Fix RDP ACC being too long.

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit eb8d68c9930f7f9c8f3f4a6059b051b32077a735)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agolpfc: Fix RDP Speed reporting.
James Smart [Wed, 16 Dec 2015 23:11:59 +0000 (18:11 -0500)]
lpfc: Fix RDP Speed reporting.

BugLink: http://bugs.launchpad.net/bugs/1541592
Fix RDP Speed reporting.

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 81e7517723fc17396ba91f59312b3177266ddbda)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agolpfc: Modularize and cleanup FDMI code in driver
James Smart [Wed, 16 Dec 2015 23:11:58 +0000 (18:11 -0500)]
lpfc: Modularize and cleanup FDMI code in driver

BugLink: http://bugs.launchpad.net/bugs/1541592
Modularize, cleanup, add comments - for FDMI code in driver

Note: I don't like the comments with leading # - but as we have a lot if
present, I'm deferring to handle it in one big fix later.

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 4258e98ee3862ca7036654b43c839ab7668043e0)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agolpfc: Fix crash in fcp command completion path.
James Smart [Wed, 16 Dec 2015 23:11:57 +0000 (18:11 -0500)]
lpfc: Fix crash in fcp command completion path.

BugLink: http://bugs.launchpad.net/bugs/1541592
Fix crash in fcp command completion path.

Missed null check.

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit c90261dcd86e4eb5c9c1627fde037e902db8aefa)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agolpfc: Fix driver crash when module parameter lpfc_fcp_io_channel set to 16
James Smart [Wed, 16 Dec 2015 23:11:56 +0000 (18:11 -0500)]
lpfc: Fix driver crash when module parameter lpfc_fcp_io_channel set to 16

BugLink: http://bugs.launchpad.net/bugs/1541592
Fix driver crash when module parameter lpfc_fcp_io_channel set to 16

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 6690e0d4fc5cccf74534abe0c9f9a69032bc02f0)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agolpfc: Fix RegLogin failed error seen on Lancer FC during port bounce
James Smart [Wed, 16 Dec 2015 23:11:55 +0000 (18:11 -0500)]
lpfc: Fix RegLogin failed error seen on Lancer FC during port bounce

BugLink: http://bugs.launchpad.net/bugs/1541592
Fix RegLogin failed error seen on Lancer FC during port bounce

Fix the statemachine and ref counting.

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 4b7789b71c916f79a3366da080101014473234c3)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agolpfc: Fix the FLOGI discovery logic to comply with T11 standards
James Smart [Wed, 16 Dec 2015 23:11:53 +0000 (18:11 -0500)]
lpfc: Fix the FLOGI discovery logic to comply with T11 standards

BugLink: http://bugs.launchpad.net/bugs/1541592
Fix the FLOGI discovery logic to comply with T11 standards

We weren't properly setting fabric parameters, such as R_A_TOV and E_D_TOV,
when we registered the vfi object in default configs and pt2pt configs.
Revise to now pass service params with the values to the firmware and
ensure they are reset on link bounce. Required reworking the call sequence
in the discovery threads.

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit d6de08cc46269899988b4f40acc7337279693d4b)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agolpfc: Fix FCF Infinite loop in lpfc_sli4_fcf_rr_next_index_get.
James Smart [Wed, 16 Dec 2015 23:11:52 +0000 (18:11 -0500)]
lpfc: Fix FCF Infinite loop in lpfc_sli4_fcf_rr_next_index_get.

BugLink: http://bugs.launchpad.net/bugs/1541592
Fix FCF Infinite loop in lpfc_sli4_fcf_rr_next_index_get.

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit f5cb5304eb26d307c9b30269fb0e007e0b262b7d)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: [Config] update spl/zfs version
Tim Gardner [Thu, 4 Feb 2016 14:24:12 +0000 (07:24 -0700)]
UBUNTU: [Config] update spl/zfs version

BugLink: http://bugs.launchpad.net/bugs/1542296
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: [Config] Fixed Vcs-Git
Tim Gardner [Thu, 4 Feb 2016 12:43:31 +0000 (05:43 -0700)]
UBUNTU: [Config] Fixed Vcs-Git

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: [Config] CONFIG_ARM64_VA_BITS=48
dann frazier [Tue, 2 Feb 2016 22:34:23 +0000 (15:34 -0700)]
UBUNTU: [Config] CONFIG_ARM64_VA_BITS=48

On NUMA implementations of Cavium ThunderX, node1 memory addresses start with
bit 40 set to 1, and therefore requires >= 41 bits of VA. A side effect of
this is an increase from 3 to 4 page table levels.

Note: The alternative way to increase VA bits w/o moving to 4 level page
tables would be to adopt a larger page size. That would have a far more
significant impact to memory usage, and is known to have issue with current
Ubuntu userspace:

  https://lists.ubuntu.com/archives/ubuntu-devel/2014-December/038572.html
  http://bugs.launchpad.net/bugs/1520162

Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agocxl: Enable PCI device ID for future IBM CXL adapter
Uma Krishnan [Mon, 7 Dec 2015 22:03:32 +0000 (16:03 -0600)]
cxl: Enable PCI device ID for future IBM CXL adapter

Add support for future IBM Coherent Accelerator (CXL) device
with ID of 0x0601.

Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com>
Reviewed-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
(cherry picked from commit 68adb7bfd66504e97364651fb7dac3f9c8aa8561)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agocxl: use -Werror only with CONFIG_PPC_WERROR
Brian Norris [Fri, 8 Jan 2016 18:30:10 +0000 (10:30 -0800)]
cxl: use -Werror only with CONFIG_PPC_WERROR

Some developers really like to have -Werror enabled for their code, as
it helps to ensure warning free code. Others don't want -Werror, as it
(for example) can cause problems when newer (or older) compilers have
different sets of warnings, or new warnings can appear just when turning
up the warning level (e.g., make W=1 or W=2). Thus, it seems prudent to
have the use of -Werror be configurable.

It so happens that cxl is only built on PowerPC, and PowerPC already
has a nice set of Kconfig options for this, under CONFIG_PPC_WERROR. So
let's use that, and the world is a happy place again! (Note that
PPC_WERROR defaults to =y, so the common case compile should still be
enforcing -Werror.)

Fixes: d3d73f4b38a8 ("cxl: Compile with -Werror")
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
(cherry picked from commit 57f7c3932516b9f7908d9b0a24396112d0f4ca55)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agocxl: fix build for GCC 4.6.x
Brian Norris [Fri, 8 Jan 2016 18:30:09 +0000 (10:30 -0800)]
cxl: fix build for GCC 4.6.x

GCC 4.6.3 does not support -Wno-unused-const-variable. Instead, use the
kbuild infrastructure that checks if this options exists.

Fixes: 2cd55c68c0a4 ("cxl: Fix build failure due to -Wunused-variable behaviour change")
Suggested-by: Michal Marek <mmarek@suse.com>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
(cherry picked from commit aa09545589ceeff884421d8eb38d04963190afbe)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agocxlflash: Enable device id for future IBM CXL adapter
Manoj Kumar [Mon, 14 Dec 2015 21:07:43 +0000 (15:07 -0600)]
cxlflash: Enable device id for future IBM CXL adapter

This drop enables a future card with a device id of 0x0600 to be
recognized by the cxlflash driver.

As per the design, the Accelerator Function Unit (AFU) for this new IBM
CXL Flash Adapter retains the same host interface as the previous
generation. For the early prototypes of the new card, the driver with
this change behaves exactly as the driver prior to this behaved with the
earlier generation card. Therefore, no card specific programming has
been added. These card specific changes can be staged in later if
needed.

Signed-off-by: Manoj N. Kumar <manoj@linux.vnet.ibm.com>
Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit a2746fb16e41b7c8f02aa4d2605ecce97abbebbd)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agocxlflash: Resolve oops in wait_port_offline
Manoj Kumar [Mon, 14 Dec 2015 21:07:23 +0000 (15:07 -0600)]
cxlflash: Resolve oops in wait_port_offline

If an async error interrupt is generated, and the error requires the FC
link to be reset, it cannot be performed in the interrupt context. So a
work element is scheduled to complete the link reset in a process
context. If either an EEH event or an escalation occurs in between when
the interrupt is generated and the scheduled work is started, the MMIO
space may no longer be available. This will cause an oops in the worker
thread.

[  606.806583] NIP kthread_data+0x28/0x40
[  606.806633] LR wq_worker_sleeping+0x30/0x100
[  606.806694] Call Trace:
[  606.806721] 0x50 (unreliable)
[  606.806796] wq_worker_sleeping+0x30/0x100
[  606.806884] __schedule+0x69c/0x8a0
[  606.806959] schedule+0x44/0xc0
[  606.807034] do_exit+0x770/0xb90
[  606.807109] die+0x300/0x460
[  606.807185] bad_page_fault+0xd8/0x150
[  606.807259] handle_page_fault+0x2c/0x30
[  606.807338] wait_port_offline.constprop.12+0x60/0x130 [cxlflash]

To prevent the problem space area from being unmapped, when there is
pending work, a mapcount (using the kref mechanism) is held.  The
mapcount is released only when the work is completed.  The last
reference release is tied to the unmapping service.

Signed-off-by: Manoj N. Kumar <manoj@linux.vnet.ibm.com>
Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Reviewed-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit b45cdbaf9f7f0486847c52f60747fb108724652a)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agocxlflash: Fix to resolve cmd leak after host reset
Manoj Kumar [Mon, 14 Dec 2015 21:07:02 +0000 (15:07 -0600)]
cxlflash: Fix to resolve cmd leak after host reset

After a few iterations of resetting the card, either during EEH
recovery, or a host_reset the following is seen in the logs.  cxlflash
0008:00: cxlflash_queuecommand: could not get a free command

At every reset of the card, the commands that are outstanding are being
leaked.  No effort is being made to reap these commands.  A few more
resets later, the above error message floods the logs and the card is
rendered totally unusable as no free commands are available.

Iterated through the 'cmd' queue and printed out the 'free' counter and
found that on each reset certain commands were in-use and stayed in-use
through subsequent resets.

To resolve this issue, when the card is reset, reap all the commands
that are active/outstanding.

Signed-off-by: Manoj N. Kumar <manoj@linux.vnet.ibm.com>
Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit ee91e332a6e6e9b939f60f6e1bd72fb2def5290d)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agocxlflash: Removed driver date print
Uma Krishnan [Mon, 14 Dec 2015 21:06:33 +0000 (15:06 -0600)]
cxlflash: Removed driver date print

Having a date for the driver requires it to be updated quite
often. Removing the date which is not necessary. Also made
use of the existing symbol to print the driver name.

Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 85599218914dadad3347eaa4337e71f09f39e78f)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agocxl: Fix DSI misses when the context owning task exits
Vaibhav Jain [Tue, 24 Nov 2015 10:56:18 +0000 (16:26 +0530)]
cxl: Fix DSI misses when the context owning task exits

Presently when a user-space process issues CXL_IOCTL_START_WORK ioctl we
store the pid of the current task_struct and use it to get pointer to
the mm_struct of the process, while processing page or segment faults
from the capi card. However this causes issues when the thread that had
originally issued the start-work ioctl exits in which case the stored
pid is no more valid and the cxl driver is unable to handle faults as
the mm_struct corresponding to process is no more accessible.

This patch fixes this issue by using the mm_struct of the next alive
task in the thread group. This is done by iterating over all the tasks
in the thread group starting from thread group leader and calling
get_task_mm on each one of them. When a valid mm_struct is obtained the
pid of the associated task is stored in the context replacing the
exiting one for handling future faults.

The patch introduces a new function named get_mem_context that checks if
the current task pointed to by ctx->pid is dead? If yes it performs the
steps described above. Also a new variable cxl_context.glpid is
introduced which stores the pid of the thread group leader associated
with the context owning task.

Reported-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Reported-by: Frank Haverkamp <HAVERKAM@de.ibm.com>
Suggested-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
Acked-by: Ian Munsie <imunsie@au1.ibm.com>
Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Reviewed-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
(cherry picked from commit 7b8ad495d59280b634a7b546f4cdf58cf4d65f61)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agocxlflash: drop unlikely before IS_ERR_OR_NULL
Geliang Tang [Thu, 3 Dec 2015 21:18:49 +0000 (15:18 -0600)]
cxlflash: drop unlikely before IS_ERR_OR_NULL

IS_ERR_OR_NULL already contain an unlikely compiler flag. Drop it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Acked-by: Manoj Kumar <manoj@linux.vnet.ibm.com>
Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 21891a452a42afc2313f1e3a69040e46c1d068c1)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agocxl: use correct operator when writing pcie config space values
Andrew Donnellan [Wed, 4 Nov 2015 02:24:09 +0000 (13:24 +1100)]
cxl: use correct operator when writing pcie config space values

When writing a value to config space, cxl_pcie_write_config() calls
cxl_pcie_config_info() to obtain a mask and shift value, shifts the new
value accordingly, then uses the mask to combine the shifted value with the
existing value at the address as part of a read-modify-write pattern.

Currently, we use a logical OR operator rather than a bitwise OR operator,
which means any use of this function results in an incorrect value being
written. Replace the logical OR operator with a bitwise OR operator so the
value is written correctly.

Reported-by: Michael Ellerman <mpe@ellerman.id.au>
Cc: stable@vger.kernel.org
Fixes: 6f7f0b3df6d4 ("cxl: Add AFU virtual PHB and kernel API")
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Acked-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
(cherry picked from commit 48f0f6b717e314a30be121b67e1d044f6d311d66)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agocxl: Fix possible idr warning when contexts are released
Vaibhav Jain [Mon, 16 Nov 2015 04:03:45 +0000 (09:33 +0530)]
cxl: Fix possible idr warning when contexts are released

An idr warning is reported when a context is release after the capi card
is unbound from the cxl driver via sysfs. Below are the steps to
reproduce:

1. Create multiple afu contexts in an user-space application using libcxl.
2. Unbind capi card from cxl using command of form
   echo <capi-card-pci-addr> > /sys/bus/pci/drivers/cxl-pci/unbind
3. Exit/kill the application owning afu contexts.

After above steps a warning message is usually seen in the kernel logs
of the form "idr_remove called for id=<context-id> which is not
allocated."

This is caused by the function cxl_release_afu which destroys the
contexts_idr table. So when a context is release no entry for context pe
is found in the contexts_idr table and idr code prints this warning.

This patch fixes this issue by increasing & decreasing the ref-count on
the afu device when a context is initialized or when its freed
respectively. This prevents the afu from being released until all the
afu contexts have been released. The patch introduces two new functions
namely cxl_afu_get/put that manage the ref-count on the afu device.

Also the patch removes code inside cxl_dev_context_init that increases ref
on the afu device as its guaranteed to be alive during this function.

Reported-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
Acked-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
(cherry picked from commit 1b5df59e50874b9034c0fa389cd52b65f1f93292)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: Start new release
Tim Gardner [Tue, 2 Feb 2016 20:17:24 +0000 (13:17 -0700)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: Ubuntu-4.4.0-3.17
Tim Gardner [Tue, 2 Feb 2016 18:33:15 +0000 (11:33 -0700)]
UBUNTU: Ubuntu-4.4.0-3.17

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: rebase to v4.4.1
Tim Gardner [Tue, 2 Feb 2016 18:24:50 +0000 (11:24 -0700)]
UBUNTU: rebase to v4.4.1

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: vmbus: Treat Fibre Channel devices as performance critical
K. Y. Srinivasan [Wed, 16 Dec 2015 00:27:27 +0000 (16:27 -0800)]
Drivers: hv: vmbus: Treat Fibre Channel devices as performance critical

For performance critical devices, we distribute the incoming
channel interrupt load across available CPUs in the guest.
Include Fibre channel devices in the set of devices for which
we would distribute the interrupt load.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 879a650a273bc3efb9d472886b8ced12630ea8ed)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: utils: fix hvt_op_poll() return value on transport destroy
Vitaly Kuznetsov [Wed, 16 Dec 2015 00:27:26 +0000 (16:27 -0800)]
Drivers: hv: utils: fix hvt_op_poll() return value on transport destroy

The return type of hvt_op_poll() is unsigned int and -EBADF is
inappropriate, poll functions return POLL* statuses.

Reported-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 77b744a598d604de49df79cf161bbd1809a6948a)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: vmbus: fix the building warning with hyperv-keyboard
Dexuan Cui [Mon, 21 Dec 2015 20:21:22 +0000 (12:21 -0800)]
Drivers: hv: vmbus: fix the building warning with hyperv-keyboard

With the recent change af3ff643ea91ba64dd8d0b1cbed54d44512f96cd
(Drivers: hv: vmbus: Use uuid_le type consistently), we always get this
warning:

  CC [M]  drivers/input/serio/hyperv-keyboard.o
drivers/input/serio/hyperv-keyboard.c:427:2: warning: missing braces around
initializer [-Wmissing-braces]
  { HV_KBD_GUID, },
  ^
drivers/input/serio/hyperv-keyboard.c:427:2: warning: (near initialization
for .id_table[0].guid.b.) [-Wmissing-braces]

The patch fixes the warning.

Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 2048157ad02e65f6327118dd4a7b9c9f1fd12f77)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agodrivers/hv: Move struct hv_timer_message_payload into UAPI Hyper-V x86 header
Andrey Smetanin [Mon, 30 Nov 2015 16:22:16 +0000 (19:22 +0300)]
drivers/hv: Move struct hv_timer_message_payload into UAPI Hyper-V x86 header

This struct is required for Hyper-V SynIC timers implementation inside KVM
and for upcoming Hyper-V VMBus support by userspace(QEMU). So place it into
Hyper-V UAPI header.

Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
CC: Gleb Natapov <gleb@kernel.org>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: "K. Y. Srinivasan" <kys@microsoft.com>
CC: Haiyang Zhang <haiyangz@microsoft.com>
CC: Vitaly Kuznetsov <vkuznets@redhat.com>
CC: Roman Kagan <rkagan@virtuozzo.com>
CC: Denis V. Lunev <den@openvz.org>
CC: qemu-devel@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit c71acc4c74dddebbbbeede69fdd4f0b1a124f9df)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agodrivers/hv: Move struct hv_message into UAPI Hyper-V x86 header
Andrey Smetanin [Mon, 30 Nov 2015 16:22:15 +0000 (19:22 +0300)]
drivers/hv: Move struct hv_message into UAPI Hyper-V x86 header

This struct is required for Hyper-V SynIC timers implementation inside KVM
and for upcoming Hyper-V VMBus support by userspace(QEMU). So place it into
Hyper-V UAPI header.

Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Roman Kagan <rkagan@virtuozzo.com>
CC: Gleb Natapov <gleb@kernel.org>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: "K. Y. Srinivasan" <kys@microsoft.com>
CC: Haiyang Zhang <haiyangz@microsoft.com>
CC: Vitaly Kuznetsov <vkuznets@redhat.com>
CC: Roman Kagan <rkagan@virtuozzo.com>
CC: Denis V. Lunev <den@openvz.org>
CC: qemu-devel@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 5b423efe11e822e092e8c911a6bad17eadf718eb)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agodrivers/hv: Move HV_SYNIC_STIMER_COUNT into Hyper-V UAPI x86 header
Andrey Smetanin [Mon, 30 Nov 2015 16:22:14 +0000 (19:22 +0300)]
drivers/hv: Move HV_SYNIC_STIMER_COUNT into Hyper-V UAPI x86 header

This constant is required for Hyper-V SynIC timers MSR's
support by userspace(QEMU).

Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Roman Kagan <rkagan@virtuozzo.com>
CC: Gleb Natapov <gleb@kernel.org>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: "K. Y. Srinivasan" <kys@microsoft.com>
CC: Haiyang Zhang <haiyangz@microsoft.com>
CC: Vitaly Kuznetsov <vkuznets@redhat.com>
CC: Roman Kagan <rkagan@virtuozzo.com>
CC: Denis V. Lunev <den@openvz.org>
CC: qemu-devel@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 4f39bcfd1c132522380138a323f9af7902766301)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agodrivers/hv: replace enum hv_message_type by u32
Andrey Smetanin [Mon, 30 Nov 2015 16:22:13 +0000 (19:22 +0300)]
drivers/hv: replace enum hv_message_type by u32

enum hv_message_type inside struct hv_message, hv_post_message
is not size portable. Replace enum by u32.

Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
CC: Gleb Natapov <gleb@kernel.org>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: "K. Y. Srinivasan" <kys@microsoft.com>
CC: Haiyang Zhang <haiyangz@microsoft.com>
CC: Vitaly Kuznetsov <vkuznets@redhat.com>
CC: Roman Kagan <rkagan@virtuozzo.com>
CC: Denis V. Lunev <den@openvz.org>
CC: qemu-devel@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 7797dcf63f11b6e1d34822daf2317223d0f4ad46)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: ring_buffer: eliminate hv_ringbuffer_peek()
Vitaly Kuznetsov [Tue, 15 Dec 2015 03:02:01 +0000 (19:02 -0800)]
Drivers: hv: ring_buffer: eliminate hv_ringbuffer_peek()

Currently, there is only one user for hv_ringbuffer_read()/
hv_ringbuffer_peak() functions and the usage of these functions is:
- insecure as we drop ring_lock between them, someone else (in theory
  only) can acquire it in between;
- non-optimal as we do a number of things (acquire/release the above
  mentioned lock, calculate available space on the ring, ...) twice and
  this path is performance-critical.

Remove hv_ringbuffer_peek() moving the logic from __vmbus_recvpacket() to
hv_ringbuffer_read().

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 940b68e2c3e4ebf032885203c3970e9649f814af)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: remove code duplication between vmbus_recvpacket()/vmbus_recvpacket_raw()
Vitaly Kuznetsov [Tue, 15 Dec 2015 03:02:00 +0000 (19:02 -0800)]
Drivers: hv: remove code duplication between vmbus_recvpacket()/vmbus_recvpacket_raw()

vmbus_recvpacket() and vmbus_recvpacket_raw() are almost identical but
there are two discrepancies:
1) vmbus_recvpacket() doesn't propagate errors from hv_ringbuffer_read()
   which looks like it is not desired.
2) There is an error message printed in packetlen > bufferlen case in
   vmbus_recvpacket(). I'm removing it as it is usless for users to see
   such messages and /vmbus_recvpacket_raw() doesn't have it.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 667d374064b0cc48b6122101b287908d1b392bdb)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: ring_buffer: remove code duplication from hv_ringbuffer_peek/read()
Vitaly Kuznetsov [Tue, 15 Dec 2015 03:01:59 +0000 (19:01 -0800)]
Drivers: hv: ring_buffer: remove code duplication from hv_ringbuffer_peek/read()

hv_ringbuffer_peek() does the same as hv_ringbuffer_read() without
advancing the read index. The only functional change this patch brings
is moving hv_need_to_signal_on_read() call under the ring_lock but this
function is just a couple of comparisons.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b5f53dde8d8e84a6ee200dbd0bd90a400a8fe1a1)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: ring_buffer: remove stray smp_read_barrier_depends()
Vitaly Kuznetsov [Tue, 15 Dec 2015 03:01:58 +0000 (19:01 -0800)]
Drivers: hv: ring_buffer: remove stray smp_read_barrier_depends()

smp_read_barrier_depends() does nothing on almost all arcitectures
including x86 and having it in the beginning of
hv_get_ringbuffer_availbytes() does not provide any guarantees anyway.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 45870a441361d1c05a5f767c4ece2f6e30e0da9c)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: ring_buffer.c: fix comment style
Vitaly Kuznetsov [Tue, 15 Dec 2015 03:01:57 +0000 (19:01 -0800)]
Drivers: hv: ring_buffer.c: fix comment style

Convert 6+-string comments repeating function names to normal kernel-style
comments and fix a couple of other comment style issues. No textual or
functional changes intended.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 822f18d4d3e9d4efb4996bbe562d0f99ab82d7dd)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: utils: fix crash when device is removed from host side
Vitaly Kuznetsov [Tue, 15 Dec 2015 03:01:56 +0000 (19:01 -0800)]
Drivers: hv: utils: fix crash when device is removed from host side

The crash is observed when a service is being disabled host side while
userspace daemon is connected to the device:

[   90.244859] general protection fault: 0000 [#1] SMP
...
[   90.800082] Call Trace:
[   90.800082]  [<ffffffff81187008>] __fput+0xc8/0x1f0
[   90.800082]  [<ffffffff8118716e>] ____fput+0xe/0x10
...
[   90.800082]  [<ffffffff81015278>] do_signal+0x28/0x580
[   90.800082]  [<ffffffff81086656>] ? finish_task_switch+0xa6/0x180
[   90.800082]  [<ffffffff81443ebf>] ? __schedule+0x28f/0x870
[   90.800082]  [<ffffffffa01ebbaa>] ? hvt_op_read+0x12a/0x140 [hv_utils]
...

The problem is that hvutil_transport_destroy() which does misc_deregister()
freeing the appropriate device is reachable by two paths: module unload
and from util_remove(). While module unload path is protected by .owner in
struct file_operations util_remove() path is not. Freeing the device while
someone holds an open fd for it is a show stopper.

In general, it is not possible to revoke an fd from all users so the only
way to solve the issue is to defer freeing the hvutil_transport structure.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 9420098adc50a88d4a441e0f92d54bfa7af44448)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: utils: introduce HVUTIL_TRANSPORT_DESTROY mode
Vitaly Kuznetsov [Tue, 15 Dec 2015 03:01:55 +0000 (19:01 -0800)]
Drivers: hv: utils: introduce HVUTIL_TRANSPORT_DESTROY mode

When Hyper-V host asks us to remove some util driver by closing the
appropriate channel there is no easy way to force the current file
descriptor holder to hang up but we can start to respond -EBADF to all
operations asking it to exit gracefully.

As we're setting hvt->mode from two separate contexts now we need to use
a proper locking.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit a15025660d4703a8b37290a14734cb4a84875770)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: utils: rename outmsg_lock
Vitaly Kuznetsov [Tue, 15 Dec 2015 03:01:54 +0000 (19:01 -0800)]
Drivers: hv: utils: rename outmsg_lock

As a preparation to reusing outmsg_lock to protect test-and-set openrations
on 'mode' rename it the more general 'lock'.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit a72f3a4ccff22de879a1f599210ecdd9bd483a43)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: utils: fix memory leak on on_msg() failure
Vitaly Kuznetsov [Tue, 15 Dec 2015 03:01:53 +0000 (19:01 -0800)]
Drivers: hv: utils: fix memory leak on on_msg() failure

inmsg should be freed in case of on_msg() failure to avoid memory leak.
Preserve the error code from on_msg().

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 1f75338b6fece2bbd42ac3623830c65e2df6e031)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agotools: hv: vss: fix the write()'s argument: error -> vss_msg
Dexuan Cui [Tue, 15 Dec 2015 00:01:58 +0000 (16:01 -0800)]
tools: hv: vss: fix the write()'s argument: error -> vss_msg

Fix the write()'s argument in the daemon code.

Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Cc: stable@vger.kernel.org
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit a689d2510f188e75391dbebacbddfd74d42f2a7e)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: utils: Invoke the poll function after handshake
K. Y. Srinivasan [Tue, 15 Dec 2015 00:01:57 +0000 (16:01 -0800)]
Drivers: hv: utils: Invoke the poll function after handshake

When the handshake with daemon is complete, we should poll the channel since
during the handshake, we will not be processing any messages. This is a
potential bug if the host is waiting for a response from the guest.
I would like to thank Dexuan for pointing this out.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 2d0c3b5ad739697a68dc8a444f5b9f4817cf8f8f)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: vmbus: Force all channel messages to be delivered on CPU 0
K. Y. Srinivasan [Tue, 15 Dec 2015 00:01:56 +0000 (16:01 -0800)]
Drivers: hv: vmbus: Force all channel messages to be delivered on CPU 0

Force all channel messages to be delivered on CPU0. These messages are not
performance critical and are used during the setup and teardown of the
channel.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b282e4c06fe89fc750fb26791c0bd7b25315973a)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agodrivers/hv: correct tsc page sequence invalid value
Andrey Smetanin [Tue, 15 Dec 2015 00:01:55 +0000 (16:01 -0800)]
drivers/hv: correct tsc page sequence invalid value

Hypervisor Top Level Functional Specification v3/4 says
that TSC page sequence value = -1(0xFFFFFFFF) is used to
indicate that TSC page no longer reliable source of reference
timer. Unfortunately, we found that Windows Hyper-V guest
side implementation uses sequence value = 0 to indicate
that Tsc page no longer valid. This is clearly visible
inside Windows 2012R2 ntoskrnl.exe HvlGetReferenceTime()
function dissassembly:

HvlGetReferenceTime proc near
                 xchg    ax, ax
loc_1401C3132:
                 mov     rax, cs:HvlpReferenceTscPage
                 mov     r9d, [rax]
                 test    r9d, r9d
                 jz      short loc_1401C3176
                 rdtsc
                 mov     rcx, cs:HvlpReferenceTscPage
                 shl     rdx, 20h
                 or      rdx, rax
                 mov     rax, [rcx+8]
                 mov     rcx, cs:HvlpReferenceTscPage
                 mov     r8, [rcx+10h]
                 mul     rdx
                 mov     rax, cs:HvlpReferenceTscPage
                 add     rdx, r8
                 mov     ecx, [rax]
                 cmp     ecx, r9d
                 jnz     short loc_1401C3132
                 jmp     short loc_1401C3184
loc_1401C3176:
                 mov     ecx, 40000020h
                 rdmsr
                 shl     rdx, 20h
                 or      rdx, rax
loc_1401C3184:
                 mov     rax, rdx
                 retn
HvlGetReferenceTime endp

This patch aligns Tsc page invalid sequence value with
Windows Hyper-V guest implementation which is more
compatible with both Hyper-V hypervisor and KVM hypervisor.

Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: "K. Y. Srinivasan" <kys@microsoft.com>
CC: Haiyang Zhang <haiyangz@microsoft.com>
CC: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit c35b82ef0294ae5052120615f5cfcef17c5a6bf7)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: vmbus: Fix a Host signaling bug
K. Y. Srinivasan [Tue, 15 Dec 2015 00:01:54 +0000 (16:01 -0800)]
Drivers: hv: vmbus: Fix a Host signaling bug

Currently we have two policies for deciding when to signal the host:
One based on the ring buffer state and the other based on what the
VMBUS client driver wants to do. Consider the case when the client
wants to explicitly control when to signal the host. In this case,
if the client were to defer signaling, we will not be able to signal
the host subsequently when the client does want to signal since the
ring buffer state will prevent the signaling. Implement logic to
have only one signaling policy in force for a given channel.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Tested-by: Haiyang Zhang <haiyangz@microsoft.com>
Cc: <stable@vger.kernel.org> # v4.2+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 8599846d73997cdbccf63f23394d871cfad1e5e6)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agodrivers:hv: Allow for MMIO claims that span ACPI _CRS records
Jake Oshins [Tue, 15 Dec 2015 00:01:52 +0000 (16:01 -0800)]
drivers:hv: Allow for MMIO claims that span ACPI _CRS records

This patch makes 16GB GPUs work in Hyper-V VMs, since, for
compatibility reasons, the Hyper-V BIOS lists MMIO ranges in 2GB
chunks in its root bus's _CRS object.

Signed-off-by: Jake Oshins <jakeo@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 40f26f3168bf7a4da490db308dc0bd9f9923f41f)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: vmbus: channge vmbus_connection.channel_lock to mutex
Dexuan Cui [Tue, 15 Dec 2015 00:01:51 +0000 (16:01 -0800)]
Drivers: hv: vmbus: channge vmbus_connection.channel_lock to mutex

spinlock is unnecessary here.
mutex is enough.

Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit d6f591e339d23f434efda11917da511870891472)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: vmbus: release relid on error in vmbus_process_offer()
Dexuan Cui [Tue, 15 Dec 2015 00:01:50 +0000 (16:01 -0800)]
Drivers: hv: vmbus: release relid on error in vmbus_process_offer()

We want to simplify vmbus_onoffer_rescind() by not invoking
hv_process_channel_removal(NULL, ...).

Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit f52078cf5711ce47c113a58702b35c8ff5f212f5)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: vmbus: fix rescind-offer handling for device without a driver
Dexuan Cui [Tue, 15 Dec 2015 00:01:49 +0000 (16:01 -0800)]
Drivers: hv: vmbus: fix rescind-offer handling for device without a driver

In the path vmbus_onoffer_rescind() -> vmbus_device_unregister()  ->
device_unregister() -> ... -> __device_release_driver(), we can see for a
device without a driver loaded: dev->driver is NULL, so
dev->bus->remove(dev), namely vmbus_remove(), isn't invoked.

As a result, vmbus_remove() -> hv_process_channel_removal() isn't invoked
and some cleanups(like sending a CHANNELMSG_RELID_RELEASED message to the
host) aren't done.

We can demo the issue this way:
1. rmmod hv_utils;
2. disable the Heartbeat Integration Service in Hyper-V Manager and lsvmbus
shows the device disappears.
3. re-enable the Heartbeat in Hyper-V Manager and modprobe hv_utils, but
lsvmbus shows the device can't appear again.
This is because, the host thinks the VM hasn't released the relid, so can't
re-offer the device to the VM.

We can fix the issue by moving hv_process_channel_removal()
from vmbus_close_internal() to vmbus_device_release(), since the latter is
always invoked on device_unregister(), whether or not the dev has a driver
loaded.

Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 34c6801e3310ad286c7bb42bc88d42926b8f99bf)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: vmbus: do sanity check of channel state in vmbus_close_internal()
Dexuan Cui [Tue, 15 Dec 2015 00:01:48 +0000 (16:01 -0800)]
Drivers: hv: vmbus: do sanity check of channel state in vmbus_close_internal()

This fixes an incorrect assumption of channel state in the function.

Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 64b7faf903dae2df94d89edf2c688b16751800e4)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: vmbus: serialize process_chn_event() and vmbus_close_internal()
Dexuan Cui [Tue, 15 Dec 2015 00:01:47 +0000 (16:01 -0800)]
Drivers: hv: vmbus: serialize process_chn_event() and vmbus_close_internal()

process_chn_event(), running in the tasklet, can race with
vmbus_close_internal() in the case of SMP guest, e.g., when the former is
accessing channel->inbound.ring_buffer, the latter could be freeing the
ring_buffer pages.

To resolve the race, we can serialize them by disabling the tasklet when
the latter is running here.

Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 63d55b2aeb5e4faa170316fee73c3c47ea9268c7)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: vmbus: Get rid of the unused irq variable
K. Y. Srinivasan [Tue, 15 Dec 2015 00:01:46 +0000 (16:01 -0800)]
Drivers: hv: vmbus: Get rid of the unused irq variable

The irq we extract from ACPI is not used - we deliver hypervisor
interrupts on a special vector. Make the necessary adjustments.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit efc267226b827f347a329c395e16c08973b0e3d6)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: vmbus: Get rid of the unused macro
K. Y. Srinivasan [Tue, 15 Dec 2015 00:01:45 +0000 (16:01 -0800)]
Drivers: hv: vmbus: Get rid of the unused macro

The macro VMBUS_DEVICE() is unused; get rid of it.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 90e031fa06ad6b660a8e9bebbb80bd30e555a2a5)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: vmbus: Use uuid_le_cmp() for comparing GUIDs
K. Y. Srinivasan [Tue, 15 Dec 2015 00:01:44 +0000 (16:01 -0800)]
Drivers: hv: vmbus: Use uuid_le_cmp() for comparing GUIDs

Use uuid_le_cmp() for comparing GUIDs.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 4ae9250893485f380275e7d5cb291df87c4d9710)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: vmbus: Use uuid_le type consistently
K. Y. Srinivasan [Tue, 15 Dec 2015 00:01:43 +0000 (16:01 -0800)]
Drivers: hv: vmbus: Use uuid_le type consistently

Consistently use uuid_le type in the Hyper-V driver code.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit af3ff643ea91ba64dd8d0b1cbed54d44512f96cd)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: vss: run only on supported host versions
Olaf Hering [Tue, 15 Dec 2015 00:01:42 +0000 (16:01 -0800)]
Drivers: hv: vss: run only on supported host versions

The Backup integration service on WS2012 has appearently trouble to
negotiate with a guest which does not support the provided util version.
Currently the VSS driver supports only version 5/0. A WS2012 offers only
version 1/x and 3/x, and vmbus_prep_negotiate_resp correctly returns an
empty icframe_vercnt/icmsg_vercnt. But the host ignores that and
continues to send ICMSGTYPE_NEGOTIATE messages. The result are weird
errors during boot and general misbehaviour.

Check the Windows version to work around the host bug, skip hv_vss_init
on WS2012 and older.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit ed9ba608e4851144af8c7061cbb19f751c73e998)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agodrivers:hv: Define the channel type for Hyper-V PCI Express pass-through
Jake Oshins [Tue, 15 Dec 2015 00:01:41 +0000 (16:01 -0800)]
drivers:hv: Define the channel type for Hyper-V PCI Express pass-through

This defines the channel type for PCI front-ends in Hyper-V VMs.

Signed-off-by: Jake Oshins <jakeo@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 3053c762444a83ec6a8777f9476668b23b8ab180)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agodrivers:hv: Export the API to invoke a hypercall on Hyper-V
Jake Oshins [Tue, 15 Dec 2015 00:01:40 +0000 (16:01 -0800)]
drivers:hv: Export the API to invoke a hypercall on Hyper-V

This patch exposes the function that hv_vmbus.ko uses to make hypercalls.  This
is necessary for retargeting an interrupt when it is given a new affinity.

Since we are exporting this API, rename the API as it will be visible outside
the hv.c file.

Signed-off-by: Jake Oshins <jakeo@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit a108393dbf764efb2405f21ca759806c65b8bc16)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agodrivers:hv: Export a function that maps Linux CPU num onto Hyper-V proc num
Jake Oshins [Tue, 15 Dec 2015 00:01:39 +0000 (16:01 -0800)]
drivers:hv: Export a function that maps Linux CPU num onto Hyper-V proc num

This patch exposes the mapping between Linux CPU number and Hyper-V virtual
processor number.  This is necessary because the hypervisor needs to know which
virtual processors to target when making a mapping in the Interrupt Redirection
Table in the I/O MMU.

Signed-off-by: Jake Oshins <jakeo@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 619848bd074343ff2bdeeafca0be39748f6da372)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agodrivers/hv: cleanup synic msrs if vmbus connect failed
Andrey Smetanin [Tue, 15 Dec 2015 00:01:38 +0000 (16:01 -0800)]
drivers/hv: cleanup synic msrs if vmbus connect failed

Before vmbus_connect() synic is setup per vcpu - this means
hypervisor receives writes at synic msr's and probably allocate
hypervisor resources per synic setup.

If vmbus_connect() failed for some reason it's neccessary to cleanup
synic setup by call hv_synic_cleanup() at each vcpu to get a chance
to free allocated resources by hypervisor per synic.

This patch does appropriate cleanup in case of vmbus_connect() failure.

Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
CC: "K. Y. Srinivasan" <kys@microsoft.com>
CC: Haiyang Zhang <haiyangz@microsoft.com>
CC: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 17efbee8ba02ef00d3b270998978f8a1a90f1d92)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: utils: use memdup_user in hvt_op_write
Olaf Hering [Tue, 15 Dec 2015 00:01:37 +0000 (16:01 -0800)]
Drivers: hv: utils: use memdup_user in hvt_op_write

Use memdup_user to handle OOM.

Fixes: 14b50f80c32d ('Drivers: hv: util: introduce hv_utils_transport abstraction')
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b00359642c2427da89dc8f77daa2c9e8a84e6d76)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: util: catch allocation errors
Olaf Hering [Tue, 15 Dec 2015 00:01:36 +0000 (16:01 -0800)]
Drivers: hv: util: catch allocation errors

Catch allocation errors in hvutil_transport_send.

Fixes: 14b50f80c32d ('Drivers: hv: util: introduce hv_utils_transport abstraction')
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit cdc0c0c94e4e6dfa371d497a3130f83349b6ead6)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agotools: hv: remove repeated HV_FCOPY string
Olaf Hering [Tue, 15 Dec 2015 00:01:35 +0000 (16:01 -0800)]
tools: hv: remove repeated HV_FCOPY string

HV_FCOPY is already used as identifier in syslog.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 6dfb867cea9e93ae9220f0b2e702b0440e4c8b4b)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agotools: hv: report ENOSPC errors in hv_fcopy_daemon
Olaf Hering [Tue, 15 Dec 2015 00:01:34 +0000 (16:01 -0800)]
tools: hv: report ENOSPC errors in hv_fcopy_daemon

Currently some "Unspecified error 0x80004005" is reported on the Windows
side if something fails. Handle the ENOSPC case and return
ERROR_DISK_FULL, which allows at least Copy-VMFile to report a meaning
full error.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b4ed5d1682c6613988c2eb1de55df5ac9988afcc)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: utils: run polling callback always in interrupt context
Olaf Hering [Tue, 15 Dec 2015 00:01:33 +0000 (16:01 -0800)]
Drivers: hv: utils: run polling callback always in interrupt context

All channel interrupts are bound to specific VCPUs in the guest
at the point channel is created. While currently, we invoke the
polling function on the correct CPU (the CPU to which the channel
is bound to) in some cases we may run the polling function in
a non-interrupt context. This  potentially can cause an issue as the
polling function can be interrupted by the channel callback function.
Fix the issue by running the polling function on the appropriate CPU
at interrupt level. Additional details of the issue being addressed by
this patch are given below:

Currently hv_fcopy_onchannelcallback is called from interrupts and also
via the ->write function of hv_utils. Since the used global variables to
maintain state are not thread safe the state can get out of sync.
This affects the variable state as well as the channel inbound buffer.

As suggested by KY adjust hv_poll_channel to always run the given
callback on the cpu which the channel is bound to. This avoids the need
for locking because all the util services are single threaded and only
one transaction is active at any given point in time.

Additionally, remove the context variable, they will always be the same as
recv_channel.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 3cace4a616108539e2730f8dc21a636474395e0f)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: util: Increase the timeout for util services
K. Y. Srinivasan [Tue, 15 Dec 2015 00:01:32 +0000 (16:01 -0800)]
Drivers: hv: util: Increase the timeout for util services

Util services such as KVP and FCOPY need assistance from daemon's running
in user space. Increase the timeout so we don't prematurely terminate
the transaction in the kernel. Host sets up a 60 second timeout for
all util driver transactions. The host will retry the transaction if it
times out. Set the guest timeout at 30 seconds.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit c0b200cfb0403740171c7527b3ac71d03f82947a)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoDrivers: hv: vmbus: fix build warning
Sudip Mukherjee [Fri, 11 Dec 2015 08:53:11 +0000 (14:23 +0530)]
Drivers: hv: vmbus: fix build warning

We were getting build warning about unused variable "tsc_msr" and
"va_tsc" while building for i386 allmodconfig.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 9220e39b5c900c67ddcb517d52fe52d90fb5e3c8)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agonet: i40e: shut up uninitialized variable warnings
Arnd Bergmann [Thu, 21 Jan 2016 03:53:17 +0000 (19:53 -0800)]
net: i40e: shut up uninitialized variable warnings

intel/i40e/i40e_txrx.c: In function 'i40e_xmit_frame_ring':
intel/i40e/i40e_txrx.c:2367:20: error: 'oiph' may be used uninitialized in this function [-Werror=maybe-uninitialized]
intel/i40e/i40e_txrx.c:2317:16: note: 'oiph' was declared here
intel/i40e/i40e_txrx.c:2367:17: error: 'oudph' may be used uninitialized in this function [-Werror=maybe-uninitialized]
intel/i40e/i40e_txrx.c:2316:17: note: 'oudph' was declared here

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 79febbc19b81b5242339bffb90e4dbea15015dde)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoi40e: fix build warnings
Eric Dumazet [Thu, 21 Jan 2016 03:53:02 +0000 (19:53 -0800)]
i40e: fix build warnings

Fixes following build warnings :

drivers/net/ethernet/intel/i40e/i40e_main.c:7057:13: warning:
'i40e_sync_udp_filters_subtask' defined but not used [-Wunused-function]
drivers/net/ethernet/intel/i40e/i40e_main.c:8524:13: warning:
'i40e_add_vxlan_port' defined but not used [-Wunused-function]
drivers/net/ethernet/intel/i40e/i40e_main.c:8569:13: warning:
'i40e_del_vxlan_port' defined but not used [-Wunused-function]
drivers/net/ethernet/intel/i40e/i40e_main.c:8604:13: warning:
'i40e_add_geneve_port' defined but not used [-Wunused-function]
drivers/net/ethernet/intel/i40e/i40e_main.c:8651:13: warning:
'i40e_del_geneve_port' defined but not used [-Wunused-function]

Fixes: 6a899024058d ("i40e: geneve tunnel offload support")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 5cae7615b613381a04d3dd06b8237234cc3f7cc9)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoUBUNTU: SAUCE: nvme merge cleanup
Tim Gardner [Mon, 1 Feb 2016 23:03:45 +0000 (16:03 -0700)]
UBUNTU: SAUCE: nvme merge cleanup

BugLink: http://bugs.launchpad.net/bugs/1531539
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoNVMe: Export NVMe attributes to sysfs group
Keith Busch [Tue, 12 Jan 2016 22:09:31 +0000 (15:09 -0700)]
NVMe: Export NVMe attributes to sysfs group

BugLink: http://bugs.launchpad.net/bugs/1531539
Adds all controller information to attribute list exposed to sysfs, and
appends the reset_controller attribute to it. The nvme device is created
with this attribute list, so driver no long manages its attributes.

Reported-by: Sujith Pandel <sujithpshankar@gmail.com>
Cc: Sujith Pandel <sujithpshankar@ gmail.com>
Cc: David Milburn <dmilburn@redhat.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
(cherry picked from commit 779ff75617099f4defe14e20443b95019a4c5ae8)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoNVMe: Shutdown controller only for power-off
Keith Busch [Tue, 12 Jan 2016 21:41:18 +0000 (14:41 -0700)]
NVMe: Shutdown controller only for power-off

BugLink: http://bugs.launchpad.net/bugs/1531539
We don't need to shutdown a controller for a reset. A controller in a
shutdown state may take longer to become ready than one that was simply
disabled. This patch has the driver shut down a controller only if the
device is about to be powered off or being removed. When taking the
controller down for a reset reason, the controller will be disabled
instead.

Function names have been updated in this patch to reflect their changed
semantics.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
(cherry picked from commit a5cdb68c2c10f0865122656833cd07636a4143ee)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
8 years agoNVMe: IO queue deletion re-write
Keith Busch [Tue, 12 Jan 2016 21:41:17 +0000 (14:41 -0700)]
NVMe: IO queue deletion re-write

BugLink: http://bugs.launchpad.net/bugs/1531539
The nvme driver deletes IO queues asynchronously since this operation
may potentially take an undesirable amount of time with a large number
of queues if done serially.

The driver used to manage coordinating asynchronous deletions. This
patch simplifies that by leveraging the block layer rather than using
kthread workers and chaining more complicated callbacks.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
(cherry picked from commit db3cbfff5bcc0b9a82d8c71f00b9d60fad215871)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>