From: Anthony PERARD <anthony.perard@citrix.com>
To: xen-devel@lists.xen.org
Cc: Anthony PERARD <anthony.perard@citrix.com>
Subject: [RFC PATCH v2 06/16] libxl: Load guest ACPI table from file
Date: Mon, 26 Oct 2015 16:03:07 +0000 [thread overview]
Message-ID: <1445875397-2846-7-git-send-email-anthony.perard@citrix.com> (raw)
In-Reply-To: <1445875397-2846-1-git-send-email-anthony.perard@citrix.com>
The path to the ACPI tables blob can be override by xl's option
acpi_table_override or by acpi_tables_filename in the domain_build_info
struct for libxl user.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
tools/libxl/libxl_dom.c | 17 +++++++++++++++++
tools/libxl/libxl_types.idl | 1 +
tools/libxl/xl_cmdimpl.c | 3 +++
3 files changed, 21 insertions(+)
diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
index 27a0021..b340fa4 100644
--- a/tools/libxl/libxl_dom.c
+++ b/tools/libxl/libxl_dom.c
@@ -948,6 +948,7 @@ static int libxl__domain_firmware(libxl__gc *gc,
if (info->device_model_version != LIBXL_DEVICE_MODEL_VERSION_NONE) {
const char *bios_filename;
+ const char *acpi_tables_filename;
// Look for BIOS and load it
if (info->u.hvm.bios_filename) {
bios_filename = info->u.hvm.bios_filename;
@@ -970,10 +971,26 @@ static int libxl__domain_firmware(libxl__gc *gc,
goto out;
}
}
+ if (info->u.hvm.acpi_tables_filename) {
+ acpi_tables_filename = info->u.hvm.acpi_tables_filename;
+ } else {
+ // this would depend on which machine we emulate
+ // this is going to be eathier qemu-trad or qemu-xen
+ // (later, there will be qemu-xen-q35)
+ acpi_tables_filename = libxl__abs_path(gc,
+ "dsdt_anycpu_qemu_xen.aml",
+ libxl__xenfirmwaredir_path());
+ }
rc = libxl__load_hvm_firmware_module(gc, bios_filename, "BIOS",
&dom->bios_module);
if (rc) goto out;
+
+ rc = libxl__load_hvm_firmware_module(gc,
+ acpi_tables_filename,
+ "ACPI tables",
+ &dom->acpi_table_module);
+ if (rc) goto out;
}
if (info->u.hvm.smbios_firmware) {
diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
index a3fbcab..d7eaa8d 100644
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -469,6 +469,7 @@ libxl_domain_build_info = Struct("domain_build_info",[
[("hvm", Struct(None, [("firmware", string),
("bios", libxl_bios_type),
("bios_filename", string),
+ ("acpi_tables_filename", string),
("pae", libxl_defbool),
("apic", libxl_defbool),
("acpi", libxl_defbool),
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 27d7c25..1fb1300 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -1512,6 +1512,9 @@ static void parse_config_data(const char *config_source,
fprintf(stderr, "WARNING: "
"bios_override given without specific bios name\n");
+ xlu_cfg_replace_string(config, "acpi_table_override",
+ &b_info->u.hvm.acpi_tables_filename, 0);
+
xlu_cfg_get_defbool(config, "pae", &b_info->u.hvm.pae, 0);
xlu_cfg_get_defbool(config, "apic", &b_info->u.hvm.apic, 0);
xlu_cfg_get_defbool(config, "acpi", &b_info->u.hvm.acpi, 0);
--
Anthony PERARD
next prev parent reply other threads:[~2015-10-26 16:03 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-26 16:03 [RFC PATCH v2 00/16] Load BIOS via toolstack instead of been embedded in hvmloader Anthony PERARD
2015-10-26 16:03 ` [RFC PATCH v2 01/16] hvmloader: Fix scratch_alloc to avoid overlaps Anthony PERARD
2015-11-03 17:38 ` Ian Campbell
2015-11-10 16:29 ` Jan Beulich
2015-10-26 16:03 ` [RFC PATCH v2 02/16] libxc: Load BIOS and ACPI table into guest memory Anthony PERARD
2015-11-03 17:45 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 03/16] configure: #define SEABIOS_PATH and OVMF_PATH Anthony PERARD
2015-11-04 10:24 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 04/16] firmware/makefile: install BIOS and ACPI blob Anthony PERARD
2015-11-04 10:35 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 05/16] libxl: Load guest BIOS from file Anthony PERARD
2015-11-04 10:51 ` Ian Campbell
2015-10-26 16:03 ` Anthony PERARD [this message]
2015-11-04 10:57 ` [RFC PATCH v2 06/16] libxl: Load guest ACPI table " Ian Campbell
2015-12-18 14:43 ` Anthony PERARD
2015-10-26 16:03 ` [RFC PATCH v2 07/16] hvmloader: Grab the hvmlite info page and parse the cmdline Anthony PERARD
2015-11-04 10:39 ` Andrew Cooper
2015-11-04 11:02 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 08/16] hvmloader: Locate the BIOS blob Anthony PERARD
2015-11-04 11:05 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 09/16] hvmloader: Load SeaBIOS from hvm_start_info modules Anthony PERARD
2015-11-04 11:11 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 10/16] hvmloader: Load OVMF from modules Anthony PERARD
2015-11-04 11:15 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 11/16] hvmloader: No BIOS ROM image allowed to be compiled in Anthony PERARD
2015-11-04 11:17 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 12/16] hvmloader: Load ACPI tables from hvm_start_info module Anthony PERARD
2015-11-04 11:20 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 13/16] hvmloader/makefile: Compile out SeaBIOS and OVMF ROM blob Anthony PERARD
2015-10-26 16:03 ` [RFC PATCH v2 14/16] hvmloader: Always build-in SeaBIOS and OVMF loader Anthony PERARD
2015-10-26 16:03 ` [RFC PATCH v2 15/16] hvmloader: Compile out the qemu-xen ACPI tables Anthony PERARD
2015-10-26 16:03 ` [RFC PATCH v2 16/16] hvmloader: do not depend on SEABIOS_PATH or OVMF_PATH Anthony PERARD
2015-11-03 17:30 ` [RFC PATCH v2 00/16] Load BIOS via toolstack instead of been embedded in hvmloader Ian Campbell
2015-11-03 17:50 ` Anthony PERARD
2015-11-04 10:18 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1445875397-2846-7-git-send-email-anthony.perard@citrix.com \
--to=anthony.perard@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).