>>> On 10.04.17 at 15:27, <wei.l...@citrix.com> wrote:
> +int vcpu_initialise(struct vcpu *v)
> +{
> +    struct domain *d = v->domain;
> +    int rc;
> +
> +    v->arch.flags = TF_kernel_mode;
> +
> +    rc = mapcache_vcpu_init(v);
> +    if ( rc )
> +        return rc;
> +
> +    if ( !is_idle_domain(d) )
> +    {
> +        paging_vcpu_init(v);
> +
> +        if ( (rc = vcpu_init_fpu(v)) != 0 )
> +            return rc;
> +
> +        vmce_init_vcpu(v);
> +    }
> +    else if ( (rc = xstate_alloc_save_area(v)) != 0 )
> +        return rc;
> +
> +    spin_lock_init(&v->arch.vpmu.vpmu_lock);
> +
> +    if ( is_hvm_domain(d) )
> +        rc = hvm_vcpu_initialise(v);
> +    else
> +        rc = pv_vcpu_initialise(v);
> +
>      if ( rc )
>      {
>          vcpu_destroy_fpu(v);

Below here v->arch.pv_vcpu.trap_ctxt is being freed, which now also
belongs into the PV function.

Jan


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

Reply via email to