Files
Will Deacon 27347f76ac kvm tools: ioeventfd: replace bool parameters to __add_event with flags
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>
2015-06-01 16:39:54 +01:00

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