summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/hyperv.c
diff options
context:
space:
mode:
authorRoman Kagan <rkagan@virtuozzo.com>2018-02-01 14:48:31 +0100
committerRadim Krčmář <rkrcmar@redhat.com>2018-03-06 18:19:03 +0100
commitcbc0236a4b3e6a64f5b8bee27b530c7f8bee8d56 (patch)
treed05b828cc09e73ccd1e250beff340d3f14f91b81 /arch/x86/kvm/hyperv.c
parentLinux 4.16-rc4 (diff)
downloadlinux-cbc0236a4b3e6a64f5b8bee27b530c7f8bee8d56.tar.xz
linux-cbc0236a4b3e6a64f5b8bee27b530c7f8bee8d56.zip
kvm: x86: factor out kvm.arch.hyperv (de)init
Move kvm.arch.hyperv initialization and cleanup to separate functions. For now only a mutex is inited in the former, and the latter is empty; more stuff will go in there in a followup patch. Signed-off-by: Roman Kagan <rkagan@virtuozzo.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Diffstat (limited to 'arch/x86/kvm/hyperv.c')
-rw-r--r--arch/x86/kvm/hyperv.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
index dc97f2544b6f..015fb06c7522 100644
--- a/arch/x86/kvm/hyperv.c
+++ b/arch/x86/kvm/hyperv.c
@@ -1301,3 +1301,12 @@ set_result:
kvm_hv_hypercall_set_result(vcpu, ret);
return 1;
}
+
+void kvm_hv_init_vm(struct kvm *kvm)
+{
+ mutex_init(&kvm->arch.hyperv.hv_lock);
+}
+
+void kvm_hv_destroy_vm(struct kvm *kvm)
+{
+}