diff options
author | Christoffer Dall <christoffer.dall@linaro.org> | 2016-08-09 13:13:00 -0400 |
---|---|---|
committer | Radim Krčmář <rkrcmar@redhat.com> | 2016-08-12 06:01:26 -0400 |
commit | 023e9fddc3616b005c3753fc1bb6526388cd7a30 (patch) | |
tree | 443aa4c9d82f97022982ba97f8da12f0cbfcae0a /include/linux/kvm_host.h | |
parent | 29b4817d4018df78086157ea3a55c1d9424a7cfc (diff) |
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>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r-- | include/linux/kvm_host.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 01e908ac4a39..d3c9b82812c3 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -1116,6 +1116,12 @@ struct kvm_device_ops { | |||
1116 | int (*create)(struct kvm_device *dev, u32 type); | 1116 | int (*create)(struct kvm_device *dev, u32 type); |
1117 | 1117 | ||
1118 | /* | 1118 | /* |
1119 | * init is called after create if create is successful and is called | ||
1120 | * outside of holding kvm->lock. | ||
1121 | */ | ||
1122 | void (*init)(struct kvm_device *dev); | ||
1123 | |||
1124 | /* | ||
1119 | * Destroy is responsible for freeing dev. | 1125 | * Destroy is responsible for freeing dev. |
1120 | * | 1126 | * |
1121 | * Destroy may be called before or after destructors are called | 1127 | * Destroy may be called before or after destructors are called |