qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 04/16] acpi: Make acpi_setup() get PCMachineStat


From: Marcel Apfelbaum
Subject: Re: [Qemu-devel] [PATCH 04/16] acpi: Make acpi_setup() get PCMachineState as argument
Date: Mon, 7 Dec 2015 17:24:27 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

On 12/02/2015 03:46 AM, Eduardo Habkost wrote:
Lots of PcGuestInfo fields are duplicates of PCMachineClass or
PCMachineState fields. Pass PCMachineState as argument to
acpi_setup(), so we can simply let the ACPI code use those fields
directly.

I completely agree with removing duplicated fields and using PCMachine
fields directly, but this not what this patch does.
It only extracts PcGuestInfo info from the machine.

Thanks,
Marcel



Signed-off-by: Eduardo Habkost <address@hidden>
---
  hw/i386/acpi-build.c | 3 ++-
  hw/i386/acpi-build.h | 2 +-
  hw/i386/pc.c         | 2 +-
  3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index bca3f06..74f0922 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1893,8 +1893,9 @@ static const VMStateDescription vmstate_acpi_build = {
      },
  };

-void acpi_setup(PcGuestInfo *guest_info)
+void acpi_setup(PCMachineState *pcms)
  {
+    PcGuestInfo *guest_info = &pcms->acpi_guest_info;
      AcpiBuildTables tables;
      AcpiBuildState *build_state;

diff --git a/hw/i386/acpi-build.h b/hw/i386/acpi-build.h
index e57b1aa..132aba2 100644
--- a/hw/i386/acpi-build.h
+++ b/hw/i386/acpi-build.h
@@ -4,6 +4,6 @@

  #include "qemu/typedefs.h"

-void acpi_setup(PcGuestInfo *);
+void acpi_setup(PCMachineState *pcms);

  #endif
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index a17e5b3e..fc98a20 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1179,7 +1179,7 @@ void pc_machine_done(Notifier *notifier, void *data)
          }
      }

-    acpi_setup(&pcms->acpi_guest_info);
+    acpi_setup(pcms);
  }

  PcGuestInfo *pc_guest_info_init(PCMachineState *pcms)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]