mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/arm: Reorder SCI resource cleanup in domain destruction
Move the SCI (System Control and Management Interface) resource cleanup
earlier in the domain_relinquish_resources() sequence to ensure proper
cleanup ordering during domain destruction.
The SCI cleanup is now performed before TEE (Trusted Execution Environment)
cleanup rather than after P2M mapping cleanup. This reordering ensures that
SCI resources are properly released before other subsystems that might
depend on them are torn down.
This change addresses potential resource cleanup dependencies where SCI
resources need to be released before P2M mappings are cleaned up, preventing
potential issues during domain destruction on ARM platforms with SCI support.
Fixes: e2cc10867b ("xen/arm: add generic SCI subsystem")
Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
Acked-by: Julien Grall <jgrall@amazon.com>
This commit is contained in:
1 parent
382dd0d166
commit
45c6090783
1 file changed
+6
-5
@@ -1042,6 +1042,7 @@ static int relinquish_memory(struct domain *d, struct page_list_head *list)
|
||||
*/
|
||||
enum {
|
||||
PROG_pci = 1,
|
||||
PROG_sci,
|
||||
PROG_tee,
|
||||
PROG_xen,
|
||||
PROG_page,
|
||||
@@ -1049,7 +1050,6 @@ enum {
|
||||
PROG_p2m_root,
|
||||
PROG_p2m,
|
||||
PROG_p2m_pool,
|
||||
PROG_sci,
|
||||
PROG_done,
|
||||
};
|
||||
|
||||
@@ -1090,6 +1090,11 @@ int domain_relinquish_resources(struct domain *d)
|
||||
return ret;
|
||||
#endif
|
||||
|
||||
PROGRESS(sci):
|
||||
ret = sci_relinquish_resources(d);
|
||||
if ( ret )
|
||||
return ret;
|
||||
|
||||
PROGRESS(tee):
|
||||
ret = tee_relinquish_resources(d);
|
||||
if (ret )
|
||||
@@ -1109,10 +1114,6 @@ int domain_relinquish_resources(struct domain *d)
|
||||
ret = relinquish_p2m_mapping(d);
|
||||
if ( ret )
|
||||
return ret;
|
||||
PROGRESS(sci):
|
||||
ret = sci_relinquish_resources(d);
|
||||
if ( ret )
|
||||
return ret;
|
||||
|
||||
PROGRESS(p2m_root):
|
||||
/*
|
||||
|
||||