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

Re: [Xen-devel] [PATCH 03/10 v2] xen/arm: vpl011: Enable pl011 emulation for a guest domain in Xen


>>> I was wondering whether it would be better to defer the PL011 creation to
>>> a
>>> domctl. This could be called after the domain is created with all the
>>> information required (MMIO region, Console PFN...).
>>> This would also make the migration support more trivial as the we will
>>> not
>>> need to know in advance whether a UART is been used.
>>> Any opinions?
>> Would there be race condition where the guest tries to access the
>> pl011 mmio region (as the domain has been created) but pl011 is not
>> initialized yet as domctl is not called? What could be an appropriate
>> place to call this domctl? It should be before xenstore is populated
>> with vuart ring-ref/port information.
> There are no race condition. The domain will only be started when everything
> has been created by calling XEN_DOMCTL_unpausedomain.
> The DOMCTL createdomain only initialize the basic structure for the domain,
> after the hypercall the domain is not in state to be run because, for
> instance, the vCPUs were not allocated (see XEN_DOMCTL_max_vcpus) and the
> guest RAM were not populated.
> I am not very familiar with the libxl code, but I think
> libxl__arch_domain_create should be a good candidate. I will let Ian and Wei
> confirm that.

I have defined a new DOMCTL xc_dom_vpl011_init() which collects all
the required information such as
ring buffer GFN, console domid and returns the event channel. This
function is being called from libxl__build_dom(), which is called
from inside libxl__build_pv() at the last.

This new function does away with the earlier set of domctls defined
for get/set of gfn/eventchannels. It also does away with the tinkering
domain creation flags while creating a domain.


Xen-devel mailing list



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