From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:36628) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtDxM-0000JY-IK for qemu-devel@nongnu.org; Mon, 11 Feb 2019 10:57:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtDxL-0007op-TE for qemu-devel@nongnu.org; Mon, 11 Feb 2019 10:57:16 -0500 Date: Mon, 11 Feb 2019 16:57:04 +0100 From: Cornelia Huck Message-ID: <20190211165704.42090ae6.cohuck@redhat.com> In-Reply-To: <9ae9987a-f48d-9f35-9320-b9cfde6b2bad@linux.ibm.com> References: <20190130132212.7376-1-cohuck@redhat.com> <20190130132212.7376-4-cohuck@redhat.com> <9ae9987a-f48d-9f35-9320-b9cfde6b2bad@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 3/6] vfio-ccw: protect the I/O region List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Farman Cc: Halil Pasic , Farhan Ali , Pierre Morel , linux-s390@vger.kernel.org, kvm@vger.kernel.org, qemu-devel@nongnu.org, qemu-s390x@nongnu.org, Alex Williamson On Fri, 8 Feb 2019 16:26:06 -0500 Eric Farman wrote: > On 01/30/2019 08:22 AM, Cornelia Huck wrote: > > Introduce a mutex to disallow concurrent reads or writes to the > > I/O region. This makes sure that the data the kernel or user > > space see is always consistent. > > > > The same mutex will be used to protect the async region as well. > > > > Signed-off-by: Cornelia Huck > > I keep wondering how the FSM could provide this, but I end up getting > into chicken/egg rabbit holes. Yes, if the fsm is able to provide this, it is probably not in an easy-to-understand way... > So, until my brain becomes wiser... > > Reviewed-by: Eric Farman Thanks! > > > --- > > drivers/s390/cio/vfio_ccw_drv.c | 3 +++ > > drivers/s390/cio/vfio_ccw_ops.c | 28 +++++++++++++++++++--------- > > drivers/s390/cio/vfio_ccw_private.h | 2 ++ > > 3 files changed, 24 insertions(+), 9 deletions(-)