[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/13] pci: Build hw/pci/pci-hmp-cmds.c only when CONFIG_PCI
From: |
Markus Armbruster |
Subject: |
[PULL 05/13] pci: Build hw/pci/pci-hmp-cmds.c only when CONFIG_PCI |
Date: |
Mon, 19 Dec 2022 16:51:12 +0100 |
We compile pci-hmp-cmds.c always, but pci-qmp-cmds.c only when
CONFIG_PCI. hw/pci/pci-stub.c keeps the linker happy when
!CONFIG_PCI. Build pci-hmp-cmds.c that way, too.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20221201121133.3813857-6-armbru@redhat.com>
---
hw/pci/pci-stub.c | 5 +++++
hw/pci/meson.build | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/hw/pci/pci-stub.c b/hw/pci/pci-stub.c
index f29ecc999e..01d20a2f67 100644
--- a/hw/pci/pci-stub.c
+++ b/hw/pci/pci-stub.c
@@ -21,6 +21,7 @@
#include "qemu/osdep.h"
#include "sysemu/sysemu.h"
#include "monitor/monitor.h"
+#include "monitor/hmp.h"
#include "qapi/qapi-commands-pci.h"
#include "hw/pci/pci.h"
#include "hw/pci/msi.h"
@@ -34,6 +35,10 @@ PciInfoList *qmp_query_pci(Error **errp)
return NULL;
}
+void hmp_info_pci(Monitor *mon, const QDict *qdict)
+{
+}
+
void hmp_pcie_aer_inject_error(Monitor *mon, const QDict *qdict)
{
monitor_printf(mon, "PCI devices not supported\n");
diff --git a/hw/pci/meson.build b/hw/pci/meson.build
index e42a133f3a..4fcd888b27 100644
--- a/hw/pci/meson.build
+++ b/hw/pci/meson.build
@@ -5,6 +5,7 @@ pci_ss.add(files(
'pci.c',
'pci_bridge.c',
'pci_host.c',
+ 'pci-hmp-cmds.c',
'pci-qmp-cmds.c',
'pcie_sriov.c',
'shpc.c',
@@ -20,4 +21,3 @@ softmmu_ss.add_all(when: 'CONFIG_PCI', if_true: pci_ss)
softmmu_ss.add(when: 'CONFIG_PCI', if_false: files('pci-stub.c'))
softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('pci-stub.c'))
-softmmu_ss.add(files('pci-hmp-cmds.c'))
--
2.37.3
- [PULL 00/13] Monitor patches for 2022-12-19, Markus Armbruster, 2022/12/19
- [PULL 04/13] pci: Make query-pci stub consistent with the real one, Markus Armbruster, 2022/12/19
- [PULL 02/13] pci: Move QMP commands to new hw/pci/pci-qmp-cmds.c, Markus Armbruster, 2022/12/19
- [PULL 01/13] pci: Clean up a few things checkpatch.pl would flag later on, Markus Armbruster, 2022/12/19
- [PULL 11/13] pci: Rename hmp_pcie_aer_inject_error()'s local variable @err, Markus Armbruster, 2022/12/19
- [PULL 10/13] pci: Inline do_pcie_aer_inject_error() into its only caller, Markus Armbruster, 2022/12/19
- [PULL 05/13] pci: Build hw/pci/pci-hmp-cmds.c only when CONFIG_PCI,
Markus Armbruster <=
- [PULL 06/13] pci: Deduplicate get_class_desc(), Markus Armbruster, 2022/12/19
- [PULL 03/13] pci: Move HMP commands from monitor/ to new hw/pci/pci-hmp-cmds.c, Markus Armbruster, 2022/12/19
- [PULL 12/13] pci: Improve do_pcie_aer_inject_error()'s error messages, Markus Armbruster, 2022/12/19
- [PULL 09/13] pci: Move HMP command from hw/pci/pcie_aer.c to pci-hmp-cmds.c, Markus Armbruster, 2022/12/19
- [PULL 07/13] pci: Move pcibus_dev_print() to pci-hmp-cmds.c, Markus Armbruster, 2022/12/19
- [PULL 08/13] pci: Fix silent truncation of pcie_aer_inject_error argument, Markus Armbruster, 2022/12/19
- [PULL 13/13] pci: Reject pcie_aer_inject_error -c with symbolic error status, Markus Armbruster, 2022/12/19
- Re: [PULL 00/13] Monitor patches for 2022-12-19, Peter Maydell, 2022/12/20