From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Anthony Liguori <aliguori@us.ibm.com>
Subject: [Qemu-devel] [PATCH RFC 3/3] acpi-build: disable acpi generation for compat
Date: Thu, 13 Jun 2013 17:29:55 +0300 [thread overview]
Message-ID: <1371133655-10186-4-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1371133655-10186-1-git-send-email-mst@redhat.com>
When running with -M 1.5 and older, disable ACPI
table generation, and don't expose ACPI
tables to guest.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/i386/acpi-build.c | 4 ++++
hw/i386/pc_piix.c | 12 ++++++++++--
hw/i386/pc_q35.c | 12 ++++++++++--
include/hw/i386/pc.h | 1 +
4 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 911c913..7e52457 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -966,6 +966,10 @@ void acpi_setup(PcGuestInfo *guest_info)
ACPI_BUILD_DPRINTF(3, "No fw cfg. Boiling out.\n");
}
+ if (!guest_info->has_acpi_build) {
+ ACPI_BUILD_DPRINTF(3, "ACPI build disabled. Boiling out.\n");
+ }
+
table_data = g_array_new(false, true /* clear */, 1);
table_offsets = g_array_new(false, true /* clear */,
sizeof(uint32_t));
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index e46f19a..eb11456 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -59,6 +59,7 @@ static const int ide_iobase2[MAX_IDE_BUS] = { 0x3f6, 0x376 };
static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };
static bool has_pvpanic = true;
+static bool has_acpi_build = true;
/* PC hardware initialisation */
static void pc_init1(MemoryRegion *system_memory,
@@ -124,6 +125,7 @@ static void pc_init1(MemoryRegion *system_memory,
guest_info = pc_guest_info_init(below_4g_mem_size, above_4g_mem_size);
+ guest_info->has_acpi_build = has_acpi_build;
guest_info->dsdt_code = AcpiDsdtAmlCode;
guest_info->dsdt_size = sizeof AcpiDsdtAmlCode;
@@ -266,12 +268,18 @@ static void pc_init_pci(QEMUMachineInitArgs *args)
initrd_filename, cpu_model, 1, 1);
}
+static void pc_init_pci_1_5(QEMUMachineInitArgs *args)
+{
+ has_acpi_build = false;
+ pc_init_pci(args);
+}
+
static void pc_init_pci_1_4(QEMUMachineInitArgs *args)
{
pc_sysfw_flash_vs_rom_bug_compatible = true;
has_pvpanic = false;
x86_cpu_compat_set_features("n270", FEAT_1_ECX, 0, CPUID_EXT_MOVBE);
- pc_init_pci(args);
+ pc_init_pci_1_5(args);
}
static void pc_init_pci_1_3(QEMUMachineInitArgs *args)
@@ -365,7 +373,7 @@ static QEMUMachine pc_i440fx_machine_v1_6 = {
static QEMUMachine pc_i440fx_machine_v1_5 = {
.name = "pc-i440fx-1.5",
.desc = "Standard PC (i440FX + PIIX, 1996)",
- .init = pc_init_pci,
+ .init = pc_init_pci_1_5,
.hot_add_cpu = pc_hot_add_cpu,
.max_cpus = 255,
.compat_props = (GlobalProperty[]) {
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index c11118a..e101112 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -49,6 +49,7 @@
#define MAX_SATA_PORTS 6
static bool has_pvpanic = true;
+static bool has_acpi_build = true;
/* PC hardware initialisation */
static void pc_q35_init(QEMUMachineInitArgs *args)
@@ -109,6 +110,7 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
}
guest_info = pc_guest_info_init(below_4g_mem_size, above_4g_mem_size);
+ guest_info->has_acpi_build = has_acpi_build;
guest_info->dsdt_code = Q35AcpiDsdtAmlCode;
guest_info->dsdt_size = sizeof Q35AcpiDsdtAmlCode;
@@ -216,12 +218,18 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
}
}
+static void pc_q35_init_1_5(QEMUMachineInitArgs *args)
+{
+ has_acpi_build = false;
+ pc_q35_init(args);
+}
+
static void pc_q35_init_1_4(QEMUMachineInitArgs *args)
{
pc_sysfw_flash_vs_rom_bug_compatible = true;
has_pvpanic = false;
x86_cpu_compat_set_features("n270", FEAT_1_ECX, 0, CPUID_EXT_MOVBE);
- pc_q35_init(args);
+ pc_q35_init_1_5(args);
}
static QEMUMachine pc_q35_machine_v1_6 = {
@@ -237,7 +245,7 @@ static QEMUMachine pc_q35_machine_v1_6 = {
static QEMUMachine pc_q35_machine_v1_5 = {
.name = "pc-q35-1.5",
.desc = "Standard PC (Q35 + ICH9, 2009)",
- .init = pc_q35_init,
+ .init = pc_q35_init_1_5,
.hot_add_cpu = pc_hot_add_cpu,
.max_cpus = 255,
.compat_props = (GlobalProperty[]) {
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 80c9e71..722d7d0 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -51,6 +51,7 @@ struct PcGuestInfo {
uint64_t mcfg_base;
const unsigned char *dsdt_code;
unsigned dsdt_size;
+ bool has_acpi_build;
FWCfgState *fw_cfg;
};
--
MST
prev parent reply other threads:[~2013-06-13 14:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-13 14:29 [Qemu-devel] [PATCH RFC 0/3] qemu/acpi-build: cross migration fixes Michael S. Tsirkin
2013-06-13 14:29 ` [Qemu-devel] [PATCH RFC 1/3] loader: support for unmapped ROM blobs Michael S. Tsirkin
2013-06-13 14:29 ` [Qemu-devel] [PATCH RFC 2/3] acpi: add tables as ROM so they are migrated Michael S. Tsirkin
2013-06-13 14:29 ` Michael S. Tsirkin [this message]
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=1371133655-10186-4-git-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=qemu-devel@nongnu.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).