From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Morel Subject: [PATCH v1 2/7] vfio: ap: VFIO AP Queue Interrupt Control Date: Wed, 31 Oct 2018 19:12:52 +0100 Message-ID: <1541009577-29656-3-git-send-email-pmorel@linux.ibm.com> References: <1541009577-29656-1-git-send-email-pmorel@linux.ibm.com> Cc: alex.williamson@redhat.com, cohuck@redhat.com, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, kvm@vger.kernel.org, frankja@linux.ibm.com, akrowiak@linux.ibm.com, pasic@linux.ibm.com, david@redhat.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, freude@linux.ibm.com, mimu@linux.ibm.com To: borntraeger@de.ibm.com Return-path: In-Reply-To: <1541009577-29656-1-git-send-email-pmorel@linux.ibm.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org 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 --- include/uapi/linux/vfio.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h index f378b9802d8b..f13079bb28af 100644 --- a/include/uapi/linux/vfio.h +++ b/include/uapi/linux/vfio.h @@ -816,6 +816,28 @@ 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; + /* in */ + __u64 cmd; + __u64 status; + __u64 nib; + __u32 adapter_id; +}; +#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 */ -- 2.17.0