2017-03-17 10:17:31 +07:00
|
|
|
/*
|
|
|
|
* Private stuff for vfio_ccw driver
|
|
|
|
*
|
|
|
|
* Copyright IBM Corp. 2017
|
|
|
|
*
|
|
|
|
* Author(s): Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
|
|
|
|
* Xiao Feng Ren <renxiaof@linux.vnet.ibm.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _VFIO_CCW_PRIVATE_H_
|
|
|
|
#define _VFIO_CCW_PRIVATE_H_
|
|
|
|
|
2017-03-17 10:17:34 +07:00
|
|
|
#include <linux/vfio_ccw.h>
|
|
|
|
|
2017-03-17 10:17:31 +07:00
|
|
|
#include "css.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* struct vfio_ccw_private
|
|
|
|
* @sch: pointer to the subchannel
|
|
|
|
* @completion: synchronization helper of the I/O completion
|
2017-03-17 10:17:33 +07:00
|
|
|
* @avail: available for creating a mediated device
|
|
|
|
* @mdev: pointer to the mediated device
|
|
|
|
* @nb: notifier for vfio events
|
2017-03-17 10:17:34 +07:00
|
|
|
* @io_region: MMIO region to input/output I/O arguments/results
|
2017-03-17 10:17:31 +07:00
|
|
|
*/
|
|
|
|
struct vfio_ccw_private {
|
|
|
|
struct subchannel *sch;
|
|
|
|
struct completion *completion;
|
2017-03-17 10:17:33 +07:00
|
|
|
atomic_t avail;
|
|
|
|
struct mdev_device *mdev;
|
|
|
|
struct notifier_block nb;
|
2017-03-17 10:17:34 +07:00
|
|
|
struct ccw_io_region io_region;
|
2017-03-17 10:17:31 +07:00
|
|
|
} __aligned(8);
|
|
|
|
|
2017-03-17 10:17:33 +07:00
|
|
|
extern int vfio_ccw_mdev_reg(struct subchannel *sch);
|
|
|
|
extern void vfio_ccw_mdev_unreg(struct subchannel *sch);
|
|
|
|
|
|
|
|
extern int vfio_ccw_sch_quiesce(struct subchannel *sch);
|
|
|
|
|
2017-03-17 10:17:31 +07:00
|
|
|
#endif
|