[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH for-next v2 05/10] x86/domain: factor out pv_vcpu_initialise



On Wed, Apr 26, 2017 at 06:25:32AM -0600, Jan Beulich wrote:
> >      if ( is_hvm_domain(d) )
> > -    {
> >          rc = hvm_vcpu_initialise(v);
> > -        goto done;
> > -    }
> > -
> > -
> > -    spin_lock_init(&v->arch.pv_vcpu.shadow_ldt_lock);
> > -
> > -    if ( !is_idle_domain(d) )
> > -    {
> > -        rc = pv_create_gdt_ldt_l1tab(d, v);
> > -        if ( rc )
> > -            goto done;
> > -
> > -        BUILD_BUG_ON(NR_VECTORS * sizeof(*v->arch.pv_vcpu.trap_ctxt) >
> > -                     PAGE_SIZE);
> > -        v->arch.pv_vcpu.trap_ctxt = xzalloc_array(struct trap_info,
> > -                                                  NR_VECTORS);
> > -        if ( !v->arch.pv_vcpu.trap_ctxt )
> > -        {
> > -            pv_destroy_gdt_ldt_l1tab(d, v);
> > -            rc = -ENOMEM;
> > -            goto done;
> > -        }
> > -
> > -        /* PV guests by default have a 100Hz ticker. */
> > -        v->periodic_period = MILLISECS(10);
> > -    }
> > +    else if ( is_pv_domain(d) && !is_idle_domain(d) )
> 
> Only the right side of the && is needed, as is_pv is now (again) the
> opposite of is_hvm.
> 

The idle domain is a PV guest (see domain_create) and handled in the
following else branch. 

> Jan
> 

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.