]> git.samba.org - sfrench/cifs-2.6.git/commitdiff
KVM: xen: flush deferred static key before checking it
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 26 Feb 2021 09:49:06 +0000 (04:49 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 26 Feb 2021 10:13:02 +0000 (05:13 -0500)
A missing flush would cause the static branch to trigger incorrectly.

Cc: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c

index 1d2bc89431a222f48246e0a2b388aaf428d14cfb..bfc928495bd44e9682471c50a34d5db72f0ae2c0 100644 (file)
@@ -8039,6 +8039,7 @@ void kvm_arch_exit(void)
        kvm_mmu_module_exit();
        free_percpu(user_return_msrs);
        kmem_cache_destroy(x86_fpu_cache);
+       static_key_deferred_flush(&kvm_xen_enabled);
        WARN_ON(static_branch_unlikely(&kvm_xen_enabled.key));
 }