History

virt: acrn: Introduce irqfd

irqfd is a mechanism to inject a specific interrupt to a User VM using a decoupled eventfd mechanism. Vhost is a kernel-level virtio server which uses eventfd for interrupt injection. To support vhost on ACRN, irqfd is introduced in HSM. HSM provides ioctls to associate a virtual Message Signaled Interrupt (MSI) with an eventfd. The corresponding virtual MSI will be injected into a User VM once the eventfd got signal.

Shuo Liu committed 5 years ago

Commit aa3b4831 parent d8ad5156 files · +271 −1Browse files

Showing the changes to include/uapi (1 of 6 files). Show all

Unified · Split

include/uapi/linux/acrn.h+15−0
@@ -505,6 +505,19 @@ struct acrn_ioeventfd { · 504 unmodified lines
505 __u64 data;505 __u64 data;
506};506};
507 507
508#define ACRN_IRQFD_FLAG_DEASSIGN 0x01
509/**
510 * struct acrn_irqfd - Data to operate a &struct hsm_irqfd
511 * @fd: The fd of eventfd associated with a hsm_irqfd
512 * @flags: Logical-OR of ACRN_IRQFD_FLAG_*
513 * @msi: Info of MSI associated with the irqfd
514 */
515struct acrn_irqfd {
516 __s32 fd;
517 __u32 flags;
518 struct acrn_msi_entry msi;
519};
520
508/* The ioctl type, documented in ioctl-number.rst */521/* The ioctl type, documented in ioctl-number.rst */
509#define ACRN_IOCTL_TYPE 0xA2522#define ACRN_IOCTL_TYPE 0xA2
510 523
@@ -561,5 +574,7 @@ struct acrn_ioeventfd { · 50 unmodified lines
561 574
562#define ACRN_IOCTL_IOEVENTFD \575#define ACRN_IOCTL_IOEVENTFD \
563 _IOW(ACRN_IOCTL_TYPE, 0x70, struct acrn_ioeventfd)576 _IOW(ACRN_IOCTL_TYPE, 0x70, struct acrn_ioeventfd)
577#define ACRN_IOCTL_IRQFD \
578 _IOW(ACRN_IOCTL_TYPE, 0x71, struct acrn_irqfd)
564 579
565#endif /* _UAPI_ACRN_H */580#endif /* _UAPI_ACRN_H */