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

Re: [Xen-devel] [PATCH RFC v2 12/12] x86: activate per-vcpu stacks in case of xpti



>>> On 30.01.18 at 18:33, <jgross@xxxxxxxx> wrote:
> On 30/01/18 17:33, Jan Beulich wrote:
>>>>> On 22.01.18 at 13:32, <jgross@xxxxxxxx> wrote:
>>> --- a/xen/arch/x86/domain.c
>>> +++ b/xen/arch/x86/domain.c
>>> @@ -1585,9 +1585,28 @@ static inline bool need_full_gdt(const struct domain 
>>> *d)
>>>      return is_pv_domain(d) && !is_idle_domain(d);
>>>  }
>>>  
>>> +static void copy_user_regs_from_stack(struct vcpu *v)
>>> +{
>>> +    struct cpu_user_regs *stack_regs;
>> 
>> const
> 
> Okay.
> 
>> 
>>> +    stack_regs = (is_pv_vcpu(v) && v->domain->arch.pv_domain.xpti)
>>> +                 ? v->arch.pv_vcpu.stack_regs
>>> +                 : &get_cpu_info()->guest_cpu_user_regs;
>> 
>> Ugly open coding of what previously was guest_cpu_user_regs().
> 
> I have to make sure to address the per physical cpu stack.

I would have guessed that's the reason, but especially when
uses are inconsistent (see e.g. the two MSR_IA32_SYSENTER_ESP
writes) a brief comment should be attached to clarify why the
other variant is unsuitable in the specific case.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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