xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] VMX: sync CPU state upon vCPU destruction
@ 2017-11-09 14:49 Jan Beulich
  2017-11-09 15:02 ` Dario Faggioli
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Jan Beulich @ 2017-11-09 14:49 UTC (permalink / raw)
  To: xen-devel
  Cc: Igor Druzhinin, Julien Grall, Dario Faggioli, Kevin Tian,
	Jun Nakajima

See the code comment being added for why we need this.

Reported-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -479,7 +479,13 @@ static void vmx_vcpu_destroy(struct vcpu
      * we should disable PML manually here. Note that vmx_vcpu_destroy is called
      * prior to vmx_domain_destroy so we need to disable PML for each vcpu
      * separately here.
+     *
+     * Before doing that though, flush all state for the vCPU previously having
+     * run on the current CPU, so that this flushing of state won't happen from
+     * the TLB flush IPI handler behind the back of a vmx_vmcs_enter() /
+     * vmx_vmcs_exit() section.
      */
+    sync_local_execstate();
     vmx_vcpu_disable_pml(v);
     vmx_destroy_vmcs(v);
     passive_domain_destroy(v);




_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2017-11-21 17:27 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-09 14:49 [PATCH] VMX: sync CPU state upon vCPU destruction Jan Beulich
2017-11-09 15:02 ` Dario Faggioli
2017-11-10  8:41 ` Sergey Dyasli
2017-11-10  9:50   ` Dario Faggioli
2017-11-10 10:30   ` Jan Beulich
2017-11-10 14:46     ` Igor Druzhinin
2017-11-13  9:51       ` Jan Beulich
2017-11-21 13:22 ` Ping: " Jan Beulich
2017-11-21 14:07   ` Igor Druzhinin
2017-11-21 15:29     ` Jan Beulich
2017-11-21 16:00       ` Igor Druzhinin
2017-11-21 16:42       ` Dario Faggioli
2017-11-21 16:58         ` George Dunlap
2017-11-21 17:00       ` Sergey Dyasli
2017-11-21 17:26         ` Jan Beulich
2017-11-21 16:08   ` George Dunlap
2017-11-21 16:26 ` Igor Druzhinin

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).