Skip to contentSkip to conversation

KVM: s390: virtio-ccw bugfix.

PATCH Applied Cornelia Huck 3 participants 8 messages Apr 4, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: s390: virtio-ccw bugfix.

Hi,

another virtio-ccw bugfix for a problem where we would not reset old I/O errors. Please apply.

Cornelia Huck (1):
KVM: s390: virtio_ccw: reset errors for new I/O.

 drivers/s390/kvm/virtio_ccw.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Signature · 1 line
1.7.12.4
#1 lore raw

PATCH 1/1 KVM: s390: virtio_ccw: reset errors for new I/O.

ccw_io_helper neglected to reset vcdev->err after a new channel program had been successfully started, resulting in stale errors delivered after one I/O failed. Reset the error after a new channel program has been successfully started with no old I/O pending.

---
 drivers/s390/kvm/virtio_ccw.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/s390/kvm/virtio_ccw.c +4 -1
index 42d507c..5948f2a 100644
@@ -133,8 +133,11 @@ static int ccw_io_helper(struct virtio_ccw_device *vcdev,
 	do {
 		spin_lock_irqsave(get_ccwdev_lock(vcdev->cdev), flags);
 		ret = ccw_device_start(vcdev->cdev, ccw, intparm, 0, 0);
-		if (!ret)
+		if (!ret) {
+			if (!vcdev->curr_io)
+				vcdev->err = 0;
 			vcdev->curr_io |= flag;
+		}
 		spin_unlock_irqrestore(get_ccwdev_lock(vcdev->cdev), flags);
 		cpu_relax();
 	} while (ret == -EBUSY);
Signature · 1 line
1.7.12.4
#5 lore raw
In reply to Cornelia Huck
Quoted 11 lines · Cornelia Huck

Hi,

another virtio-ccw bugfix for a problem where we would not reset old I/O errors. Please apply.

Cornelia Huck (1):
KVM: s390: virtio_ccw: reset errors for new I/O.

 drivers/s390/kvm/virtio_ccw.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Is this for 3.9 or 3.10?

--
Gleb.

#6 lore raw
Quoted 6 lines · On Thu, 4 Apr 2013 11:27:39 +0300 Gleb Natapov <[email protected]> wrote:
Quoted 5 lines · Cornelia Huck

Hi,

another virtio-ccw bugfix for a problem where we would not reset old I/O errors. Please apply.

Quoted 7 lines
Quoted 6 lines

Cornelia Huck (1):
KVM: s390: virtio_ccw: reset errors for new I/O.

 drivers/s390/kvm/virtio_ccw.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Is this for 3.9 or 3.10?

I created the patch on top of kvm/queue (the problem won't surface with the current code, I only noticed it when I was mucking around with some experimental stuff).

Applied
#7 lore raw
Quoted 12 lines · Cornelia Huck
Quoted 9 lines · On Thu, 4 Apr 2013 11:27:39 +0300 Gleb Natapov <[email protected]> wrote:
Quoted 8 lines · Cornelia Huck

Hi,

another virtio-ccw bugfix for a problem where we would not reset old I/O errors. Please apply.

Cornelia Huck (1):
KVM: s390: virtio_ccw: reset errors for new I/O.

Quoted 8 lines
Quoted 4 lines
Quoted 3 lines
 drivers/s390/kvm/virtio_ccw.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Is this for 3.9 or 3.10?

I created the patch on top of kvm/queue (the problem won't surface with the current code, I only noticed it when I was mucking around with some experimental stuff).

Applied to queue. Thanks.

--
Gleb.

#2 lore raw

Re: [PATCH] KVM: s390: virtio_ccw: reset errors for new I/O.

In reply to Cornelia Huck
Quoted 7 lines · Cornelia Huck

ccw_io_helper neglected to reset vcdev->err after a new channel program had been successfully started, resulting in stale errors delivered after one I/O failed. Reset the error after a new channel program has been successfully started with no old I/O pending.

Shouldn't this be CC: stable?

Alex

Quoted 24 lines

---
drivers/s390/kvm/virtio_ccw.c | 5 ++++-

1 file changed, 4 insertions(+), 1 deletion(-)
drivers/s390/kvm/virtio_ccw.c +4 -1
index 42d507c..5948f2a 100644
@@ -133,8 +133,11 @@ static int ccw_io_helper(struct virtio_ccw_device *vcdev,
 	do {
 		spin_lock_irqsave(get_ccwdev_lock(vcdev->cdev), flags);
 		ret = ccw_device_start(vcdev->cdev, ccw, intparm, 0, 0);
-		if (!ret)
+		if (!ret) {
+			if (!vcdev->curr_io)
+				vcdev->err = 0;
 			vcdev->curr_io |= flag;
+		}
 		spin_unlock_irqrestore(get_ccwdev_lock(vcdev->cdev), flags);
 		cpu_relax();
 	} while (ret == -EBUSY);
Signature · 1 line
1.7.12.4
#3 lore raw

Re: [PATCH] KVM: s390: virtio_ccw: reset errors for new I/O.

Quoted 9 lines · On Thu, 4 Apr 2013 11:28:35 +0200 Alexander Graf <[email protected]> wrote:
Quoted 6 lines · Cornelia Huck

ccw_io_helper neglected to reset vcdev->err after a new channel program had been successfully started, resulting in stale errors delivered after one I/O failed. Reset the error after a new channel program has been successfully started with no old I/O pending.

Quoted 3 lines
Quoted 1 line

Shouldn't this be CC: stable?

I don't think so, current code will not continue after errors anyway.

Quoted 29 lines

Alex

Quoted 24 lines

---
drivers/s390/kvm/virtio_ccw.c | 5 ++++-

1 file changed, 4 insertions(+), 1 deletion(-)
drivers/s390/kvm/virtio_ccw.c +4 -1
index 42d507c..5948f2a 100644
@@ -133,8 +133,11 @@ static int ccw_io_helper(struct virtio_ccw_device *vcdev,
 	do {
 		spin_lock_irqsave(get_ccwdev_lock(vcdev->cdev), flags);
 		ret = ccw_device_start(vcdev->cdev, ccw, intparm, 0, 0);
-		if (!ret)
+		if (!ret) {
+			if (!vcdev->curr_io)
+				vcdev->err = 0;
 			vcdev->curr_io |= flag;
+		}
 		spin_unlock_irqrestore(get_ccwdev_lock(vcdev->cdev), flags);
 		cpu_relax();
 	} while (ret == -EBUSY);
Signature · 1 line
1.7.12.4
#4 lore raw

Re: [PATCH] KVM: s390: virtio_ccw: reset errors for new I/O.

Quoted 12 lines · Cornelia Huck
Quoted 9 lines · On Thu, 4 Apr 2013 11:28:35 +0200 Alexander Graf <[email protected]> wrote:
Quoted 6 lines · Cornelia Huck

ccw_io_helper neglected to reset vcdev->err after a new channel program had been successfully started, resulting in stale errors delivered after one I/O failed. Reset the error after a new channel program has been successfully started with no old I/O pending.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Shouldn't this be CC: stable?

I don't think so, current code will not continue after errors anyway.

Yeah, I got confused by the cover letter for a single patch. Usually, when you only send a single patch, you wouldn't also send a cover letter :).

Alex