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

Re: [Xen-devel] [PATCH 00/25 v6] SBSA UART emulation support in Xen



On 20/07/17 10:40, Bhupinder Thakur wrote:
Hi Julien,

Hi Bhupinder,

The issue seems to be that domain_vpl011_deinit() is not getting
called when we destroy the domain. On further debugging, i found that
domain_relinquish_resources was failing in domain_kill() function.

I believe that issue could be that arch_domain_destroy() (from where
domain_vpl011_deinit() is called) is called later and because
domain_kill() fails, it is not getting called. Once I moved the
domain_vpl011_deinit() inside domain_kill(), the domain is getting
cleaned up properly.

What do you mean by domain_kill fails? The function may take time to execute so it may return -ERESTART for preemption and be restarted later on.

The problem here is until domain_vpl011_deinit is called, there is still a reference taken on the guest memory and therefore on the domain. So the domain will not get fully destroyed (domain_destroy is called when the last reference on the domain is dropped).

Because domain_vpl011_deinit is called from domain_destroy, there will always be a reference on the guest memory and domain. So no destruction.


Is it ok to call domain_vpl011_deinit() inside domain_kill?

domain_kill is a arch agnostic function. You want to call domain_vpl011_init from domain_relinquish_resources. I would do in the case RELMEM_not_started after iommu_release_dt_devices is called.

Cheers,

--
Julien Grall

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