All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [Qemu-devel] [PULL 23/29] hw/i386/pc: Let pc_build_smbios() take a FWCfgState argument
Date: Mon, 16 Sep 2019 16:42:03 +0200	[thread overview]
Message-ID: <1568644929-9124-24-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1568644929-9124-1-git-send-email-pbonzini@redhat.com>

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Pass the FWCfgState object by argument, this will
allow us to remove the PCMachineState argument later.

Suggested-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190818225414.22590-10-philmd@redhat.com>
---
 hw/i386/pc.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 8d2e600..612d676 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -894,7 +894,7 @@ static uint32_t x86_cpu_apic_id_from_index(PCMachineState *pcms,
     }
 }
 
-static void pc_build_smbios(PCMachineState *pcms)
+static void pc_build_smbios(PCMachineState *pcms, FWCfgState *fw_cfg)
 {
     uint8_t *smbios_tables, *smbios_anchor;
     size_t smbios_tables_len, smbios_anchor_len;
@@ -908,7 +908,7 @@ static void pc_build_smbios(PCMachineState *pcms)
 
     smbios_tables = smbios_get_table_legacy(ms, &smbios_tables_len);
     if (smbios_tables) {
-        fw_cfg_add_bytes(pcms->fw_cfg, FW_CFG_SMBIOS_ENTRIES,
+        fw_cfg_add_bytes(fw_cfg, FW_CFG_SMBIOS_ENTRIES,
                          smbios_tables, smbios_tables_len);
     }
 
@@ -929,9 +929,9 @@ static void pc_build_smbios(PCMachineState *pcms)
     g_free(mem_array);
 
     if (smbios_anchor) {
-        fw_cfg_add_file(pcms->fw_cfg, "etc/smbios/smbios-tables",
+        fw_cfg_add_file(fw_cfg, "etc/smbios/smbios-tables",
                         smbios_tables, smbios_tables_len);
-        fw_cfg_add_file(pcms->fw_cfg, "etc/smbios/smbios-anchor",
+        fw_cfg_add_file(fw_cfg, "etc/smbios/smbios-anchor",
                         smbios_anchor, smbios_anchor_len);
     }
 }
@@ -1695,7 +1695,7 @@ void pc_machine_done(Notifier *notifier, void *data)
 
     acpi_setup();
     if (pcms->fw_cfg) {
-        pc_build_smbios(pcms);
+        pc_build_smbios(pcms, pcms->fw_cfg);
         pc_build_feature_control_file(pcms);
         /* update FW_CFG_NB_CPUS to account for -device added CPUs */
         fw_cfg_modify_i16(pcms->fw_cfg, FW_CFG_NB_CPUS, pcms->boot_cpus);
-- 
1.8.3.1




  parent reply	other threads:[~2019-09-16 16:01 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-16 14:41 [Qemu-devel] [PULL 00/29] Misc patches for 2019-09-16 Paolo Bonzini
2019-09-16 14:41 ` [Qemu-devel] [PULL 01/29] i386/kvm: support guest access CORE cstate Paolo Bonzini
2019-09-16 14:41 ` [Qemu-devel] [PULL 02/29] exec.c: replace hwaddr with uint64_t for better understanding Paolo Bonzini
2019-09-16 14:41 ` [Qemu-devel] [PULL 03/29] exec.c: get nodes_nb_alloc with one MAX calculation Paolo Bonzini
2019-09-16 14:41 ` [Qemu-devel] [PULL 04/29] exec.c: subpage->sub_section is already initialized to 0 Paolo Bonzini
2019-09-16 14:41 ` [Qemu-devel] [PULL 05/29] exec.c: correct the maximum skip value during compact Paolo Bonzini
2019-09-16 14:41 ` [Qemu-devel] [PULL 06/29] exec.c: add a check between constants to see whether we could skip Paolo Bonzini
2019-09-16 14:41 ` [Qemu-devel] [PULL 07/29] win32: fix README file in NSIS installer Paolo Bonzini
2019-09-16 14:41 ` [Qemu-devel] [PULL 08/29] test-char: fix AddressSanitizer failure Paolo Bonzini
2019-09-16 14:41 ` [Qemu-devel] [PULL 09/29] hw/i386: Move CONFIG_ACPI_PCI to CONFIG_PC Paolo Bonzini
2019-09-16 14:41 ` [Qemu-devel] [PULL 10/29] elf-ops.h: fix int overflow in load_elf() Paolo Bonzini
2019-09-16 14:41 ` [Qemu-devel] [PULL 11/29] memory: fetch pmem size in get_file_size() Paolo Bonzini
2019-09-16 14:41 ` [Qemu-devel] [PULL 12/29] memory: inline and optimize devend_memop Paolo Bonzini
2019-09-16 14:41 ` [Qemu-devel] [PULL 13/29] qemu-thread: Add qemu_cond_timedwait Paolo Bonzini
2019-09-16 14:41 ` [Qemu-devel] [PULL 14/29] cpus: Fix throttling during vm_stop Paolo Bonzini
2019-09-16 14:41 ` [Qemu-devel] [PULL 15/29] hw/i386/pc: Use e820_get_num_entries() to access e820_entries Paolo Bonzini
2019-09-16 14:41 ` [Qemu-devel] [PULL 16/29] hw/i386/pc: Extract e820 memory layout code Paolo Bonzini
2019-09-16 14:41 ` [Qemu-devel] [PULL 17/29] hw/i386/pc: Use address_space_memory in place Paolo Bonzini
2019-09-16 14:41 ` [Qemu-devel] [PULL 18/29] hw/i386/pc: Rename bochs_bios_init as more generic fw_cfg_arch_create Paolo Bonzini
2019-09-16 14:41 ` [Qemu-devel] [PULL 19/29] hw/i386/pc: Pass the boot_cpus value by argument Paolo Bonzini
2019-09-16 14:42 ` [Qemu-devel] [PULL 20/29] hw/i386/pc: Pass the apic_id_limit " Paolo Bonzini
2019-09-16 14:42 ` [Qemu-devel] [PULL 21/29] hw/i386/pc: Pass the CPUArchIdList array " Paolo Bonzini
2019-09-16 14:42 ` [Qemu-devel] [PULL 22/29] hw/i386/pc: Replace PCMachineState argument with MachineState in fw_cfg_arch_create Paolo Bonzini
2019-09-16 14:42 ` Paolo Bonzini [this message]
2019-09-16 14:42 ` [Qemu-devel] [PULL 24/29] hw/i386/pc: Let pc_build_smbios() take a generic MachineState argument Paolo Bonzini
2019-09-16 14:42 ` [Qemu-devel] [PULL 25/29] hw/i386/pc: Rename pc_build_smbios() as generic fw_cfg_build_smbios() Paolo Bonzini
2019-09-16 14:42 ` [Qemu-devel] [PULL 26/29] hw/i386/pc: Let pc_build_feature_control() take a FWCfgState argument Paolo Bonzini
2019-09-16 14:42 ` [Qemu-devel] [PULL 27/29] hw/i386/pc: Let pc_build_feature_control() take a MachineState argument Paolo Bonzini
2019-09-16 14:42 ` [Qemu-devel] [PULL 28/29] hw/i386/pc: Rename pc_build_feature_control() as generic fw_cfg_build_* Paolo Bonzini
2019-09-16 14:42 ` [Qemu-devel] [PULL 29/29] hw/i386/pc: Extract the x86 generic fw_cfg code Paolo Bonzini

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=1568644929-9124-24-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=philmd@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.