On 05/10/2010 06:13 PM, Cam Macdonell wrote:
+int kvm_set_ioeventfd_mmio_long(int fd, uint32_t addr, uint32_t val, bool
assign)
+{
+
+ int ret;
+ struct kvm_ioeventfd iofd;
+
+ iofd.datamatch = val;
+ iofd.addr = addr;
+ iofd.len = 4;
+ iofd.flags = KVM_IOEVENTFD_FLAG_DATAMATCH;
+ iofd.fd = fd;
+
+ if (!kvm_enabled())
+ return -ENOSYS;
+ if (!assign)
+ iofd.flags |= KVM_IOEVENTFD_FLAG_DEASSIGN;
May be more usable to have separate assign and deassign functions (that can
call into a single internal implementation).
I believe the convention so far is to use the 'assign' flag as
Michael's patch and the PIO version kvm_set_ioeventfd_pio_word() do.
I dislike bool arguments since they're hard to understand at the call
site. However if there's precedent we can stick to it and perhaps
change it all later.
--
error compiling committee.c: too many arguments to function
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html