OSDN Git Service

vfio-ccw: protect the I/O region
authorCornelia Huck <cohuck@redhat.com>
Tue, 8 Jan 2019 14:53:03 +0000 (15:53 +0100)
committerCornelia Huck <cohuck@redhat.com>
Wed, 24 Apr 2019 12:18:51 +0000 (14:18 +0200)
commit4f76617378ee97c557b526cb58d3c61eb0a9c963
tree42e9ac6864535d6d1ea1210790dfccf072eb73bb
parent690f6a1581c7c08e85451f62bcbfe40f29072842
vfio-ccw: protect the I/O region

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.

Reviewed-by: Eric Farman <farman@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
drivers/s390/cio/vfio_ccw_drv.c
drivers/s390/cio/vfio_ccw_ops.c
drivers/s390/cio/vfio_ccw_private.h