* [PATCH 1/2] target/ppc: Fix icount access for some hypervisor instructions
@ 2023-06-25 10:36 Nicholas Piggin
2023-06-25 10:37 ` [PATCH 2/2] tests/avocado: record_replay test for ppc powernv machine Nicholas Piggin
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Nicholas Piggin @ 2023-06-25 10:36 UTC (permalink / raw)
To: qemu-devel
Cc: Nicholas Piggin, qemu-ppc, Daniel Henrique Barboza,
Cédric Le Goater, Harsh Prateek Bora
Several instructions and register access require icount reads and are
missing translator_io_start().
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
target/ppc/translate.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index eb278c2683..c1c3cd8767 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -1177,6 +1177,7 @@ void spr_write_hmer(DisasContext *ctx, int sprn, int gprn)
void spr_write_lpcr(DisasContext *ctx, int sprn, int gprn)
{
+ translator_io_start(&ctx->base);
gen_helper_store_lpcr(cpu_env, cpu_gpr[gprn]);
}
#endif /* !defined(CONFIG_USER_ONLY) */
@@ -4002,6 +4003,7 @@ static void gen_doze(DisasContext *ctx)
TCGv_i32 t;
CHK_HV(ctx);
+ translator_io_start(&ctx->base);
t = tcg_constant_i32(PPC_PM_DOZE);
gen_helper_pminsn(cpu_env, t);
/* Stop translation, as the CPU is supposed to sleep from now */
@@ -4017,6 +4019,7 @@ static void gen_nap(DisasContext *ctx)
TCGv_i32 t;
CHK_HV(ctx);
+ translator_io_start(&ctx->base);
t = tcg_constant_i32(PPC_PM_NAP);
gen_helper_pminsn(cpu_env, t);
/* Stop translation, as the CPU is supposed to sleep from now */
@@ -4032,6 +4035,7 @@ static void gen_stop(DisasContext *ctx)
TCGv_i32 t;
CHK_HV(ctx);
+ translator_io_start(&ctx->base);
t = tcg_constant_i32(PPC_PM_STOP);
gen_helper_pminsn(cpu_env, t);
/* Stop translation, as the CPU is supposed to sleep from now */
@@ -4047,6 +4051,7 @@ static void gen_sleep(DisasContext *ctx)
TCGv_i32 t;
CHK_HV(ctx);
+ translator_io_start(&ctx->base);
t = tcg_constant_i32(PPC_PM_SLEEP);
gen_helper_pminsn(cpu_env, t);
/* Stop translation, as the CPU is supposed to sleep from now */
@@ -4062,6 +4067,7 @@ static void gen_rvwinkle(DisasContext *ctx)
TCGv_i32 t;
CHK_HV(ctx);
+ translator_io_start(&ctx->base);
t = tcg_constant_i32(PPC_PM_RVWINKLE);
gen_helper_pminsn(cpu_env, t);
/* Stop translation, as the CPU is supposed to sleep from now */
@@ -4458,6 +4464,7 @@ static void gen_hrfid(DisasContext *ctx)
#else
/* Restore CPU state */
CHK_HV(ctx);
+ translator_io_start(&ctx->base);
gen_helper_hrfid(cpu_env);
ctx->base.is_jmp = DISAS_EXIT;
#endif
--
2.40.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] tests/avocado: record_replay test for ppc powernv machine
2023-06-25 10:36 [PATCH 1/2] target/ppc: Fix icount access for some hypervisor instructions Nicholas Piggin
@ 2023-06-25 10:37 ` Nicholas Piggin
2023-06-26 11:41 ` Cédric Le Goater
2023-06-30 19:39 ` Daniel Henrique Barboza
2023-06-26 10:14 ` [PATCH 1/2] target/ppc: Fix icount access for some hypervisor instructions Richard Henderson
2023-06-30 19:39 ` Daniel Henrique Barboza
2 siblings, 2 replies; 6+ messages in thread
From: Nicholas Piggin @ 2023-06-25 10:37 UTC (permalink / raw)
To: qemu-devel
Cc: Nicholas Piggin, qemu-ppc, Daniel Henrique Barboza,
Cédric Le Goater, Harsh Prateek Bora
The powernv machine can boot Linux to VFS mount with icount enabled.
Add a test case for it.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
tests/avocado/replay_kernel.py | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/tests/avocado/replay_kernel.py b/tests/avocado/replay_kernel.py
index a4dc8c0d6c..dc350fd781 100644
--- a/tests/avocado/replay_kernel.py
+++ b/tests/avocado/replay_kernel.py
@@ -258,6 +258,22 @@ def test_ppc64_pseries(self):
console_pattern = 'VFS: Cannot open root device'
self.run_rr(kernel_path, kernel_command_line, console_pattern)
+ def test_ppc64_powernv(self):
+ """
+ :avocado: tags=arch:ppc64
+ :avocado: tags=machine:powernv
+ :avocado: tags=accel:tcg
+ """
+ kernel_url = ('https://archives.fedoraproject.org/pub/archive'
+ '/fedora-secondary/releases/29/Everything/ppc64le/os'
+ '/ppc/ppc64/vmlinuz')
+ kernel_hash = '3fe04abfc852b66653b8c3c897a59a689270bc77'
+ kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
+
+ kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=tty0 console=hvc0'
+ console_pattern = 'VFS: Cannot open root device'
+ self.run_rr(kernel_path, kernel_command_line, console_pattern)
+
def test_m68k_q800(self):
"""
:avocado: tags=arch:m68k
--
2.40.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] tests/avocado: record_replay test for ppc powernv machine
2023-06-25 10:37 ` [PATCH 2/2] tests/avocado: record_replay test for ppc powernv machine Nicholas Piggin
@ 2023-06-26 11:41 ` Cédric Le Goater
2023-06-30 19:39 ` Daniel Henrique Barboza
1 sibling, 0 replies; 6+ messages in thread
From: Cédric Le Goater @ 2023-06-26 11:41 UTC (permalink / raw)
To: Nicholas Piggin, qemu-devel
Cc: qemu-ppc, Daniel Henrique Barboza, Harsh Prateek Bora
On 6/25/23 12:37, Nicholas Piggin wrote:
> The powernv machine can boot Linux to VFS mount with icount enabled.
> Add a test case for it.
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Thanks,
C.
> ---
> tests/avocado/replay_kernel.py | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/tests/avocado/replay_kernel.py b/tests/avocado/replay_kernel.py
> index a4dc8c0d6c..dc350fd781 100644
> --- a/tests/avocado/replay_kernel.py
> +++ b/tests/avocado/replay_kernel.py
> @@ -258,6 +258,22 @@ def test_ppc64_pseries(self):
> console_pattern = 'VFS: Cannot open root device'
> self.run_rr(kernel_path, kernel_command_line, console_pattern)
>
> + def test_ppc64_powernv(self):
> + """
> + :avocado: tags=arch:ppc64
> + :avocado: tags=machine:powernv
> + :avocado: tags=accel:tcg
> + """
> + kernel_url = ('https://archives.fedoraproject.org/pub/archive'
> + '/fedora-secondary/releases/29/Everything/ppc64le/os'
> + '/ppc/ppc64/vmlinuz')
> + kernel_hash = '3fe04abfc852b66653b8c3c897a59a689270bc77'
> + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
> +
> + kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=tty0 console=hvc0'
> + console_pattern = 'VFS: Cannot open root device'
> + self.run_rr(kernel_path, kernel_command_line, console_pattern)
> +
> def test_m68k_q800(self):
> """
> :avocado: tags=arch:m68k
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] tests/avocado: record_replay test for ppc powernv machine
2023-06-25 10:37 ` [PATCH 2/2] tests/avocado: record_replay test for ppc powernv machine Nicholas Piggin
2023-06-26 11:41 ` Cédric Le Goater
@ 2023-06-30 19:39 ` Daniel Henrique Barboza
1 sibling, 0 replies; 6+ messages in thread
From: Daniel Henrique Barboza @ 2023-06-30 19:39 UTC (permalink / raw)
To: Nicholas Piggin, qemu-devel
Cc: qemu-ppc, Cédric Le Goater, Harsh Prateek Bora
On 6/25/23 07:37, Nicholas Piggin wrote:
> The powernv machine can boot Linux to VFS mount with icount enabled.
> Add a test case for it.
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks,
Daniel
> tests/avocado/replay_kernel.py | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/tests/avocado/replay_kernel.py b/tests/avocado/replay_kernel.py
> index a4dc8c0d6c..dc350fd781 100644
> --- a/tests/avocado/replay_kernel.py
> +++ b/tests/avocado/replay_kernel.py
> @@ -258,6 +258,22 @@ def test_ppc64_pseries(self):
> console_pattern = 'VFS: Cannot open root device'
> self.run_rr(kernel_path, kernel_command_line, console_pattern)
>
> + def test_ppc64_powernv(self):
> + """
> + :avocado: tags=arch:ppc64
> + :avocado: tags=machine:powernv
> + :avocado: tags=accel:tcg
> + """
> + kernel_url = ('https://archives.fedoraproject.org/pub/archive'
> + '/fedora-secondary/releases/29/Everything/ppc64le/os'
> + '/ppc/ppc64/vmlinuz')
> + kernel_hash = '3fe04abfc852b66653b8c3c897a59a689270bc77'
> + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
> +
> + kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=tty0 console=hvc0'
> + console_pattern = 'VFS: Cannot open root device'
> + self.run_rr(kernel_path, kernel_command_line, console_pattern)
> +
> def test_m68k_q800(self):
> """
> :avocado: tags=arch:m68k
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] target/ppc: Fix icount access for some hypervisor instructions
2023-06-25 10:36 [PATCH 1/2] target/ppc: Fix icount access for some hypervisor instructions Nicholas Piggin
2023-06-25 10:37 ` [PATCH 2/2] tests/avocado: record_replay test for ppc powernv machine Nicholas Piggin
@ 2023-06-26 10:14 ` Richard Henderson
2023-06-30 19:39 ` Daniel Henrique Barboza
2 siblings, 0 replies; 6+ messages in thread
From: Richard Henderson @ 2023-06-26 10:14 UTC (permalink / raw)
To: Nicholas Piggin, qemu-devel
Cc: qemu-ppc, Daniel Henrique Barboza, Cédric Le Goater,
Harsh Prateek Bora
On 6/25/23 12:36, Nicholas Piggin wrote:
> Several instructions and register access require icount reads and are
> missing translator_io_start().
>
> Signed-off-by: Nicholas Piggin<npiggin@gmail.com>
> ---
> target/ppc/translate.c | 7 +++++++
> 1 file changed, 7 insertions(+)
Acked-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] target/ppc: Fix icount access for some hypervisor instructions
2023-06-25 10:36 [PATCH 1/2] target/ppc: Fix icount access for some hypervisor instructions Nicholas Piggin
2023-06-25 10:37 ` [PATCH 2/2] tests/avocado: record_replay test for ppc powernv machine Nicholas Piggin
2023-06-26 10:14 ` [PATCH 1/2] target/ppc: Fix icount access for some hypervisor instructions Richard Henderson
@ 2023-06-30 19:39 ` Daniel Henrique Barboza
2 siblings, 0 replies; 6+ messages in thread
From: Daniel Henrique Barboza @ 2023-06-30 19:39 UTC (permalink / raw)
To: Nicholas Piggin, qemu-devel
Cc: qemu-ppc, Cédric Le Goater, Harsh Prateek Bora
On 6/25/23 07:36, Nicholas Piggin wrote:
> Several instructions and register access require icount reads and are
> missing translator_io_start().
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks,
Daniel
> target/ppc/translate.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/target/ppc/translate.c b/target/ppc/translate.c
> index eb278c2683..c1c3cd8767 100644
> --- a/target/ppc/translate.c
> +++ b/target/ppc/translate.c
> @@ -1177,6 +1177,7 @@ void spr_write_hmer(DisasContext *ctx, int sprn, int gprn)
>
> void spr_write_lpcr(DisasContext *ctx, int sprn, int gprn)
> {
> + translator_io_start(&ctx->base);
> gen_helper_store_lpcr(cpu_env, cpu_gpr[gprn]);
> }
> #endif /* !defined(CONFIG_USER_ONLY) */
> @@ -4002,6 +4003,7 @@ static void gen_doze(DisasContext *ctx)
> TCGv_i32 t;
>
> CHK_HV(ctx);
> + translator_io_start(&ctx->base);
> t = tcg_constant_i32(PPC_PM_DOZE);
> gen_helper_pminsn(cpu_env, t);
> /* Stop translation, as the CPU is supposed to sleep from now */
> @@ -4017,6 +4019,7 @@ static void gen_nap(DisasContext *ctx)
> TCGv_i32 t;
>
> CHK_HV(ctx);
> + translator_io_start(&ctx->base);
> t = tcg_constant_i32(PPC_PM_NAP);
> gen_helper_pminsn(cpu_env, t);
> /* Stop translation, as the CPU is supposed to sleep from now */
> @@ -4032,6 +4035,7 @@ static void gen_stop(DisasContext *ctx)
> TCGv_i32 t;
>
> CHK_HV(ctx);
> + translator_io_start(&ctx->base);
> t = tcg_constant_i32(PPC_PM_STOP);
> gen_helper_pminsn(cpu_env, t);
> /* Stop translation, as the CPU is supposed to sleep from now */
> @@ -4047,6 +4051,7 @@ static void gen_sleep(DisasContext *ctx)
> TCGv_i32 t;
>
> CHK_HV(ctx);
> + translator_io_start(&ctx->base);
> t = tcg_constant_i32(PPC_PM_SLEEP);
> gen_helper_pminsn(cpu_env, t);
> /* Stop translation, as the CPU is supposed to sleep from now */
> @@ -4062,6 +4067,7 @@ static void gen_rvwinkle(DisasContext *ctx)
> TCGv_i32 t;
>
> CHK_HV(ctx);
> + translator_io_start(&ctx->base);
> t = tcg_constant_i32(PPC_PM_RVWINKLE);
> gen_helper_pminsn(cpu_env, t);
> /* Stop translation, as the CPU is supposed to sleep from now */
> @@ -4458,6 +4464,7 @@ static void gen_hrfid(DisasContext *ctx)
> #else
> /* Restore CPU state */
> CHK_HV(ctx);
> + translator_io_start(&ctx->base);
> gen_helper_hrfid(cpu_env);
> ctx->base.is_jmp = DISAS_EXIT;
> #endif
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-06-30 19:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-25 10:36 [PATCH 1/2] target/ppc: Fix icount access for some hypervisor instructions Nicholas Piggin
2023-06-25 10:37 ` [PATCH 2/2] tests/avocado: record_replay test for ppc powernv machine Nicholas Piggin
2023-06-26 11:41 ` Cédric Le Goater
2023-06-30 19:39 ` Daniel Henrique Barboza
2023-06-26 10:14 ` [PATCH 1/2] target/ppc: Fix icount access for some hypervisor instructions Richard Henderson
2023-06-30 19:39 ` Daniel Henrique Barboza
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).