hw/s390x: Reduce 'monitor/monitor.h' inclusions
We want to make the HMP commands available for all targets, move the declarations to "monitor/hmp.h" where all other are, and only include the monitor headers in the source files. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Acked-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Eric Farman <farman@linux.ibm.com> Message-Id: <20260427080738.77138-13-philmd@linaro.org>
Philippe Mathieu-Daudé committed
Apr 10, 2026 at 15:49 UTC
b0386fb498fadf9235d8e8a2f7cc20ff0791ae1d
5 files changed
+9
-7
hw/s390x/s390-skeys.c
+2
@@ -24,6 +24,8 @@
24
#include "system/kvm.h"
25
#include "migration/qemu-file-types.h"
26
#include "migration/register.h"
27
+#include "monitor/hmp.h"
28
+#include "monitor/monitor.h"
29
#include "trace.h"
30
31
#define S390_SKEYS_BUFFER_SIZE (128 * KiB) /* Room for 128k storage keys */
hw/s390x/s390-stattrib.c
+2
@@ -15,6 +15,8 @@
15
#include "system/ram_addr.h"
16
#include "migration/qemu-file.h"
17
#include "migration/register.h"
18
+#include "monitor/hmp.h"
19
+#include "monitor/monitor.h"
20
#include "hw/core/qdev-properties.h"
21
#include "hw/s390x/storage-attributes.h"
22
#include "qemu/error-report.h"
include/hw/s390x/storage-attributes.h
-4
@@ -13,7 +13,6 @@
13
#define S390_STORAGE_ATTRIBUTES_H
14
15
#include "hw/core/qdev.h"
16
-#include "monitor/monitor.h"
16
#include "qom/object.h"
17
18
#define TYPE_S390_STATTRIB "s390-storage_attributes"
@@ -72,7 +71,4 @@ static inline Object *kvm_s390_stattrib_create(void)
71
}
72
#endif
73
75
-void hmp_info_cmma(Monitor *mon, const QDict *qdict);
76
-void hmp_migrationmode(Monitor *mon, const QDict *qdict);
77
-
74
#endif /* S390_STORAGE_ATTRIBUTES_H */
include/hw/s390x/storage-keys.h
-3
@@ -13,7 +13,6 @@
13
#define S390_STORAGE_KEYS_H
14
15
#include "hw/core/qdev.h"
16
-#include "monitor/monitor.h"
16
#include "qom/object.h"
17
18
#define TYPE_S390_SKEYS "s390-skeys"
@@ -123,8 +122,6 @@ int s390_skeys_set(S390SKeysState *ks, uint64_t start_gfn,
122
S390SKeysState *s390_get_skeys_device(void);
123
124
void s390_qmp_dump_skeys(const char *filename, Error **errp);
126
-void hmp_dump_skeys(Monitor *mon, const QDict *qdict);
127
-void hmp_info_skeys(Monitor *mon, const QDict *qdict);
125
126
#define TYPE_DUMP_SKEYS_INTERFACE "dump-skeys-interface"
127
include/monitor/hmp.h
+5
@@ -174,4 +174,9 @@ void hmp_gva2gpa(Monitor *mon, const QDict *qdict);
174
void hmp_gpa2hva(Monitor *mon, const QDict *qdict);
175
void hmp_gpa2hpa(Monitor *mon, const QDict *qdict);
176
177
+void hmp_dump_skeys(Monitor *mon, const QDict *qdict);
178
+void hmp_info_skeys(Monitor *mon, const QDict *qdict);
179
+void hmp_info_cmma(Monitor *mon, const QDict *qdict);
180
+void hmp_migrationmode(Monitor *mon, const QDict *qdict);
181
+
182
#endif