* [PATCH] KVM: flush deferred static key before checking it
@ 2021-02-26 10:08 Paolo Bonzini
2021-03-01 12:24 ` Woodhouse, David
0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2021-02-26 10:08 UTC (permalink / raw)
To: linux-kernel, kvm; +Cc: David Woodhouse
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 | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 1d2bc89431a2..bfc928495bd4 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -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));
}
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] KVM: flush deferred static key before checking it
2021-02-26 10:08 [PATCH] KVM: flush deferred static key before checking it Paolo Bonzini
@ 2021-03-01 12:24 ` Woodhouse, David
0 siblings, 0 replies; 2+ messages in thread
From: Woodhouse, David @ 2021-03-01 12:24 UTC (permalink / raw)
To: linux-kernel, kvm, pbonzini
On Fri, 2021-02-26 at 05:08 -0500, Paolo Bonzini wrote:
> 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>
Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-01 12:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-26 10:08 [PATCH] KVM: flush deferred static key before checking it Paolo Bonzini
2021-03-01 12:24 ` Woodhouse, David
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).