summaryrefslogtreecommitdiff
path: root/include/xen/xenbus.h
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2021-02-19 16:40:28 +0100
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>2021-02-23 10:07:11 -0600
commit06f45fe96fcd81531b0bcb2a6115da563ae6dbd6 (patch)
treee0004c9548d4612288b71f5fd541eab54fc63ead /include/xen/xenbus.h
parent7c70f3a7488d2fa62d32849d138bf2b8420fe788 (diff)
xen/events: add per-xenbus device event statistics and settings
Add syfs nodes for each xenbus device showing event statistics (number of events and spurious events, number of associated event channels) and for setting a spurious event threshold in case a frontend is sending too many events without being rogue on purpose. Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Link: https://lore.kernel.org/r/20210219154030.10892-7-jgross@suse.com Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Diffstat (limited to 'include/xen/xenbus.h')
-rw-r--r--include/xen/xenbus.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/xen/xenbus.h b/include/xen/xenbus.h
index bf3cfc7c35d0..0b1386073d49 100644
--- a/include/xen/xenbus.h
+++ b/include/xen/xenbus.h
@@ -88,6 +88,13 @@ struct xenbus_device {
struct completion down;
struct work_struct work;
struct semaphore reclaim_sem;
+
+ /* Event channel based statistics and settings. */
+ atomic_t event_channels;
+ atomic_t events;
+ atomic_t spurious_events;
+ atomic_t jiffies_eoi_delayed;
+ unsigned int spurious_threshold;
};
static inline struct xenbus_device *to_xenbus_device(struct device *dev)