]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
xen/xenpv: Load xenpv as late as possible
authorJulien Grall <julien.grall@linaro.org>
Fri, 6 Jun 2014 00:51:15 +0000 (01:51 +0100)
committerJulien Grall <julien.grall@linaro.org>
Sun, 12 Apr 2015 11:08:08 +0000 (12:08 +0100)
On ARM, we only know that FreeBSD is running on Xen via a device tree node.
We have to delay xenpv initialization after the device tree has been fully
parsed.

sys/dev/xen/xenpv.c

index 1ba6a46a54a786a4fd032d65f8cd9e578f0160c0..2b422adcd4a287e563cc562ed561f3cd7ceaac69 100644 (file)
@@ -54,7 +54,11 @@ xenpv_identify(driver_t *driver, device_t parent)
        if (devclass_get_device(xenpv_devclass, 0))
                return;
 
-       if (BUS_ADD_CHILD(parent, 0, "xenpv", 0) == NULL)
+       /*
+        * Use a high order number so xenpv is attached after
+        * xenpci on HVM guests.
+        */
+       if (BUS_ADD_CHILD(parent, 100, "xenpv", 0) == NULL)
                panic("Unable to attach xenpv bus.");
 }