@@ -470,6 +470,9 @@ the user to defined aliases which can be used by the guest kernel.
Given the complexity of verifying the validity of a device tree, this
option should only be used with trusted device tree.
+Note that the partial device tree should avoid to use the phandle 65000
+which is reserved by the toolstack.
+
=back
=head2 Devices
@@ -81,10 +81,11 @@ static struct arch_info {
{"xen-3.0-aarch64", "arm,armv8-timer", "arm,armv8" },
};
-enum {
- PHANDLE_NONE = 0,
- PHANDLE_GIC,
-};
+/*
+ * The device tree compiler (DTC) is allocating the phandle from 1 to
+ * onwards. Reserve a high value for the GIC phandle.
+ */
+#define PHANDLE_GIC (65000)
typedef uint32_t be32;
typedef be32 gic_interrupt[3];
@@ -416,6 +416,8 @@ libxl_domain_build_info = Struct("domain_build_info",[
# Given the complexity of verifying the validity of a device tree,
# libxl doesn't do any security check on it. It's the responsibility
# of the caller to provide only trusted device tree.
+ # Note that the partial device tree should avoid to use the phandle
+ # 65000 which is reserved by the toolstack.
("device_tree", string),
("u", KeyedUnion(None, libxl_domain_type, "type",
[("hvm", Struct(None, [("firmware", string),