OSDN Git Service

vfio/platform: trigger an interrupt via eventfd
authorAntonios Motakis <a.motakis@virtualopensystems.com>
Mon, 16 Mar 2015 20:08:50 +0000 (14:08 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 16 Mar 2015 20:08:50 +0000 (14:08 -0600)
commit57f972e2b341dd6a73533f9293ec55d584a5d833
treea9ff1aa6e1770af3f07e16f84de211015d68790b
parent9a36321c8d3350c4f7befa02adf3ce4583287ad9
vfio/platform: trigger an interrupt via eventfd

This patch allows to set an eventfd for a platform device's interrupt,
and also to trigger the interrupt eventfd from userspace for testing.
Level sensitive interrupts are marked as maskable and are handled in
a later patch. Edge triggered interrupts are not advertised as maskable
and are implemented here using a simple and efficient IRQ handler.

Signed-off-by: Antonios Motakis <a.motakis@virtualopensystems.com>
[Baptiste Reynal: fix masked interrupt initialization]
Signed-off-by: Baptiste Reynal <b.reynal@virtualopensystems.com>
Reviewed-by: Eric Auger <eric.auger@linaro.org>
Tested-by: Eric Auger <eric.auger@linaro.org>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/platform/vfio_platform_irq.c
drivers/vfio/platform/vfio_platform_private.h