Displaying 15 results from an estimated 15 matches for "get_ccwdev_lock".
2014 Apr 25
0
[PATCH 1/1] virtio_ccw: introduce device_lost in virtio_ccw_device
...flags;
struct virtio_ccw_device *vcdev = virtio_grab_drvdata(cdev);
- if (vcdev && cdev->online)
+ if (vcdev && cdev->online) {
+ if (vcdev->device_lost)
+ virtio_break_device(&vcdev->vdev);
unregister_virtio_device(&vcdev->vdev);
- spin_lock_irqsave(get_ccwdev_lock(cdev), flags);
- dev_set_drvdata(&cdev->dev, NULL);
- spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags);
+ spin_lock_irqsave(get_ccwdev_lock(cdev), flags);
+ dev_set_drvdata(&cdev->dev, NULL);
+ spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags);
+ }
cdev->handler = NULL;...
2014 Apr 25
2
[PATCH 0/1] virtio_ccw: exploit virtio_break_device()
Rusty,
this patch exploits the new function virtio_break_device() as of your patch
set dated January 15th on linux-kernel at vger.kernel.org.
The patch avoids hang situations during device unregister, when a (block)
device with active IO is hot-unplugged.
Heinz Graalfs (1):
virtio_ccw: introduce device_lost in virtio_ccw_device
drivers/s390/kvm/virtio_ccw.c | 49
2014 Apr 25
2
[PATCH 0/1] virtio_ccw: exploit virtio_break_device()
Rusty,
this patch exploits the new function virtio_break_device() as of your patch
set dated January 15th on linux-kernel at vger.kernel.org.
The patch avoids hang situations during device unregister, when a (block)
device with active IO is hot-unplugged.
Heinz Graalfs (1):
virtio_ccw: introduce device_lost in virtio_ccw_device
drivers/s390/kvm/virtio_ccw.c | 49
2013 Dec 13
0
[PATCH v4 RFC 1/3] virtio_ccw: fix vcdev pointer handling issues
...&
(scsw_stctl(&irb->scsw) ==
@@ -985,23 +987,37 @@ static int virtio_ccw_probe(struct ccw_device *cdev)
return 0;
}
+static struct virtio_ccw_device *virtio_grab_drvdata(struct ccw_device *cdev)
+{
+ unsigned long flags;
+ struct virtio_ccw_device *vcdev;
+
+ spin_lock_irqsave(get_ccwdev_lock(cdev), flags);
+ vcdev = dev_get_drvdata(&cdev->dev);
+ if (!vcdev) {
+ spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags);
+ return NULL;
+ }
+ dev_set_drvdata(&cdev->dev, NULL);
+ spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags);
+ return vcdev;
+}
+
static void virtio_ccw_...
2013 Dec 13
7
[PATCH v4 RFC 0/3] virtio: add 'device_lost' to virtio_device
Hi, here is my v4 patch-set update to the v3 RFC submitted on Nov 27th.
When an active virtio block device is hot-unplugged from a KVM guest,
affected guest user applications are not aware of any errors that occur
due to the lost device. This patch-set adds code to avoid further request
queueing when a lost block device is detected, resulting in appropriate
error info. Additionally a potential
2013 Dec 13
7
[PATCH v4 RFC 0/3] virtio: add 'device_lost' to virtio_device
Hi, here is my v4 patch-set update to the v3 RFC submitted on Nov 27th.
When an active virtio block device is hot-unplugged from a KVM guest,
affected guest user applications are not aware of any errors that occur
due to the lost device. This patch-set adds code to avoid further request
queueing when a lost block device is detected, resulting in appropriate
error info. Additionally a potential
2018 Sep 26
4
[PULL 0/2] virtio-ccw fixes
The following changes since commit 8c0f9f5b309d627182d5da72a69246f58bde1026:
Revert "uapi/linux/keyctl.h: don't use C++ reserved keyword as a struct member name" (2018-09-25 13:28:58 +0200)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git tags/virtio-ccw-20180926
for you to fetch changes up to
2015 Mar 04
2
virtio balloon: do not call blocking ops when !TASK_RUNNING
...This is the relevant code:
static int ccw_io_helper(struct virtio_ccw_device *vcdev,
struct ccw1 *ccw, __u32 intparm)
{
int ret;
unsigned long flags;
int flag = intparm & VIRTIO_CCW_INTPARM_MASK;
do {
spin_lock_irqsave(get_ccwdev_lock(vcdev->cdev), flags);
ret = ccw_device_start(vcdev->cdev, ccw, intparm, 0, 0);
if (!ret) {
if (!vcdev->curr_io)
vcdev->err = 0;
vcdev->curr_io |= flag;
}...
2015 Mar 04
2
virtio balloon: do not call blocking ops when !TASK_RUNNING
...This is the relevant code:
static int ccw_io_helper(struct virtio_ccw_device *vcdev,
struct ccw1 *ccw, __u32 intparm)
{
int ret;
unsigned long flags;
int flag = intparm & VIRTIO_CCW_INTPARM_MASK;
do {
spin_lock_irqsave(get_ccwdev_lock(vcdev->cdev), flags);
ret = ccw_device_start(vcdev->cdev, ccw, intparm, 0, 0);
if (!ret) {
if (!vcdev->curr_io)
vcdev->err = 0;
vcdev->curr_io |= flag;
}...
2015 Mar 02
4
virtio balloon: do not call blocking ops when !TASK_RUNNING
On Mon, Mar 02, 2015 at 10:37:26AM +1030, Rusty Russell wrote:
> Thomas Huth <thuth at linux.vnet.ibm.com> writes:
> > On Thu, 26 Feb 2015 11:50:42 +1030
> > Rusty Russell <rusty at rustcorp.com.au> wrote:
> >
> >> Thomas Huth <thuth at linux.vnet.ibm.com> writes:
> >> > Hi all,
> >> >
> >> > with the recent
2015 Mar 02
4
virtio balloon: do not call blocking ops when !TASK_RUNNING
On Mon, Mar 02, 2015 at 10:37:26AM +1030, Rusty Russell wrote:
> Thomas Huth <thuth at linux.vnet.ibm.com> writes:
> > On Thu, 26 Feb 2015 11:50:42 +1030
> > Rusty Russell <rusty at rustcorp.com.au> wrote:
> >
> >> Thomas Huth <thuth at linux.vnet.ibm.com> writes:
> >> > Hi all,
> >> >
> >> > with the recent
2014 Oct 07
0
[PATCH RFC 09/11] KVM: s390: Set virtio-ccw transport revision
...*/
+ ret = 0;
+ else
+ vcdev->revision--;
+ }
+ } while (ret == -EOPNOTSUPP);
+
+ kfree(ccw);
+ kfree(rev);
+ return ret;
+}
static int virtio_ccw_online(struct ccw_device *cdev)
{
@@ -1093,6 +1151,11 @@ static int virtio_ccw_online(struct ccw_device *cdev)
spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags);
vcdev->vdev.id.vendor = cdev->id.cu_type;
vcdev->vdev.id.device = cdev->id.cu_model;
+
+ ret = virtio_ccw_set_transport_rev(vcdev);
+ if (ret)
+ goto out_free;
+
ret = register_virtio_device(&vcdev->vdev);
if (ret) {
dev_warn(&cdev->dev, "Fa...
2018 Sep 18
0
[RFC PATCH 2/2] virtio/s390: fix race in ccw_io_helper()
...,
> struct ccw1 *ccw, __u32 intparm)
> {
> @@ -296,6 +298,7 @@ static int ccw_io_helper(struct virtio_ccw_device *vcdev,
> unsigned long flags;
> int flag = intparm & VIRTIO_CCW_INTPARM_MASK;
>
> + mutex_lock(&vcio_mtx);
> do {
> spin_lock_irqsave(get_ccwdev_lock(vcdev->cdev), flags);
> ret = ccw_device_start(vcdev->cdev, ccw, intparm, 0, 0);
> @@ -308,7 +311,9 @@ static int ccw_io_helper(struct virtio_ccw_device *vcdev,
> cpu_relax();
> } while (ret == -EBUSY);
We probably still want to keep this while loop to be on the safe side...
2014 Oct 07
14
[PATCH RFC 00/11] linux: towards virtio-1 guest support
This patchset tries to go towards implementing both virtio-1 compliant and
transitional virtio drivers in Linux. Branch available at
git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux virtio-1
This is based on some old patches by Rusty to handle extended feature bits
and endianness conversions. Thomas implemented the new virtio-ccw transport
revision command, and I hacked up some
2014 Oct 07
14
[PATCH RFC 00/11] linux: towards virtio-1 guest support
This patchset tries to go towards implementing both virtio-1 compliant and
transitional virtio drivers in Linux. Branch available at
git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux virtio-1
This is based on some old patches by Rusty to handle extended feature bits
and endianness conversions. Thomas implemented the new virtio-ccw transport
revision command, and I hacked up some