|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.9] sync CPU state upon final domain destruction
commit c9afe26e5da5230ddc6d838b4c9ff56d5b36fda1
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Wed Dec 20 15:51:47 2017 +0100
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Dec 20 15:51:47 2017 +0100
sync CPU state upon final domain destruction
See the code comment being added for why we need this.
This is being placed here to balance between the desire to prevent
future similar issues (the risk of which would grow if it was put
further down the call stack, e.g. in vmx_vcpu_destroy()) and the
intention to limit the performance impact (otherwise it could also go
into rcu_do_batch(), paralleling the use in do_tasklet_work()).
Reported-by: Igor Druzhinin <igor.druzhinin@xxxxxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
master commit: 24246e1fb7496b830aca8a6a1fd3064ca1e3ebf9
master date: 2017-11-23 11:38:22 +0100
---
xen/common/domain.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/xen/common/domain.c b/xen/common/domain.c
index b22aacc..7a94441 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -795,6 +795,14 @@ static void complete_domain_destroy(struct rcu_head *head)
struct vcpu *v;
int i;
+ /*
+ * Flush all state for the vCPU previously having run on the current CPU.
+ * This is in particular relevant for x86 HVM ones on VMX, 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();
+
for ( i = d->max_vcpus - 1; i >= 0; i-- )
{
if ( (v = d->vcpu[i]) == NULL )
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.9
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |