kvm: kvmctl: use a table to dispatch IO requests in kvmctl (v2)
This patch attempts to clean up kvmctl so that it can be more easily made to
work for multiple architectures and to support more emulation.
For dispatch, it's using a simple array as suggested by Avi.
For x86, we'll have two tables, a pio_table and an mmio_table. For PPC we can
just have a single table. The IO functions can support accesses of up to 8
bytes and can handle input/output in the same function.
I tried to keep this nice and simple so as to not add too much complexity to
kvmctl.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>