From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: linux-s390 <linux-s390@vger.kernel.org>,
qemu-devel <qemu-devel@nongnu.org>, KVM <kvm@vger.kernel.org>,
virtualization@lists.linux-foundation.org
Subject: Re: [Qemu-devel] [RFC PATCH v2 1/2] KVM: s390: virtio-ccw: Handle command rejects.
Date: Wed, 10 Jul 2013 10:47:25 +0200 [thread overview]
Message-ID: <51DD1F9D.9060500@de.ibm.com> (raw)
In-Reply-To: <1373369657-51675-2-git-send-email-cornelia.huck@de.ibm.com>
On 09/07/13 13:34, Cornelia Huck wrote:
> A command reject for a ccw may happen if we run on a host not supporting
> a certain feature. We want to be able to handle this as special case of
> command failure, so let's split this off from the generic -EIO error code.
>
> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
> drivers/s390/kvm/virtio_ccw.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/s390/kvm/virtio_ccw.c b/drivers/s390/kvm/virtio_ccw.c
> index 779dc51..d6c7aba 100644
> --- a/drivers/s390/kvm/virtio_ccw.c
> +++ b/drivers/s390/kvm/virtio_ccw.c
> @@ -639,8 +639,15 @@ static void virtio_ccw_int_handler(struct ccw_device *cdev,
> (SCSW_STCTL_ALERT_STATUS | SCSW_STCTL_STATUS_PEND))) {
> /* OK */
> }
> - if (irb_is_error(irb))
> - vcdev->err = -EIO; /* XXX - use real error */
> + if (irb_is_error(irb)) {
> + /* Command reject? */
> + if ((scsw_dstat(&irb->scsw) & DEV_STAT_UNIT_CHECK) &&
> + (irb->ecw[0] & SNS0_CMD_REJECT))
> + vcdev->err = -EOPNOTSUPP;
> + else
> + /* Map everything else to -EIO. */
> + vcdev->err = -EIO;
> + }
> if (vcdev->curr_io & activity) {
> switch (activity) {
> case VIRTIO_CCW_DOING_READ_FEAT:
>
next prev parent reply other threads:[~2013-07-10 8:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-09 11:34 [Qemu-devel] [RFC PATCH v2 0/2] KVM: s390: virtio-ccw adapter interrupts Cornelia Huck
2013-07-09 11:34 ` [Qemu-devel] [RFC PATCH v2 1/2] KVM: s390: virtio-ccw: Handle command rejects Cornelia Huck
2013-07-10 8:47 ` Christian Borntraeger [this message]
2013-07-09 11:34 ` [Qemu-devel] [RFC PATCH v2 2/2] KVM: s390: virtio-ccw adapter interrupt support Cornelia Huck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51DD1F9D.9060500@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).