kvm: qemu: include qemu-kvm.h unconditionally
[kvm-userspace.git] / user / iotable.h
blobcb18f23789be1ea159f63b3059341033cafb7315
1 /*
2 * Kernel-based Virtual Machine test driver
4 * This test driver provides a simple way of testing kvm, without a full
5 * device model.
7 * Copyright (C) 2006 Qumranet
9 * Authors:
11 * Avi Kivity <avi@qumranet.com>
12 * Yaniv Kamay <yaniv@qumranet.com>
14 * This work is licensed under the GNU LGPL license, version 2.
17 #include <stdint.h>
19 #define MAX_IO_TABLE 50
21 typedef int (io_table_handler_t)(void *, int, int, uint64_t, uint64_t *);
23 struct io_table_entry
25 uint64_t start;
26 uint64_t end;
27 io_table_handler_t *handler;
28 void *opaque;
31 struct io_table
33 int nr_entries;
34 struct io_table_entry entries[MAX_IO_TABLE];
37 struct io_table_entry *io_table_lookup(struct io_table *io_table,
38 uint64_t addr);
39 int io_table_register(struct io_table *io_table, uint64_t start, uint64_t size,
40 io_table_handler_t *handler, void *opaque);