Message ID | 1542906675-7949-3-git-send-email-pmorel@linux.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | s390: vfio: ap: Using GISA for AP Interrupt | expand |
On Thu, 22 Nov 2018 18:11:14 +0100 Pierre Morel <pmorel@linux.ibm.com> wrote: > We define two VFIO ioctl command to setup and clear > the AP Queues interrupt. > > Arguments passed by the guest are: > - the apqn, AP queue number > - the Notification by address > - the identifier of the previously associated adapter We have an extensible VFIO_DEVICE_SET_IRQS ioctl already, why does AP need its own? > Signed-off-by: Pierre Morel <pmorel@linux.ibm.com> > --- > include/uapi/linux/vfio.h | 25 +++++++++++++++++++++++++ > 1 file changed, 25 insertions(+) > > diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h > index 8131028..9a1b350 100644 > --- a/include/uapi/linux/vfio.h > +++ b/include/uapi/linux/vfio.h > @@ -866,6 +866,31 @@ struct vfio_iommu_spapr_tce_remove { > }; > #define VFIO_IOMMU_SPAPR_TCE_REMOVE _IO(VFIO_TYPE, VFIO_BASE + 20) > > +/** > + * VFIO_AP_SET_IRQ - _IOWR(VFIO_TYPE, VFIO_BASE + 21, struct vfio_ap_aqic) > + * > + * Setup IRQ for an AP Queue > + * @cmd contains the AP queue number (apqn) > + * @status receives the resulting status of the command > + * @nib is the Notification Indicator byte address > + * @adapter_id allows to retrieve the associated adapter > + */ > +struct vfio_ap_aqic { > + __u32 argsz; > + __u32 flags; > + /* out */ > + __u32 status; > + /* in */ > + __u32 adapter_id; > + __u64 nib; > + __u16 apqn; > + __u8 isc; > + __u8 reserved[5]; > +}; > +#define VFIO_AP_SET_IRQ _IO(VFIO_TYPE, VFIO_BASE + 21) > +#define VFIO_AP_CLEAR_IRQ _IO(VFIO_TYPE, VFIO_BASE + 22) > + > /* ***************************************************************** */ > > + > #endif /* _UAPIVFIO_H */
On 27/11/2018 18:22, Alex Williamson wrote: > On Thu, 22 Nov 2018 18:11:14 +0100 > Pierre Morel <pmorel@linux.ibm.com> wrote: > >> We define two VFIO ioctl command to setup and clear >> the AP Queues interrupt. >> >> Arguments passed by the guest are: >> - the apqn, AP queue number >> - the Notification by address >> - the identifier of the previously associated adapter > > > We have an extensible VFIO_DEVICE_SET_IRQS ioctl already, why does AP > need its own? For no good reason. Sorry for this. I will change for the use of the standard VFIO_DEVICE_SET_IRQS. Thanks Alex. Regards, Pierre > > >> Signed-off-by: Pierre Morel <pmorel@linux.ibm.com> >> --- >> include/uapi/linux/vfio.h | 25 +++++++++++++++++++++++++ >> 1 file changed, 25 insertions(+) >> >> diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h >> index 8131028..9a1b350 100644 >> --- a/include/uapi/linux/vfio.h >> +++ b/include/uapi/linux/vfio.h >> @@ -866,6 +866,31 @@ struct vfio_iommu_spapr_tce_remove { >> }; >> #define VFIO_IOMMU_SPAPR_TCE_REMOVE _IO(VFIO_TYPE, VFIO_BASE + 20) >> >> +/** >> + * VFIO_AP_SET_IRQ - _IOWR(VFIO_TYPE, VFIO_BASE + 21, struct vfio_ap_aqic) >> + * >> + * Setup IRQ for an AP Queue >> + * @cmd contains the AP queue number (apqn) >> + * @status receives the resulting status of the command >> + * @nib is the Notification Indicator byte address >> + * @adapter_id allows to retrieve the associated adapter >> + */ >> +struct vfio_ap_aqic { >> + __u32 argsz; >> + __u32 flags; >> + /* out */ >> + __u32 status; >> + /* in */ >> + __u32 adapter_id; >> + __u64 nib; >> + __u16 apqn; >> + __u8 isc; >> + __u8 reserved[5]; >> +}; >> +#define VFIO_AP_SET_IRQ _IO(VFIO_TYPE, VFIO_BASE + 21) >> +#define VFIO_AP_CLEAR_IRQ _IO(VFIO_TYPE, VFIO_BASE + 22) >> + >> /* ***************************************************************** */ >> >> + >> #endif /* _UAPIVFIO_H */ >
diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h index 8131028..9a1b350 100644 --- a/include/uapi/linux/vfio.h +++ b/include/uapi/linux/vfio.h @@ -866,6 +866,31 @@ struct vfio_iommu_spapr_tce_remove { }; #define VFIO_IOMMU_SPAPR_TCE_REMOVE _IO(VFIO_TYPE, VFIO_BASE + 20) +/** + * VFIO_AP_SET_IRQ - _IOWR(VFIO_TYPE, VFIO_BASE + 21, struct vfio_ap_aqic) + * + * Setup IRQ for an AP Queue + * @cmd contains the AP queue number (apqn) + * @status receives the resulting status of the command + * @nib is the Notification Indicator byte address + * @adapter_id allows to retrieve the associated adapter + */ +struct vfio_ap_aqic { + __u32 argsz; + __u32 flags; + /* out */ + __u32 status; + /* in */ + __u32 adapter_id; + __u64 nib; + __u16 apqn; + __u8 isc; + __u8 reserved[5]; +}; +#define VFIO_AP_SET_IRQ _IO(VFIO_TYPE, VFIO_BASE + 21) +#define VFIO_AP_CLEAR_IRQ _IO(VFIO_TYPE, VFIO_BASE + 22) + /* ***************************************************************** */ + #endif /* _UAPIVFIO_H */
We define two VFIO ioctl command to setup and clear the AP Queues interrupt. Arguments passed by the guest are: - the apqn, AP queue number - the Notification by address - the identifier of the previously associated adapter Signed-off-by: Pierre Morel <pmorel@linux.ibm.com> --- include/uapi/linux/vfio.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)