mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-09-04 04:31:27 +00:00
A recent fix to virtio MMIO (72a7541ce305 ["kvm tools: virtio-mmio: init_ioeventfd should use MMIO for ioeventfd__add_event()"]) highlighted the confusing parameters expected by ioeventfd__add_event. As per Pekka's suggestion, replace the bool parameters to this function with a single `flags' argument instead. Cc: Ying-Shiuan Pan <yingshiuan.pan@gmail.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
32 lines
625 B
C
32 lines
625 B
C
#ifndef KVM__IOEVENTFD_H
|
|
#define KVM__IOEVENTFD_H
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/list.h>
|
|
#include <sys/eventfd.h>
|
|
#include "kvm/util.h"
|
|
|
|
struct kvm;
|
|
|
|
struct ioevent {
|
|
u64 io_addr;
|
|
u8 io_len;
|
|
void (*fn)(struct kvm *kvm, void *ptr);
|
|
struct kvm *fn_kvm;
|
|
void *fn_ptr;
|
|
int fd;
|
|
u64 datamatch;
|
|
|
|
struct list_head list;
|
|
};
|
|
|
|
#define IOEVENTFD_FLAG_PIO (1 << 0)
|
|
#define IOEVENTFD_FLAG_USER_POLL (1 << 1)
|
|
|
|
int ioeventfd__init(struct kvm *kvm);
|
|
int ioeventfd__exit(struct kvm *kvm);
|
|
int ioeventfd__add_event(struct ioevent *ioevent, int flags);
|
|
int ioeventfd__del_event(u64 addr, u64 datamatch);
|
|
|
|
#endif
|