qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 15/21] hw/arm/virt: pass VirtMachineState instead of VirtGuestInfo
Date: Mon,  9 Jan 2017 11:53:38 +0000	[thread overview]
Message-ID: <1483962824-29185-16-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1483962824-29185-1-git-send-email-peter.maydell@linaro.org>

From: Andrew Jones <drjones@redhat.com>

Only two functions take VirtGuestInfo parameters. Now that guest-info
is part of VirtMachineState, and VirtMachineState is defined in the
virt header, pass that instead.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Message-id: 20170102200153.28864-11-drjones@redhat.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 include/hw/arm/virt.h    | 2 +-
 hw/arm/virt-acpi-build.c | 3 ++-
 hw/arm/virt.c            | 8 ++++----
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h
index 91dbd69..b1eed52 100644
--- a/include/hw/arm/virt.h
+++ b/include/hw/arm/virt.h
@@ -122,6 +122,6 @@ typedef struct {
 #define VIRT_MACHINE_CLASS(klass) \
     OBJECT_CLASS_CHECK(VirtMachineClass, klass, TYPE_VIRT_MACHINE)
 
-void virt_acpi_setup(VirtGuestInfo *guest_info);
+void virt_acpi_setup(VirtMachineState *vms);
 
 #endif /* QEMU_ARM_VIRT_H */
diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
index 4fd52da..ac507d6 100644
--- a/hw/arm/virt-acpi-build.c
+++ b/hw/arm/virt-acpi-build.c
@@ -823,8 +823,9 @@ static const VMStateDescription vmstate_virt_acpi_build = {
     },
 };
 
-void virt_acpi_setup(VirtGuestInfo *guest_info)
+void virt_acpi_setup(VirtMachineState *vms)
 {
+    VirtGuestInfo *guest_info = &vms->acpi_guest_info;
     AcpiBuildTables tables;
     AcpiBuildState *build_state;
 
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 8556ff2..2201517 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -1131,9 +1131,9 @@ static void *machvirt_dtb(const struct arm_boot_info *binfo, int *fdt_size)
     return board->fdt;
 }
 
-static void virt_build_smbios(VirtGuestInfo *guest_info)
+static void virt_build_smbios(VirtMachineState *vms)
 {
-    FWCfgState *fw_cfg = guest_info->fw_cfg;
+    FWCfgState *fw_cfg = vms->acpi_guest_info.fw_cfg;
     uint8_t *smbios_tables, *smbios_anchor;
     size_t smbios_tables_len, smbios_anchor_len;
     const char *product = "QEMU Virtual Machine";
@@ -1166,8 +1166,8 @@ void virt_machine_done(Notifier *notifier, void *data)
     VirtMachineState *vms = container_of(notifier, VirtMachineState,
                                          machine_done);
 
-    virt_acpi_setup(&vms->acpi_guest_info);
-    virt_build_smbios(&vms->acpi_guest_info);
+    virt_acpi_setup(vms);
+    virt_build_smbios(vms);
 }
 
 static void machvirt_init(MachineState *machine)
-- 
2.7.4

  parent reply	other threads:[~2017-01-09 11:53 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-09 11:53 [Qemu-devel] [PULL 00/21] target-arm queue Peter Maydell
2017-01-09 11:53 ` [Qemu-devel] [PULL 01/21] i2c: Allow I2C devices to NAK start events Peter Maydell
2017-01-09 11:53 ` [Qemu-devel] [PULL 02/21] hw/char: QOM'ify exynos4210_uart.c Peter Maydell
2017-01-09 11:53 ` [Qemu-devel] [PULL 03/21] hw/arm/virt: Merge VirtBoardInfo and VirtMachineState Peter Maydell
2017-01-09 11:53 ` [Qemu-devel] [PULL 04/21] hw/arm/virt: Rename 'vbi' variables to 'vms' Peter Maydell
2017-01-09 11:53 ` [Qemu-devel] [PULL 05/21] hw/arm/virt: Don't incorrectly claim architectural timer to be edge-triggered Peter Maydell
2017-01-09 11:53 ` [Qemu-devel] [PULL 06/21] hw/arm/virt-acpi-build: add all missing cpu_to_le's Peter Maydell
2017-01-09 11:53 ` [Qemu-devel] [PULL 07/21] hw/arm/virt-acpi-build: name GIC CPU Interface Structure appropriately Peter Maydell
2017-01-09 11:53 ` [Qemu-devel] [PULL 08/21] hw/arm/virt-acpi-build: gtdt: improve flag naming Peter Maydell
2017-01-09 11:53 ` [Qemu-devel] [PULL 09/21] hw/arm/virt-acpi-build: fadt: " Peter Maydell
2017-01-09 11:53 ` [Qemu-devel] [PULL 10/21] hw/arm/virt: parameter passing cleanups Peter Maydell
2017-01-09 11:53 ` [Qemu-devel] [PULL 11/21] hw/arm/virt: use VirtMachineState.gic_version Peter Maydell
2017-01-09 11:53 ` [Qemu-devel] [PULL 12/21] hw/arm/virt: eliminate struct VirtGuestInfoState Peter Maydell
2017-01-09 11:53 ` [Qemu-devel] [PULL 13/21] hw/arm/virt: remove include/hw/arm/virt-acpi-build.h Peter Maydell
2017-01-09 11:53 ` [Qemu-devel] [PULL 14/21] hw/arm/virt: move VirtMachineState/Class to virt.h Peter Maydell
2017-01-09 11:53 ` Peter Maydell [this message]
2017-01-09 11:53 ` [Qemu-devel] [PULL 16/21] hw/arm/virt-acpi-build: remove redundant members from VirtGuestInfo Peter Maydell
2017-01-09 11:53 ` [Qemu-devel] [PULL 17/21] hw/arm/virt-acpi-build: don't save VirtGuestInfo on AcpiBuildState Peter Maydell
2017-01-09 11:53 ` [Qemu-devel] [PULL 18/21] hw/arm/virt: remove VirtGuestInfo Peter Maydell
2017-01-09 11:53 ` [Qemu-devel] [PULL 19/21] hw/arm/virt-acpi-build: Don't incorrectly claim architectural timer to be edge-triggered Peter Maydell
2017-01-09 11:53 ` [Qemu-devel] [PULL 20/21] m25p80: don't let rogue SPI controllers cause buffer overruns Peter Maydell
2017-01-09 11:53 ` [Qemu-devel] [PULL 21/21] hw/ssi/imx_spi.c: Remove MSGDATA register support Peter Maydell
2017-01-09 13:44 ` [Qemu-devel] [PULL 00/21] target-arm queue Peter Maydell

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=1483962824-29185-16-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --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).