[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Ping: [PATCH] VMX: sync CPU state upon vCPU destruction
On 21/11/17 13:22, Jan Beulich wrote: >>>> On 09.11.17 at 15:49, <JBeulich@xxxxxxxx> wrote: >> See the code comment being added for why we need this. >> >> Reported-by: Igor Druzhinin <igor.druzhinin@xxxxxxxxxx> >> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> > > I realize we aren't settled yet on where to put the sync call. The > discussion appears to have stalled, though. Just to recap, > alternatives to the placement below are > - at the top of complete_domain_destroy(), being the specific > RCU callback exhibiting the problem (others are unlikely to > touch guest state) > - in rcu_do_batch(), paralleling the similar call from > do_tasklet_work() rcu_do_batch() sounds better to me. As I said before I think that the problem is general for the hypervisor (not for VMX only) and might appear in other places as well. Those choices that you outlined appear to be different in terms whether we solve the general problem and probably have some minor performance impact or we solve the ad-hoc problem but make the system more entangled. Here I'm more inclined to the first choice because this particular scenario the performance impact should be negligible. Igor > > Jan > >> --- 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@xxxxxxxxxxxxx >> https://lists.xen.org/xen-devel > > > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |