[−][src]Struct vfio_bindings::bindings::vfio::vfio_irq_set
VFIO_DEVICE_SET_IRQS - _IOW(VFIO_TYPE, VFIO_BASE + 10, struct vfio_irq_set)
Set signaling, masking, and unmasking of interrupts. Caller provides struct vfio_irq_set with all fields set. 'start' and 'count' indicate the range of subindexes being specified.
The DATA flags specify the type of data provided. If DATA_NONE, the operation performs the specified action immediately on the specified interrupt(s). For example, to unmask AUTOMASKED interrupt [0,0]: flags = (DATA_NONE|ACTION_UNMASK), index = 0, start = 0, count = 1.
DATA_BOOL allows sparse support for the same on arrays of interrupts. For example, to mask interrupts [0,1] and [0,3] (but not [0,2]): flags = (DATA_BOOL|ACTION_MASK), index = 0, start = 1, count = 3, data = {1,0,1}
DATA_EVENTFD binds the specified ACTION to the provided __s32 eventfd. A value of -1 can be used to either de-assign interrupts if already assigned or skip un-assigned interrupts. For example, to set an eventfd to be trigger for interrupts [0,0] and [0,2]: flags = (DATA_EVENTFD|ACTION_TRIGGER), index = 0, start = 0, count = 3, data = {fd1, -1, fd2} If index [0,1] is previously set, two count = 1 ioctls calls would be required to set [0,0] and [0,2] without changing [0,1].
Once a signaling mechanism is set, DATA_BOOL or DATA_NONE can be used with ACTION_TRIGGER to perform kernel level interrupt loopback testing from userspace (ie. simulate hardware triggering).
Setting of an event triggering mechanism to userspace for ACTION_TRIGGER enables the interrupt index for the device. Individual subindex interrupts can be disabled using the -1 value for DATA_EVENTFD or the index can be disabled as a whole with: flags = (DATA_NONE|ACTION_TRIGGER), count = 0.
Note that ACTION_[UN]MASK specify user->kernel signaling (irqfds) while ACTION_TRIGGER specifies kernel->user signaling.
Fields
argsz: __u32
flags: __u32
index: __u32
start: __u32
count: __u32
data: __IncompleteArrayField<__u8>
Trait Implementations
Auto Trait Implementations
impl Send for vfio_irq_set
impl Sync for vfio_irq_set
impl Unpin for vfio_irq_set
impl UnwindSafe for vfio_irq_set
impl RefUnwindSafe for vfio_irq_set
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,