* [PATCH 0/2] system/qtest: Minor include cleanups
@ 2023-12-12 11:30 Philippe Mathieu-Daudé
2023-12-12 11:30 ` [PATCH 1/2] system/qtest: Include missing 'hw/core/cpu.h' header Philippe Mathieu-Daudé
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-12-12 11:30 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Laurent Vivier, Paolo Bonzini,
Philippe Mathieu-Daudé
Add missing header and restrict to sysemu.
Philippe Mathieu-Daudé (2):
system/qtest: Include missing 'hw/core/cpu.h' header
system/qtest: Restrict QTest API to system emulation
include/sysemu/qtest.h | 2 ++
system/qtest.c | 1 +
2 files changed, 3 insertions(+)
--
2.41.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] system/qtest: Include missing 'hw/core/cpu.h' header
2023-12-12 11:30 [PATCH 0/2] system/qtest: Minor include cleanups Philippe Mathieu-Daudé
@ 2023-12-12 11:30 ` Philippe Mathieu-Daudé
2023-12-12 12:11 ` Thomas Huth
2023-12-12 11:30 ` [PATCH 2/2] system/qtest: Restrict QTest API to system emulation Philippe Mathieu-Daudé
2023-12-26 15:40 ` [PATCH 0/2] system/qtest: Minor include cleanups Philippe Mathieu-Daudé
2 siblings, 1 reply; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-12-12 11:30 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Laurent Vivier, Paolo Bonzini,
Philippe Mathieu-Daudé
"hw/core/cpu.h" declares 'first_cpu'. Include it to avoid
when unrelated headers are refactored:
system/qtest.c:548:33: error: use of undeclared identifier 'first_cpu'
address_space_write(first_cpu->as, addr, MEMTXATTRS_UNSPECIFIED,
^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
system/qtest.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/system/qtest.c b/system/qtest.c
index 7964f0b248..6da58b3874 100644
--- a/system/qtest.c
+++ b/system/qtest.c
@@ -21,6 +21,7 @@
#include "exec/tswap.h"
#include "hw/qdev-core.h"
#include "hw/irq.h"
+#include "hw/core/cpu.h"
#include "qemu/accel.h"
#include "sysemu/cpu-timers.h"
#include "qemu/config-file.h"
--
2.41.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] system/qtest: Restrict QTest API to system emulation
2023-12-12 11:30 [PATCH 0/2] system/qtest: Minor include cleanups Philippe Mathieu-Daudé
2023-12-12 11:30 ` [PATCH 1/2] system/qtest: Include missing 'hw/core/cpu.h' header Philippe Mathieu-Daudé
@ 2023-12-12 11:30 ` Philippe Mathieu-Daudé
2023-12-12 13:24 ` Thomas Huth
2023-12-26 15:40 ` [PATCH 0/2] system/qtest: Minor include cleanups Philippe Mathieu-Daudé
2 siblings, 1 reply; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-12-12 11:30 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Laurent Vivier, Paolo Bonzini,
Philippe Mathieu-Daudé
Outside of system emulation, only qtest_enabled() can be used.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/sysemu/qtest.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/sysemu/qtest.h b/include/sysemu/qtest.h
index 85f05b0e46..b5d5fd3463 100644
--- a/include/sysemu/qtest.h
+++ b/include/sysemu/qtest.h
@@ -23,6 +23,7 @@ static inline bool qtest_enabled(void)
return qtest_allowed;
}
+#ifndef CONFIG_USER_ONLY
void qtest_send_prefix(CharBackend *chr);
void G_GNUC_PRINTF(2, 3) qtest_sendf(CharBackend *chr, const char *fmt, ...);
void qtest_set_command_cb(bool (*pc_cb)(CharBackend *chr, gchar **words));
@@ -35,5 +36,6 @@ void qtest_server_set_send_handler(void (*send)(void *, const char *),
void qtest_server_inproc_recv(void *opaque, const char *buf);
int64_t qtest_get_virtual_clock(void);
+#endif
#endif
--
2.41.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] system/qtest: Include missing 'hw/core/cpu.h' header
2023-12-12 11:30 ` [PATCH 1/2] system/qtest: Include missing 'hw/core/cpu.h' header Philippe Mathieu-Daudé
@ 2023-12-12 12:11 ` Thomas Huth
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2023-12-12 12:11 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Laurent Vivier, Paolo Bonzini
On 12/12/2023 12.30, Philippe Mathieu-Daudé wrote:
> "hw/core/cpu.h" declares 'first_cpu'. Include it to avoid
> when unrelated headers are refactored:
>
> system/qtest.c:548:33: error: use of undeclared identifier 'first_cpu'
> address_space_write(first_cpu->as, addr, MEMTXATTRS_UNSPECIFIED,
> ^
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> system/qtest.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/system/qtest.c b/system/qtest.c
> index 7964f0b248..6da58b3874 100644
> --- a/system/qtest.c
> +++ b/system/qtest.c
> @@ -21,6 +21,7 @@
> #include "exec/tswap.h"
> #include "hw/qdev-core.h"
> #include "hw/irq.h"
> +#include "hw/core/cpu.h"
> #include "qemu/accel.h"
> #include "sysemu/cpu-timers.h"
> #include "qemu/config-file.h"
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] system/qtest: Restrict QTest API to system emulation
2023-12-12 11:30 ` [PATCH 2/2] system/qtest: Restrict QTest API to system emulation Philippe Mathieu-Daudé
@ 2023-12-12 13:24 ` Thomas Huth
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2023-12-12 13:24 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Laurent Vivier, Paolo Bonzini
On 12/12/2023 12.30, Philippe Mathieu-Daudé wrote:
> Outside of system emulation, only qtest_enabled() can be used.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> include/sysemu/qtest.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/sysemu/qtest.h b/include/sysemu/qtest.h
> index 85f05b0e46..b5d5fd3463 100644
> --- a/include/sysemu/qtest.h
> +++ b/include/sysemu/qtest.h
> @@ -23,6 +23,7 @@ static inline bool qtest_enabled(void)
> return qtest_allowed;
> }
>
> +#ifndef CONFIG_USER_ONLY
> void qtest_send_prefix(CharBackend *chr);
> void G_GNUC_PRINTF(2, 3) qtest_sendf(CharBackend *chr, const char *fmt, ...);
> void qtest_set_command_cb(bool (*pc_cb)(CharBackend *chr, gchar **words));
> @@ -35,5 +36,6 @@ void qtest_server_set_send_handler(void (*send)(void *, const char *),
> void qtest_server_inproc_recv(void *opaque, const char *buf);
>
> int64_t qtest_get_virtual_clock(void);
> +#endif
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] system/qtest: Minor include cleanups
2023-12-12 11:30 [PATCH 0/2] system/qtest: Minor include cleanups Philippe Mathieu-Daudé
2023-12-12 11:30 ` [PATCH 1/2] system/qtest: Include missing 'hw/core/cpu.h' header Philippe Mathieu-Daudé
2023-12-12 11:30 ` [PATCH 2/2] system/qtest: Restrict QTest API to system emulation Philippe Mathieu-Daudé
@ 2023-12-26 15:40 ` Philippe Mathieu-Daudé
2 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-12-26 15:40 UTC (permalink / raw)
To: qemu-devel; +Cc: Thomas Huth, Laurent Vivier, Paolo Bonzini
On 12/12/23 12:30, Philippe Mathieu-Daudé wrote:
> Add missing header and restrict to sysemu.
>
> Philippe Mathieu-Daudé (2):
> system/qtest: Include missing 'hw/core/cpu.h' header
> system/qtest: Restrict QTest API to system emulation
Thanks Thomas for merging these!
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-12-26 15:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-12 11:30 [PATCH 0/2] system/qtest: Minor include cleanups Philippe Mathieu-Daudé
2023-12-12 11:30 ` [PATCH 1/2] system/qtest: Include missing 'hw/core/cpu.h' header Philippe Mathieu-Daudé
2023-12-12 12:11 ` Thomas Huth
2023-12-12 11:30 ` [PATCH 2/2] system/qtest: Restrict QTest API to system emulation Philippe Mathieu-Daudé
2023-12-12 13:24 ` Thomas Huth
2023-12-26 15:40 ` [PATCH 0/2] system/qtest: Minor include cleanups Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).