qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, Richard Henderson <rth@twiddle.net>,
	Anthony Liguori <aliguori@amazon.com>,
	Igor Mammedov <imammedo@redhat.com>
Subject: [Qemu-devel] [PATCH 3/4] acpi: has_immutable_rsdp->!rsdp_in_ram
Date: Tue, 17 Feb 2015 11:05:42 +0100	[thread overview]
Message-ID: <1424167517-21866-4-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1424167517-21866-1-git-send-email-mst@redhat.com>

As comment in acpi-build.c notes, RSDP is not really immutable.  So it's
really a question of whether it's in RAM, name the variable accordingly.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 include/hw/i386/pc.h | 2 +-
 hw/i386/acpi-build.c | 2 +-
 hw/i386/pc_piix.c    | 6 +++---
 hw/i386/pc_q35.c     | 6 +++---
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index b0a80cf..0c595c5 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -104,7 +104,7 @@ struct PcGuestInfo {
     int legacy_acpi_table_size;
     bool has_acpi_build;
     bool has_reserved_memory;
-    bool has_immutable_rsdp;
+    bool rsdp_in_ram;
 };
 
 /* parallel.c */
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index e78d6cb..ffa3f00 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1556,7 +1556,7 @@ void acpi_setup(PcGuestInfo *guest_info)
     fw_cfg_add_file(guest_info->fw_cfg, ACPI_BUILD_TPMLOG_FILE,
                     tables.tcpalog->data, acpi_data_len(tables.tcpalog));
 
-    if (guest_info->has_immutable_rsdp) {
+    if (!guest_info->rsdp_in_ram) {
         /*
          * Keep for compatibility with old machine types.
          * Though RSDP is small, its contents isn't immutable, so
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index e586c7b..13ff561 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -60,7 +60,7 @@ static const int ide_iobase2[MAX_IDE_BUS] = { 0x3f6, 0x376 };
 static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };
 
 static bool has_acpi_build = true;
-static bool has_immutable_rsdp;
+static bool rsdp_in_ram = true;
 static int legacy_acpi_table_size;
 static bool smbios_defaults = true;
 static bool smbios_legacy_mode;
@@ -169,7 +169,7 @@ static void pc_init1(MachineState *machine,
 
     guest_info->isapc_ram_fw = !pci_enabled;
     guest_info->has_reserved_memory = has_reserved_memory;
-    guest_info->has_immutable_rsdp = has_immutable_rsdp;
+    guest_info->rsdp_in_ram = rsdp_in_ram;
 
     if (smbios_defaults) {
         MachineClass *mc = MACHINE_GET_CLASS(machine);
@@ -312,7 +312,7 @@ static void pc_init_pci(MachineState *machine)
 
 static void pc_compat_2_2(MachineState *machine)
 {
-    has_immutable_rsdp = true;
+    rsdp_in_ram = false;
     x86_cpu_compat_set_features("kvm64", FEAT_1_EDX, 0, CPUID_VME);
     x86_cpu_compat_set_features("kvm32", FEAT_1_EDX, 0, CPUID_VME);
     x86_cpu_compat_set_features("Conroe", FEAT_1_EDX, 0, CPUID_VME);
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 6151f2f..c0f21fe 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -50,7 +50,7 @@
 #define MAX_SATA_PORTS     6
 
 static bool has_acpi_build = true;
-static bool has_immutable_rsdp;
+static bool rsdp_in_ram = true;
 static bool smbios_defaults = true;
 static bool smbios_legacy_mode;
 static bool smbios_uuid_encoded = true;
@@ -155,7 +155,7 @@ static void pc_q35_init(MachineState *machine)
     guest_info->isapc_ram_fw = false;
     guest_info->has_acpi_build = has_acpi_build;
     guest_info->has_reserved_memory = has_reserved_memory;
-    guest_info->has_immutable_rsdp = has_immutable_rsdp;
+    guest_info->rsdp_in_ram = rsdp_in_ram;
 
     /* Migration was not supported in 2.0 for Q35, so do not bother
      * with this hack (see hw/i386/acpi-build.c).
@@ -291,7 +291,7 @@ static void pc_q35_init(MachineState *machine)
 
 static void pc_compat_2_2(MachineState *machine)
 {
-    has_immutable_rsdp = true;
+    rsdp_in_ram = false;
     x86_cpu_compat_set_features("kvm64", FEAT_1_EDX, 0, CPUID_VME);
     x86_cpu_compat_set_features("kvm32", FEAT_1_EDX, 0, CPUID_VME);
     x86_cpu_compat_set_features("Conroe", FEAT_1_EDX, 0, CPUID_VME);
-- 
MST

  parent reply	other threads:[~2015-02-17 10:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-17 10:05 [Qemu-devel] [PATCH 0/4] acpi: fix RSDP and linker memory management Michael S. Tsirkin
2015-02-17 10:05 ` [Qemu-devel] [PATCH 1/4] exec: round up size on MR resize Michael S. Tsirkin
2015-02-17 13:45   ` Igor Mammedov
2015-02-17 14:12     ` Paolo Bonzini
2015-02-17 10:05 ` [Qemu-devel] [PATCH 2/4] acpi-build: fix ACPI RAM management Michael S. Tsirkin
2015-02-17 13:52   ` Igor Mammedov
2015-02-17 18:58     ` Michael S. Tsirkin
2015-02-17 10:05 ` Michael S. Tsirkin [this message]
2015-02-17 13:55   ` [Qemu-devel] [PATCH 3/4] acpi: has_immutable_rsdp->!rsdp_in_ram Igor Mammedov
2015-02-17 10:05 ` [Qemu-devel] [PATCH 4/4] acpi-build: simplify rsdp management for legacy Michael S. Tsirkin
2015-02-17 14:16   ` Igor Mammedov

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=1424167517-21866-4-git-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=aliguori@amazon.com \
    --cc=imammedo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).