[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 45/62] fw_cfg: allow building without other devices
From: |
Paolo Bonzini |
Subject: |
[PULL 45/62] fw_cfg: allow building without other devices |
Date: |
Mon, 16 Dec 2019 17:28:29 +0100 |
The microvm machine type uses fw_cfg but lacks SMBIOS and ACPI. Do not
include the files if the symbol is not present in QEMU and remove
dependencies on machine-specific files.
Reviewed-by: Sergio Lopez <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/i386/fw_cfg.c | 7 +++++++
hw/i386/pc.c | 2 --
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c
index 39b6bc6..326e33e 100644
--- a/hw/i386/fw_cfg.c
+++ b/hw/i386/fw_cfg.c
@@ -22,6 +22,9 @@
#include "hw/nvram/fw_cfg.h"
#include "e820_memory_layout.h"
#include "kvm_i386.h"
+#include "config-devices.h"
+
+struct hpet_fw_config hpet_cfg = {.count = UINT8_MAX};
const char *fw_cfg_arch_key_name(uint16_t key)
{
@@ -46,6 +49,7 @@ const char *fw_cfg_arch_key_name(uint16_t key)
void fw_cfg_build_smbios(MachineState *ms, FWCfgState *fw_cfg)
{
+#ifdef CONFIG_SMBIOS
uint8_t *smbios_tables, *smbios_anchor;
size_t smbios_tables_len, smbios_anchor_len;
struct smbios_phys_mem_area *mem_array;
@@ -83,6 +87,7 @@ void fw_cfg_build_smbios(MachineState *ms, FWCfgState *fw_cfg)
fw_cfg_add_file(fw_cfg, "etc/smbios/smbios-anchor",
smbios_anchor, smbios_anchor_len);
}
+#endif
}
FWCfgState *fw_cfg_arch_create(MachineState *ms,
@@ -114,8 +119,10 @@ FWCfgState *fw_cfg_arch_create(MachineState *ms,
*/
fw_cfg_add_i16(fw_cfg, FW_CFG_MAX_CPUS, apic_id_limit);
fw_cfg_add_i64(fw_cfg, FW_CFG_RAM_SIZE, (uint64_t)ram_size);
+#ifdef CONFIG_ACPI
fw_cfg_add_bytes(fw_cfg, FW_CFG_ACPI_TABLES,
acpi_tables, acpi_tables_len);
+#endif
fw_cfg_add_i32(fw_cfg, FW_CFG_IRQ0_OVERRIDE, kvm_allows_irq0_override());
fw_cfg_add_bytes(fw_cfg, FW_CFG_E820_TABLE,
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index ac08e63..ab90ee3 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -101,8 +101,6 @@
#define DPRINTF(fmt, ...)
#endif
-struct hpet_fw_config hpet_cfg = {.count = UINT8_MAX};
-
GlobalProperty pc_compat_4_1[] = {};
const size_t pc_compat_4_1_len = G_N_ELEMENTS(pc_compat_4_1);
--
1.8.3.1
- [PULL 34/62] migration: fix maybe-uninitialized warning, (continued)
- [PULL 34/62] migration: fix maybe-uninitialized warning, Paolo Bonzini, 2019/12/16
- [PULL 36/62] vhost-user-scsi: fix printf format warning, Paolo Bonzini, 2019/12/16
- [PULL 37/62] os-posix: simplify os_find_datadir, Paolo Bonzini, 2019/12/16
- [PULL 38/62] tests: skip block layer tests if !CONFIG_TOOLS, Paolo Bonzini, 2019/12/16
- [PULL 39/62] libvixl: remove per-target compiler flags, Paolo Bonzini, 2019/12/16
- [PULL 40/62] crypto: move common bits for all emulators to libqemuutil, Paolo Bonzini, 2019/12/16
- [PULL 42/62] configure: set $PYTHON to a full path, Paolo Bonzini, 2019/12/16
- [PULL 41/62] stubs: replace stubs with lnot if applicable, Paolo Bonzini, 2019/12/16
- [PULL 44/62] i386: conditionally compile more files, Paolo Bonzini, 2019/12/16
- [PULL 43/62] configure: simplify vhost condition with Kconfig, Paolo Bonzini, 2019/12/16
- [PULL 45/62] fw_cfg: allow building without other devices,
Paolo Bonzini <=
- [PULL 47/62] pci-stub: add more MSI functions, Paolo Bonzini, 2019/12/16
- [PULL 48/62] x86: move SMM property to X86MachineState, Paolo Bonzini, 2019/12/16
- [PULL 50/62] x86: move more x86-generic functions out of PC files, Paolo Bonzini, 2019/12/16
- [PULL 52/62] pc: stubify x86 iommu, Paolo Bonzini, 2019/12/16
- [PULL 53/62] hw/i386: De-duplicate gsi_handler() to remove kvm_pc_gsi_handler(), Paolo Bonzini, 2019/12/16
- [PULL 46/62] hw: replace hw/i386/pc.h with a header just for the i8259, Paolo Bonzini, 2019/12/16
- [PULL 49/62] hw/i386/pc: Convert DPRINTF() to trace events, Paolo Bonzini, 2019/12/16
- [PULL 51/62] acpi: move PC stubs out of stubs/, Paolo Bonzini, 2019/12/16
- [PULL 56/62] hw/i386/pc: Use TYPE_PORT92 instead of hardcoded string, Paolo Bonzini, 2019/12/16
- [PULL 54/62] hw/i386: Simplify ioapic_init_gsi(), Paolo Bonzini, 2019/12/16