From mboxrd@z Thu Jan 1 00:00:00 1970 From: Halil Pasic Subject: Re: [PATCH v2 2/5] vfio-ccw: concurrent I/O handling Date: Tue, 22 Jan 2019 19:33:46 +0100 Message-ID: <20190122193346.4e23e018@oc2783563651> References: <20190121110354.2247-1-cohuck@redhat.com> <20190121110354.2247-3-cohuck@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: linux-s390@vger.kernel.org, Eric Farman , Pierre Morel , kvm@vger.kernel.org, qemu-s390x@nongnu.org, Farhan Ali , qemu-devel@nongnu.org, Alex Williamson To: Cornelia Huck Return-path: In-Reply-To: <20190121110354.2247-3-cohuck@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel2=m.gmane.org@nongnu.org Sender: "Qemu-devel" List-Id: kvm.vger.kernel.org On Mon, 21 Jan 2019 12:03:51 +0100 Cornelia Huck wrote: > --- a/drivers/s390/cio/vfio_ccw_private.h > +++ b/drivers/s390/cio/vfio_ccw_private.h > @@ -28,6 +28,7 @@ > * @mdev: pointer to the mediated device > * @nb: notifier for vfio events > * @io_region: MMIO region to input/output I/O arguments/results > + * @io_mutex: protect against concurrent update of I/O structures We could be a bit more specific about what does this mutex guard. Is it only io_region, or cp, irb and the new regions a well? ->state does not seem to be covered, but should need some sort of synchronisation too, or? > * @cp: channel program for the current I/O operation > * @irb: irb info received from interrupt > * @scsw: scsw info > @@ -42,6 +43,7 @@ struct vfio_ccw_private { > struct mdev_device *mdev; > struct notifier_block nb; > struct ccw_io_region *io_region; > + struct mutex io_mutex; > > struct channel_program cp; > struct irb irb; > --