diff options
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r-- | include/linux/kvm_host.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 01e908ac4a39..9c28b4d4c90b 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -1113,9 +1113,21 @@ struct kvm_device { | |||
1113 | /* create, destroy, and name are mandatory */ | 1113 | /* create, destroy, and name are mandatory */ |
1114 | struct kvm_device_ops { | 1114 | struct kvm_device_ops { |
1115 | const char *name; | 1115 | const char *name; |
1116 | |||
1117 | /* | ||
1118 | * create is called holding kvm->lock and any operations not suitable | ||
1119 | * to do while holding the lock should be deferred to init (see | ||
1120 | * below). | ||
1121 | */ | ||
1116 | int (*create)(struct kvm_device *dev, u32 type); | 1122 | int (*create)(struct kvm_device *dev, u32 type); |
1117 | 1123 | ||
1118 | /* | 1124 | /* |
1125 | * init is called after create if create is successful and is called | ||
1126 | * outside of holding kvm->lock. | ||
1127 | */ | ||
1128 | void (*init)(struct kvm_device *dev); | ||
1129 | |||
1130 | /* | ||
1119 | * Destroy is responsible for freeing dev. | 1131 | * Destroy is responsible for freeing dev. |
1120 | * | 1132 | * |
1121 | * Destroy may be called before or after destructors are called | 1133 | * Destroy may be called before or after destructors are called |