[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v4 14/21] libacpi: Build DSDT for PVH guests
PVH guests require DSDT with only ACPI INFO (Xen-specific) and Processor objects. We separate ASL's ACPI INFO definition into dsdt_acpi_info.asl so that it can be included in ASLs for both HVM and PVH2. Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> --- tools/libacpi/Makefile | 7 ++++++- tools/libacpi/mk_dsdt.c | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/tools/libacpi/Makefile b/tools/libacpi/Makefile index fdb08e6..83d6a8f 100644 --- a/tools/libacpi/Makefile +++ b/tools/libacpi/Makefile @@ -22,7 +22,7 @@ TMP_SUFFIX = tmp__ MK_DSDT = $(ACPI_BUILD_DIR)/mk_dsdt C_SRC-$(GPL) = dsdt_anycpu.c dsdt_15cpu.c dsdt_anycpu_qemu_xen.c -C_SRC = $(addprefix $(ACPI_BUILD_DIR)/, $(C_SRC-y)) +C_SRC = $(addprefix $(ACPI_BUILD_DIR)/, dsdt_pvh.c $(C_SRC-y)) H_SRC = $(addprefix $(ACPI_BUILD_DIR)/, ssdt_s3.h ssdt_s4.h ssdt_pm.h ssdt_tpm.h) vpath iasl $(PATH) @@ -49,6 +49,11 @@ $(ACPI_BUILD_DIR)/dsdt_%cpu.asl: gpl/dsdt.asl $(MK_DSDT) $(MK_DSDT) --debug=$(debug) --maxcpu $* >> $@ endif +$(ACPI_BUILD_DIR)/dsdt_pvh.asl: dsdt_acpi_info.asl $(MK_DSDT) + printf "DefinitionBlock (\"DSDT.aml\", \"DSDT\", 5, \"Xen\", \"HVM\", 0)\n{" > $@ + cat dsdt_acpi_info.asl >> $@ + $(MK_DSDT) --debug=$(debug) --maxcpu any --dm-version none >> $@ + $(C_SRC): $(ACPI_BUILD_DIR)/%.c: iasl $(ACPI_BUILD_DIR)/%.asl iasl -vs -p $(ACPI_BUILD_DIR)/$*.$(TMP_SUFFIX) -tc $(ACPI_BUILD_DIR)/$*.asl sed -e 's/AmlCode/$*/g' $(ACPI_BUILD_DIR)/$*.hex >$@ diff --git a/tools/libacpi/mk_dsdt.c b/tools/libacpi/mk_dsdt.c index e750820..8130cbd 100644 --- a/tools/libacpi/mk_dsdt.c +++ b/tools/libacpi/mk_dsdt.c @@ -23,6 +23,7 @@ static unsigned int indent_level; static bool debug = false; typedef enum dm_version { + QEMU_NONE, QEMU_XEN_TRADITIONAL, QEMU_XEN, } dm_version; @@ -135,6 +136,8 @@ int main(int argc, char **argv) dm_version = QEMU_XEN; } else if (strcmp(optarg, "qemu-xen-traditional") == 0) { dm_version = QEMU_XEN_TRADITIONAL; + } else if (strcmp(optarg, "none") == 0) { + dm_version = QEMU_NONE; } else { fprintf(stderr, "Unknown device model version `%s'.\n", optarg); return -1; @@ -252,6 +255,11 @@ int main(int argc, char **argv) pop_block(); + if (dm_version == QEMU_NONE) { + pop_block(); + return 0; + } + /* Define GPE control method. */ push_block("Scope", "\\_GPE"); push_block("Method", -- 1.8.3.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |