KVM: PPC: Move xics_debugfs_init out of create
authorChristoffer Dall <christoffer.dall@linaro.org>
Tue, 9 Aug 2016 17:13:00 +0000 (19:13 +0200)
committerRadim Krčmář <rkrcmar@redhat.com>
Fri, 12 Aug 2016 10:01:26 +0000 (12:01 +0200)
commit023e9fddc3616b005c3753fc1bb6526388cd7a30
tree443aa4c9d82f97022982ba97f8da12f0cbfcae0a
parent29b4817d4018df78086157ea3a55c1d9424a7cfc
KVM: PPC: Move xics_debugfs_init out of create

As we are about to hold the kvm->lock during the create operation on KVM
devices, we should move the call to xics_debugfs_init into its own
function, since holding a mutex over extended amounts of time might not
be a good idea.

Introduce an init operation on the kvm_device_ops struct which cannot
fail and call this, if configured, after the device has been created.

Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/powerpc/kvm/book3s_xics.c
include/linux/kvm_host.h
virt/kvm/kvm_main.c