Skip to contentSkip to conversation

KVM: flush deferred static key before checking it

PATCH In review Paolo Bonzini 2 participants 2 messages Feb 26, 2021 – Mar 1, 2021

Subsystems (3)
lore
Share & tools
lore

Paolo Bonzini

author maintainer
#0 lore raw

PATCH 1/1 KVM: flush deferred static key before checking it

A missing flush would cause the static branch to trigger incorrectly.

Cc David Woodhouse <[email protected]>
---
 arch/x86/kvm/x86.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/kvm/x86.c +1 -0
index 1d2bc89431a2..bfc928495bd4 100644
@@ -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));
 }
 
Signature · 1 line
2.26.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Paolo Bonzini

A missing flush would cause the static branch to trigger incorrectly.

Cc David Woodhouse <[email protected]>

Thanks.

Amazon Development Centre (London) Ltd. Registered in England and Wales with registration number 04543232 with its registered office at 1 Principal Place, Worship Street, London EC2A 2FA, United Kingdom.