diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2009-06-29 15:24:32 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-09-10 01:33:05 -0400 |
commit | bda9020e2463ec94db9f97e8615f3bae22069838 (patch) | |
tree | 48125316d4c0f419a35aefdfbf665d30ad0c55ca /include | |
parent | 6c474694530f377507f9aca438c17206e051e6e7 (diff) |
KVM: remove in_range from io devices
This changes bus accesses to use high-level kvm_io_bus_read/kvm_io_bus_write
functions. in_range now becomes unused so it is removed from device ops in
favor of read/write callbacks performing range checks internally.
This allows aliasing (mostly for in-kernel virtio), as well as better error
handling by making it possible to pass errors up to userspace.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/kvm_host.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 96c8c0b01929..077e8bb875a9 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -60,8 +60,10 @@ struct kvm_io_bus { | |||
60 | 60 | ||
61 | void kvm_io_bus_init(struct kvm_io_bus *bus); | 61 | void kvm_io_bus_init(struct kvm_io_bus *bus); |
62 | void kvm_io_bus_destroy(struct kvm_io_bus *bus); | 62 | void kvm_io_bus_destroy(struct kvm_io_bus *bus); |
63 | struct kvm_io_device *kvm_io_bus_find_dev(struct kvm_io_bus *bus, | 63 | int kvm_io_bus_write(struct kvm_io_bus *bus, gpa_t addr, int len, |
64 | gpa_t addr, int len, int is_write); | 64 | const void *val); |
65 | int kvm_io_bus_read(struct kvm_io_bus *bus, gpa_t addr, int len, | ||
66 | void *val); | ||
65 | void __kvm_io_bus_register_dev(struct kvm_io_bus *bus, | 67 | void __kvm_io_bus_register_dev(struct kvm_io_bus *bus, |
66 | struct kvm_io_device *dev); | 68 | struct kvm_io_device *dev); |
67 | void kvm_io_bus_register_dev(struct kvm *kvm, struct kvm_io_bus *bus, | 69 | void kvm_io_bus_register_dev(struct kvm *kvm, struct kvm_io_bus *bus, |