[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 16/27] i386: correctly select code in hw/i386 that depends on othe
From: |
Paolo Bonzini |
Subject: |
[PULL 16/27] i386: correctly select code in hw/i386 that depends on other components |
Date: |
Sun, 12 May 2024 12:49:34 +0200 |
fw_cfg.c and vapic.c are currently included unconditionally but
depend on other components. vapic.c depends on the local APIC,
while fw_cfg.c includes a piece of AML builder code that depends
on CONFIG_ACPI.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Message-ID: <20240509170044.190795-9-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/i386/fw_cfg.c | 2 ++
hw/i386/meson.build | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c
index d802d2787f0..6e0d9945d07 100644
--- a/hw/i386/fw_cfg.c
+++ b/hw/i386/fw_cfg.c
@@ -203,6 +203,7 @@ void fw_cfg_build_feature_control(MachineState *ms,
FWCfgState *fw_cfg)
fw_cfg_add_file(fw_cfg, "etc/msr_feature_control", val, sizeof(*val));
}
+#ifdef CONFIG_ACPI
void fw_cfg_add_acpi_dsdt(Aml *scope, FWCfgState *fw_cfg)
{
/*
@@ -229,3 +230,4 @@ void fw_cfg_add_acpi_dsdt(Aml *scope, FWCfgState *fw_cfg)
aml_append(dev, aml_name_decl("_CRS", crs));
aml_append(scope, dev);
}
+#endif
diff --git a/hw/i386/meson.build b/hw/i386/meson.build
index d8b70ef3e9c..d9da676038c 100644
--- a/hw/i386/meson.build
+++ b/hw/i386/meson.build
@@ -1,12 +1,12 @@
i386_ss = ss.source_set()
i386_ss.add(files(
'fw_cfg.c',
- 'vapic.c',
'e820_memory_layout.c',
'multiboot.c',
'x86.c',
))
+i386_ss.add(when: 'CONFIG_APIC', if_true: files('vapic.c'))
i386_ss.add(when: 'CONFIG_X86_IOMMU', if_true: files('x86-iommu.c'),
if_false: files('x86-iommu-stub.c'))
i386_ss.add(when: 'CONFIG_AMD_IOMMU', if_true: files('amd_iommu.c'),
--
2.45.0
- [PULL 10/27] s390_flic: add migration-enabled property, (continued)
- [PULL 10/27] s390_flic: add migration-enabled property, Paolo Bonzini, 2024/05/12
- [PULL 11/27] s390: move css_migration_enabled from machine to css.c, Paolo Bonzini, 2024/05/12
- [PULL 12/27] s390x: select correct components for no-board build, Paolo Bonzini, 2024/05/12
- [PULL 14/27] xen: initialize legacy backends from xen_bus_init(), Paolo Bonzini, 2024/05/12
- [PULL 15/27] xen: register legacy backends via xen_backend_init, Paolo Bonzini, 2024/05/12
- [PULL 13/27] tests/qtest: s390x: fix operation in a build without any boards or devices, Paolo Bonzini, 2024/05/12
- [PULL 19/27] hw/i386: move rtc-reset-reinjection command out of hw/rtc, Paolo Bonzini, 2024/05/12
- [PULL 17/27] i386: pc: remove unnecessary MachineClass overrides, Paolo Bonzini, 2024/05/12
- [PULL 18/27] hw/i386: split x86.c in multiple parts, Paolo Bonzini, 2024/05/12
- [PULL 08/27] sh4: select correct components for no-board build, Paolo Bonzini, 2024/05/12
- [PULL 16/27] i386: correctly select code in hw/i386 that depends on other components,
Paolo Bonzini <=
- [PULL 20/27] i386: select correct components for no-board build, Paolo Bonzini, 2024/05/12
- [PULL 21/27] tests/qtest: arm: fix operation in a build without any boards or devices, Paolo Bonzini, 2024/05/12
- [PULL 23/27] meson: move libfdt together with other dependencies, Paolo Bonzini, 2024/05/12
- [PULL 22/27] meson: pick libfdt from common_ss when building target-specific files, Paolo Bonzini, 2024/05/12
- [PULL 25/27] kconfig: express dependency of individual boards on libfdt, Paolo Bonzini, 2024/05/12
- [PULL 27/27] configs: disable emulators that require it if libfdt is not found, Paolo Bonzini, 2024/05/12
- [PULL 24/27] kconfig: allow compiling out QEMU device tree code per target, Paolo Bonzini, 2024/05/12
- [PULL 26/27] hw/xtensa: require libfdt, Paolo Bonzini, 2024/05/12
- [PULL 01/27] target/i386: remove PCOMMIT from TCG, deprecate property, Paolo Bonzini, 2024/05/12
- Re: [PULL 00/27] Build/arch cleanups, target/i386 fixes for 2024-05-10, Richard Henderson, 2024/05/14