* [PATCH] linux-user: Add LoongArch to qemu_get_family()
@ 2022-07-05 6:59 Song Gao
2022-07-05 6:59 ` [PATCH] tcg/tci: Fix enable-debug got an error Song Gao
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Song Gao @ 2022-07-05 6:59 UTC (permalink / raw)
To: qemu-devel; +Cc: richard.henderson, laurent, yangxiaojuan
qemu_get_family() needs to add LoongArch support.
Signed-off-by: Song Gao <gaosong@loongson.cn>
---
scripts/qemu-binfmt-conf.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
index 1f4e2cd19d..6ef9f118d9 100755
--- a/scripts/qemu-binfmt-conf.sh
+++ b/scripts/qemu-binfmt-conf.sh
@@ -171,6 +171,9 @@ qemu_get_family() {
riscv*)
echo "riscv"
;;
+ loongarch*)
+ echo "loongarch"
+ ;;
*)
echo "$cpu"
;;
--
2.31.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] tcg/tci: Fix enable-debug got an error
2022-07-05 6:59 [PATCH] linux-user: Add LoongArch to qemu_get_family() Song Gao
@ 2022-07-05 6:59 ` Song Gao
2022-07-05 8:37 ` Richard Henderson
2022-07-05 8:32 ` [PATCH] linux-user: Add LoongArch to qemu_get_family() Richard Henderson
2022-07-05 11:48 ` Laurent Vivier
2 siblings, 1 reply; 5+ messages in thread
From: Song Gao @ 2022-07-05 6:59 UTC (permalink / raw)
To: qemu-devel; +Cc: richard.henderson, laurent, yangxiaojuan
When building tcg configure with --enable-tcg-interpreter and --enable-debug,
We may got an error:
In file included from ../tcg/tcg.c:432:
/root/code/github/soft-qemu/qemu/tcg/tci/tcg-target.c.inc: In function 'tcg_target_init':
/root/code/github/soft-qemu/qemu/tcg/tci/tcg-target.c.inc:829:9: error: too few arguments to function 'qemu_set_log'
829 | qemu_set_log(strtol(envval, NULL, 0));
| ^~~~~~~~~~~~
In file included from /root/code/github/soft-qemu/qemu/include/exec/log.h:4,
from ../tcg/tcg.c:61:
/root/code/github/soft-qemu/qemu/include/qemu/log.h:84:6: note: declared here
84 | bool qemu_set_log(int log_flags, Error **errp);
| ^~~~~~~~~~~~
Signed-off-by: Song Gao <gaosong@loongson.cn>
---
tcg/tci/tcg-target.c.inc | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc
index 98337c567a..b7c41fe6c3 100644
--- a/tcg/tci/tcg-target.c.inc
+++ b/tcg/tci/tcg-target.c.inc
@@ -824,9 +824,15 @@ static void tcg_out_nop_fill(tcg_insn_unit *p, int count)
static void tcg_target_init(TCGContext *s)
{
#if defined(CONFIG_DEBUG_TCG_INTERPRETER)
+ Error *err = NULL;
const char *envval = getenv("DEBUG_TCG");
if (envval) {
- qemu_set_log(strtol(envval, NULL, 0));
+ if (qemu_set_log(strtol(envval, NULL, 0), &err)) {
+ error_report("DEBUG_TCG got an errr, envval %s", envval);
+ }
+ if (err) {
+ g_error_free(err);
+ }
}
#endif
--
2.31.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] linux-user: Add LoongArch to qemu_get_family()
2022-07-05 6:59 [PATCH] linux-user: Add LoongArch to qemu_get_family() Song Gao
2022-07-05 6:59 ` [PATCH] tcg/tci: Fix enable-debug got an error Song Gao
@ 2022-07-05 8:32 ` Richard Henderson
2022-07-05 11:48 ` Laurent Vivier
2 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2022-07-05 8:32 UTC (permalink / raw)
To: Song Gao, qemu-devel; +Cc: laurent, yangxiaojuan
On 7/5/22 12:29, Song Gao wrote:
> qemu_get_family() needs to add LoongArch support.
>
> Signed-off-by: Song Gao <gaosong@loongson.cn>
> ---
> scripts/qemu-binfmt-conf.sh | 3 +++
> 1 file changed, 3 insertions(+)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Applied.
r~
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tcg/tci: Fix enable-debug got an error
2022-07-05 6:59 ` [PATCH] tcg/tci: Fix enable-debug got an error Song Gao
@ 2022-07-05 8:37 ` Richard Henderson
0 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2022-07-05 8:37 UTC (permalink / raw)
To: Song Gao, qemu-devel; +Cc: laurent, yangxiaojuan
On 7/5/22 12:29, Song Gao wrote:
> When building tcg configure with --enable-tcg-interpreter and --enable-debug,
> We may got an error:
>
> In file included from ../tcg/tcg.c:432:
> /root/code/github/soft-qemu/qemu/tcg/tci/tcg-target.c.inc: In function 'tcg_target_init':
> /root/code/github/soft-qemu/qemu/tcg/tci/tcg-target.c.inc:829:9: error: too few arguments to function 'qemu_set_log'
> 829 | qemu_set_log(strtol(envval, NULL, 0));
> | ^~~~~~~~~~~~
> In file included from /root/code/github/soft-qemu/qemu/include/exec/log.h:4,
> from ../tcg/tcg.c:61:
> /root/code/github/soft-qemu/qemu/include/qemu/log.h:84:6: note: declared here
> 84 | bool qemu_set_log(int log_flags, Error **errp);
> | ^~~~~~~~~~~~
>
> Signed-off-by: Song Gao <gaosong@loongson.cn>
> ---
> tcg/tci/tcg-target.c.inc | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc
> index 98337c567a..b7c41fe6c3 100644
> --- a/tcg/tci/tcg-target.c.inc
> +++ b/tcg/tci/tcg-target.c.inc
> @@ -824,9 +824,15 @@ static void tcg_out_nop_fill(tcg_insn_unit *p, int count)
> static void tcg_target_init(TCGContext *s)
> {
> #if defined(CONFIG_DEBUG_TCG_INTERPRETER)
> + Error *err = NULL;
> const char *envval = getenv("DEBUG_TCG");
> if (envval) {
> - qemu_set_log(strtol(envval, NULL, 0));
> + if (qemu_set_log(strtol(envval, NULL, 0), &err)) {
> + error_report("DEBUG_TCG got an errr, envval %s", envval);
> + }
> + if (err) {
> + g_error_free(err);
> + }
I would rather remove this hack entirely. I have just cc'd you on such a patch.
r~
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] linux-user: Add LoongArch to qemu_get_family()
2022-07-05 6:59 [PATCH] linux-user: Add LoongArch to qemu_get_family() Song Gao
2022-07-05 6:59 ` [PATCH] tcg/tci: Fix enable-debug got an error Song Gao
2022-07-05 8:32 ` [PATCH] linux-user: Add LoongArch to qemu_get_family() Richard Henderson
@ 2022-07-05 11:48 ` Laurent Vivier
2 siblings, 0 replies; 5+ messages in thread
From: Laurent Vivier @ 2022-07-05 11:48 UTC (permalink / raw)
To: Song Gao, qemu-devel; +Cc: richard.henderson, yangxiaojuan
Le 05/07/2022 à 08:59, Song Gao a écrit :
> qemu_get_family() needs to add LoongArch support.
>
> Signed-off-by: Song Gao <gaosong@loongson.cn>
> ---
> scripts/qemu-binfmt-conf.sh | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
> index 1f4e2cd19d..6ef9f118d9 100755
> --- a/scripts/qemu-binfmt-conf.sh
> +++ b/scripts/qemu-binfmt-conf.sh
> @@ -171,6 +171,9 @@ qemu_get_family() {
> riscv*)
> echo "riscv"
> ;;
> + loongarch*)
> + echo "loongarch"
> + ;;
> *)
> echo "$cpu"
> ;;
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-07-05 11:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-05 6:59 [PATCH] linux-user: Add LoongArch to qemu_get_family() Song Gao
2022-07-05 6:59 ` [PATCH] tcg/tci: Fix enable-debug got an error Song Gao
2022-07-05 8:37 ` Richard Henderson
2022-07-05 8:32 ` [PATCH] linux-user: Add LoongArch to qemu_get_family() Richard Henderson
2022-07-05 11:48 ` Laurent Vivier
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.