diff options
author | Andre Przywara <andre.przywara@arm.com> | 2016-07-15 07:43:26 -0400 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2016-07-18 13:10:40 -0400 |
commit | 8a39d00670f0792c1186e442e1dd28fe0326f2ee (patch) | |
tree | 8c480a938d0eea48c798c2ddeaa08c2e83d5a047 /include/linux/kvm_host.h | |
parent | b46f01ce4dcfdce636588fe2ef5035724c77f266 (diff) |
KVM: kvm_io_bus: Add kvm_io_bus_get_dev() call
The kvm_io_bus framework is a nice place of holding information about
various MMIO regions for kernel emulated devices.
Add a call to retrieve the kvm_io_device structure which is associated
with a certain MMIO address. This avoids to duplicate kvm_io_bus'
knowledge of MMIO regions without having to fake MMIO calls if a user
needs the device a certain MMIO address belongs to.
This will be used by the ITS emulation to get the associated ITS device
when someone triggers an MSI via an ioctl from userspace.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r-- | include/linux/kvm_host.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 0640ee92b978..614a98137c5f 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -164,6 +164,8 @@ int kvm_io_bus_register_dev(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, | |||
164 | int len, struct kvm_io_device *dev); | 164 | int len, struct kvm_io_device *dev); |
165 | int kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, | 165 | int kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, |
166 | struct kvm_io_device *dev); | 166 | struct kvm_io_device *dev); |
167 | struct kvm_io_device *kvm_io_bus_get_dev(struct kvm *kvm, enum kvm_bus bus_idx, | ||
168 | gpa_t addr); | ||
167 | 169 | ||
168 | #ifdef CONFIG_KVM_ASYNC_PF | 170 | #ifdef CONFIG_KVM_ASYNC_PF |
169 | struct kvm_async_pf { | 171 | struct kvm_async_pf { |