All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Heiko Carstens <heiko.carstens@de.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Farhan Ali <alifm@linux.ibm.com>,
	Eric Farman <farman@linux.ibm.com>,
	Halil Pasic <pasic@linux.ibm.com>,
	linux-s390@vger.kernel.org, kvm@vger.kernel.org,
	Pierre Morel <pmorel@linux.ibm.com>,
	Cornelia Huck <cohuck@redhat.com>
Subject: [PULL 2/7] s390/cio: Set vfio-ccw FSM state before ioeventfd
Date: Mon,  3 Jun 2019 12:50:33 +0200	[thread overview]
Message-ID: <20190603105038.11788-3-cohuck@redhat.com> (raw)
In-Reply-To: <20190603105038.11788-1-cohuck@redhat.com>

From: Eric Farman <farman@linux.ibm.com>

Otherwise, the guest can believe it's okay to start another I/O
and bump into the non-idle state.  This results in a cc=2 (with
the asynchronous CSCH/HSCH code) returned to the guest, which is
unfortunate since everything is otherwise working normally.

Signed-off-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Message-Id: <20190514234248.36203-3-farman@linux.ibm.com>
Reviewed-by: Farhan Ali <alifm@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
 drivers/s390/cio/vfio_ccw_drv.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/s390/cio/vfio_ccw_drv.c b/drivers/s390/cio/vfio_ccw_drv.c
index ee8767f5845a..66a66ac1f3d1 100644
--- a/drivers/s390/cio/vfio_ccw_drv.c
+++ b/drivers/s390/cio/vfio_ccw_drv.c
@@ -95,11 +95,11 @@ static void vfio_ccw_sch_io_todo(struct work_struct *work)
 	memcpy(private->io_region->irb_area, irb, sizeof(*irb));
 	mutex_unlock(&private->io_mutex);
 
-	if (private->io_trigger)
-		eventfd_signal(private->io_trigger, 1);
-
 	if (private->mdev && is_final)
 		private->state = VFIO_CCW_STATE_IDLE;
+
+	if (private->io_trigger)
+		eventfd_signal(private->io_trigger, 1);
 }
 
 /*
-- 
2.20.1

  parent reply	other threads:[~2019-06-03 10:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-03 10:50 [PULL 0/7] vfio-ccw: fixes Cornelia Huck
2019-06-03 10:50 ` [PULL 1/7] s390/cio: Update SCSW if it points to the end of the chain Cornelia Huck
2019-06-03 10:50 ` Cornelia Huck [this message]
2019-06-03 10:50 ` [PULL 3/7] s390/cio: Split pfn_array_alloc_pin into pieces Cornelia Huck
2019-06-03 10:50 ` [PULL 4/7] s390/cio: Initialize the host addresses in pfn_array Cornelia Huck
2019-06-03 10:50 ` [PULL 5/7] s390/cio: Don't pin vfio pages for empty transfers Cornelia Huck
2019-06-03 10:50 ` [PULL 6/7] s390/cio: Allow zero-length CCWs in vfio-ccw Cornelia Huck
2019-06-03 10:50 ` [PULL 7/7] s390/cio: Remove vfio-ccw checks of command codes Cornelia Huck
2019-06-03 11:11 ` [PULL 0/7] vfio-ccw: fixes Heiko Carstens
2019-06-03 11:16   ` Cornelia Huck
2019-06-03 13:00     ` Farhan Ali
2019-06-03 13:23     ` Eric Farman
2019-06-04 15:24     ` Heiko Carstens

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=20190603105038.11788-3-cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=alifm@linux.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=farman@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=pasic@linux.ibm.com \
    --cc=pmorel@linux.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.