On 16/05/2019 14:30, Jan Beulich wrote:
>>>> On 06.05.19 at 08:56, <jgr...@suse.com> wrote:
>> --- a/xen/arch/x86/domain.c
>> +++ b/xen/arch/x86/domain.c
>> @@ -1619,6 +1619,37 @@ static inline bool need_full_gdt(const struct domain 
>> *d)
>>      return is_pv_domain(d) && !is_idle_domain(d);
>>  }
>>  
>> +static inline void write_full_gdt_ptes(seg_desc_t *gdt, struct vcpu *v)
>> +{
>> +    unsigned long mfn = virt_to_mfn(gdt);
>> +    l1_pgentry_t *pl1e = pv_gdt_ptes(v);
>> +    unsigned int i;
>> +
>> +    for ( i = 0; i < NR_RESERVED_GDT_PAGES; i++ )
>> +        l1e_write(pl1e + FIRST_RESERVED_GDT_PAGE + i,
>> +                  l1e_from_pfn(mfn + i, __PAGE_HYPERVISOR_RW));
>> +}
>> +
>> +static inline void load_full_gdt(struct vcpu *v, unsigned int cpu)
>> +{
>> +    struct desc_ptr gdt_desc;
>> +
>> +    gdt_desc.limit = LAST_RESERVED_GDT_BYTE;
>> +    gdt_desc.base = GDT_VIRT_START(v);
> 
> Make this and ...
> 
>> +    lgdt(&gdt_desc);
>> +}
>> +
>> +static inline void load_default_gdt(seg_desc_t *gdt, unsigned int cpu)
>> +{
>> +    struct desc_ptr gdt_desc;
>> +
>> +    gdt_desc.limit = LAST_RESERVED_GDT_BYTE;
>> +    gdt_desc.base  = (unsigned long)(gdt - FIRST_RESERVED_GDT_ENTRY);
> 
> ... the variables' initializers? With this and with const suitably
> applied to all function parameters where this is possible
> Acked-by: Jan Beulich <jbeul...@suse.com>

Thanks, will do.


Juergen

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

Reply via email to