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

[Xen-changelog] [xen staging] xen/arm: move evtchn_allocate call out of make_hypervisor_node



commit 9d61c62188cfc0cfaf324e19a5a941090d431b4f
Author:     Stefano Stabellini <sstabellini@xxxxxxxxxx>
AuthorDate: Tue Jul 31 16:27:49 2018 -0700
Commit:     Julien Grall <julien.grall@xxxxxxx>
CommitDate: Wed Aug 22 16:28:30 2018 +0100

    xen/arm: move evtchn_allocate call out of make_hypervisor_node
    
    In the case of domUs, evtchn_irq is allocated by arch_domain_create and
    set to GUEST_EVTCHN_PPI.
    
    To make make_hypervisor_node more reusable, move the call to
    evtchn_allocate out of make_hypervisor_node, to the dom0 specific caller
    (handle_node).
    
    Signed-off-by: Stefano Stabellini <stefanos@xxxxxxxxxx>
    Reviewed-by: Julien Grall <julien.grall@xxxxxxx>
---
 xen/arch/arm/domain_build.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 0177492b1c..2ba0e34868 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -619,11 +619,7 @@ static int __init make_hypervisor_node(struct domain *d,
     if ( res )
         return res;
 
-    /*
-     * It is safe to allocate the event channel here because all the
-     * PPIs used by the hardware domain have been registered.
-     */
-    evtchn_allocate(d);
+    BUG_ON(d->arch.evtchn_irq == 0);
 
     /*
      * Interrupt event channel upcall:
@@ -1294,6 +1290,12 @@ static int __init handle_node(struct domain *d, struct 
kernel_info *kinfo,
         int sizecells = dt_child_n_size_cells(node);
 
         /*
+         * It is safe to allocate the event channel here because all the
+         * PPIs used by the hardware domain have been registered.
+         */
+        evtchn_allocate(d);
+
+        /*
          * The hypervisor node should always be created after all nodes
          * from the host DT have been parsed.
          */
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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