On Wed, Apr 26, 2017 at 07:27:23AM -0600, Jan Beulich wrote:
> >>> On 26.04.17 at 14:53, wrote:
> > 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;
> >> > -}
>
>>> On 26.04.17 at 14:53, wrote:
> 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);
>>
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) )
> > -
>>> On 25.04.17 at 15:52, wrote:
> +static int pv_vcpu_initialise(struct vcpu *v)
> +{
> +struct domain *d = v->domain;
> +int rc;
> +
> +ASSERT(!is_idle_domain(d));
> +
> +spin_lock_init(&v->arch.pv_vcpu.shadow_ldt_lock);
> +
> +rc = pv_create_gdt_ldt_l1tab(d, v);
> +if (
On Tue, Apr 25, 2017 at 03:08:23PM +0100, Andrew Cooper wrote:
> On 25/04/17 14:52, Wei Liu wrote:
> > Move PV specific vcpu initialisation code to said function, but leave
> > the only line needed by idle domain in vcpu_initialise.
> >
> > Use pv_vcpu_destroy in error path to simplify code. It is
On 25/04/17 14:52, Wei Liu wrote:
> Move PV specific vcpu initialisation code to said function, but leave
> the only line needed by idle domain in vcpu_initialise.
>
> Use pv_vcpu_destroy in error path to simplify code. It is safe to do so
> because the destruction function accepts partially initia
Move PV specific vcpu initialisation code to said function, but leave
the only line needed by idle domain in vcpu_initialise.
Use pv_vcpu_destroy in error path to simplify code. It is safe to do so
because the destruction function accepts partially initialised vcpu
struct.
Signed-off-by: Wei Liu