]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
KVM: device: add simple registration mechanism for kvm_device_ops
authorWill Deacon <will.deacon@arm.com>
Tue, 2 Sep 2014 09:27:33 +0000 (10:27 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 17 Sep 2014 11:10:08 +0000 (13:10 +0200)
commitd60eacb07053142bfb9b41582074a89a790a9d46
treede5bddd60b8cf78dbe0c7eabbe4d46ae656713a7
parent184564efae4d775225c8fe3b762a56956fb1f827
KVM: device: add simple registration mechanism for kvm_device_ops

kvm_ioctl_create_device currently has knowledge of all the device types
and their associated ops. This is fairly inflexible when adding support
for new in-kernel device emulations, so move what we currently have out
into a table, which can support dynamic registration of ops by new
drivers for virtual hardware.

Cc: Alex Williamson <Alex.Williamson@redhat.com>
Cc: Alex Graf <agraf@suse.de>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/linux/kvm_host.h
include/uapi/linux/kvm.h
virt/kvm/kvm_main.c