mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
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>
This commit is contained in:
parent
6c47469453
commit
bda9020e24
10 changed files with 152 additions and 208 deletions
|
|
@ -60,8 +60,10 @@ struct kvm_io_bus {
|
|||
|
||||
void kvm_io_bus_init(struct kvm_io_bus *bus);
|
||||
void kvm_io_bus_destroy(struct kvm_io_bus *bus);
|
||||
struct kvm_io_device *kvm_io_bus_find_dev(struct kvm_io_bus *bus,
|
||||
gpa_t addr, int len, int is_write);
|
||||
int kvm_io_bus_write(struct kvm_io_bus *bus, gpa_t addr, int len,
|
||||
const void *val);
|
||||
int kvm_io_bus_read(struct kvm_io_bus *bus, gpa_t addr, int len,
|
||||
void *val);
|
||||
void __kvm_io_bus_register_dev(struct kvm_io_bus *bus,
|
||||
struct kvm_io_device *dev);
|
||||
void kvm_io_bus_register_dev(struct kvm *kvm, struct kvm_io_bus *bus,
|
||||
|
|
|
|||
Loading…
Reference in a new issue