[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86/domctl: Don't pause the whole domain if only getting vcpu state
>>> On 12.09.17 at 15:53, <aisaila@xxxxxxxxxxxxxxx> wrote: > --- a/xen/arch/x86/domctl.c > +++ b/xen/arch/x86/domctl.c > @@ -625,6 +625,26 @@ long arch_do_domctl( > !is_hvm_domain(d) ) > break; > > + if ( domctl->u.hvmcontext_partial.type == HVM_SAVE_CODE(CPU) && > + domctl->u.hvmcontext_partial.instance < d->max_vcpus ) I have to admit that I'm not in favor of such special casing, even less so without any code comment saying why this is so special. What if someone else wanted some other piece of vCPU state without pausing the entire domain? Wouldn't it be possible to generalize this to cover all such state elements? > + { > + struct vcpu *v = d->vcpu[domctl->u.hvmcontext_partial.instance]; > + struct hvm_hw_cpu ctx; > + > + vcpu_pause(v); > + > + hvm_save_one_cpu_ctxt(v, &ctx); > + > + vcpu_unpause(v); > + > + if ( copy_to_guest(domctl->u.hvmcontext_partial.buffer, > + (void *)&ctx, sizeof(ctx)) ) Indentation. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |