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

Re: [Xen-devel] [PATCH 06/14 v4] xen/arm: vpl011: Add a new domctl API to initialize vpl011



Hi Julien,


>>>> diff --git a/tools/libxl/libxl_arch.h b/tools/libxl/libxl_arch.h
>>>> index 5e1fc60..d1ca9c6 100644
>>>> --- a/tools/libxl/libxl_arch.h
>>>> +++ b/tools/libxl/libxl_arch.h
>>>> @@ -32,6 +32,13 @@ _hidden
>>>>   int libxl__arch_domain_create(libxl__gc *gc, libxl_domain_config
>>>> *d_config,
>>>>                  uint32_t domid);
>>>>
>>>> +/* arch specific internal domain creation finish function */
>>>> +_hidden
>>>> +int libxl__arch_domain_create_finish(libxl__gc *gc,
>>>> +                                     libxl_domain_build_info *info,
>>>> +                                     uint32_t domid,
>>>> +                                     libxl__domain_build_state *state);
>>>
>>>
>>>
>>> Can you explain why you need a new arch helper rather than using the
>>> current
>>> one?
>>
>>
>> libxl__arch_domain_create() is called from libxl__build_pre(). This
>> function is called before libxl__build_pv(). By this time the domain
>> has not be created and I found that if I tried to initialize vpl011
>> from inside libxl__arch_domain_create() then initialization was
>> failing due to prepare_ring_for_helper() failing.
>
>
> What do you mean by the domain has not been created? The domain has already
> been created (you have a domid in hand) when you libxl__build_pre. So the
> problem is different.
>
> Looking at the code, I guess the problem is because the vuart pfn will be
> allocated by xc_dom_build_image called by libxl_build_pv ->
> libxl__build_dom.
>
>>
>> So I had to create another function which will be called from
>> libxl__build_post() after domain has been setup.
>
>
> It looks a bit odd to me to create the vpl011 UART that late in the process
> because when you read the code you would expect all the hardware to be setup
> after libxl__arch_domain_finalise_hw_descriptions is called.
>
> But I understand it is not possible to do it as the ring has not yet been
> allocated. So is there a way to allocate the ring before?
 >
> Wei, Ian, do you have any opinions on what should the workflow in libxl?

Actually, I had introduced an API xc_get_vuart_gfn() to get the pfn.
Since it is a fixed pfn, the API can
return it even before xc_build_dom_image() is called. I tried after
moving the vpl011_init function to libxl__arch_domain_create() and it
is working.

Regards,
Bhupinder

_______________________________________________
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®.