@@ -1061,6 +1061,27 @@ static int make_acpi_madt(libxl__gc *gc, struct xc_dom_image *dom, int nr_cpus,
return 0;
}
+static void make_acpi_xsdt(libxl__gc *gc, struct xc_dom_image *dom)
+{
+ uint32_t size;
+ struct acpi_xsdt_descriptor *xsdt;
+
+ /*
+ * Currently only 3 tables(GTDT, FADT, MADT) are pointed by XSDT. Alloc
+ * entries for them but the entry values will be specified when they are
+ * copied to the guest memory.
+ */
+ size = sizeof(*xsdt) + sizeof(uint64_t) * 3;
+ xsdt = libxl__zalloc(gc, size);
+
+ make_acpi_header(&xsdt->header, "XSDT", size, 1);
+
+ dom->acpitable_blob->xsdt.table = (void *)xsdt;
+ /* Align to 64bit. */
+ dom->acpitable_blob->xsdt.size = size;
+ dom->acpitable_size += dom->acpitable_blob->xsdt.size;
+}
+
static int prepare_acpi(libxl__gc *gc, libxl_domain_build_info *info,
libxl__domain_build_state *state,
struct xc_dom_image *dom)
@@ -1089,6 +1110,8 @@ static int prepare_acpi(libxl__gc *gc, libxl_domain_build_info *info,
if (rc)
return rc;
+ make_acpi_xsdt(gc, dom);
+
return 0;
}