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

Re: [Xen-devel] [PATCH 6/7] xen/domain: Pass the full domctl_createdomain struct to create_domain()



On 09/03/18 17:00, Jan Beulich wrote:
>>>> On 09.03.18 at 14:18, <andrew.cooper3@xxxxxxxxxx> wrote:
>> --- a/xen/arch/x86/domain.c
>> +++ b/xen/arch/x86/domain.c
>> @@ -426,8 +426,8 @@ static bool emulation_flags_ok(const struct domain *d, 
>> uint32_t emflags)
>>      return true;
>>  }
>>  
>> -int arch_domain_create(struct domain *d, unsigned int domcr_flags,
>> -                       struct xen_arch_domainconfig *config)
>> +int arch_domain_create(struct domain *d,
>> +                       struct xen_domctl_createdomain *config)
> Is there any reason for this to not be const? There's no write now
> afaics, and I can't imagine you wanting to add one later on.

I originally planned to make them const, but the ARM side passes data
back to the toolstack, and the prototype is (rightfully) common.

>
>> @@ -1632,14 +1634,16 @@ void __init noreturn __start_xen(unsigned long mbi_p)
>>  
>>      if ( dom0_pvh )
>>      {
>> -        domcr_flags |= XEN_DOMCTL_CDF_hvm_guest |
>> -                       ((hvm_funcs.hap_supported && !opt_dom0_shadow) ?
>> -                         XEN_DOMCTL_CDF_hap : 0);
>> -        config.emulation_flags = XEN_X86_EMU_LAPIC|XEN_X86_EMU_IOAPIC;
>> +        dom0_cfg.flags |= (XEN_DOMCTL_CDF_hvm_guest |
>> +                           ((hvm_funcs.hap_supported && !opt_dom0_shadow) ?
>> +                            XEN_DOMCTL_CDF_hap : 0));
>> +
>> +        dom0_cfg.config.emulation_flags =
>> +            XEN_X86_EMU_LAPIC | XEN_X86_EMU_IOAPIC;
> Would you mind making this |= for ease of future changes?

Certainly.

>
> Other than these
> Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
>
> 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®.