* [RFC PATCH] target/arm: make arm_casq_ptw CONFIG_TCG only
@ 2023-06-30 11:07 Alex Bennée
2023-06-30 13:26 ` Richard Henderson
0 siblings, 1 reply; 2+ messages in thread
From: Alex Bennée @ 2023-06-30 11:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Alex Bennée, Peter Maydell, open list:ARM TCG CPUs
The ptw code is accessed by non-TCG code (specifically arm_pamax and
arm_cpu_get_phys_page_attrs_debug) but most of it is really only for
TCG emulation. Seeing as we already assert for a non TARGET_AARCH64
build lets extend the test rather than further messing with the ifdef
ladder.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
NB: I need this because I'm about to change the probe action is calls
and probes are very definitely TCG only operations through cputlb.c.
---
target/arm/ptw.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/arm/ptw.c b/target/arm/ptw.c
index 422bf7e3b1..8cac685aa6 100644
--- a/target/arm/ptw.c
+++ b/target/arm/ptw.c
@@ -628,7 +628,7 @@ static uint64_t arm_casq_ptw(CPUARMState *env, uint64_t old_val,
uint64_t new_val, S1Translate *ptw,
ARMMMUFaultInfo *fi)
{
-#ifdef TARGET_AARCH64
+#if defined(TARGET_AARCH64) && defined(CONFIG_TCG)
uint64_t cur_val;
void *host = ptw->out_host;
@@ -708,7 +708,7 @@ static uint64_t arm_casq_ptw(CPUARMState *env, uint64_t old_val,
return cur_val;
#else
- /* AArch32 does not have FEAT_HADFS. */
+ /* AArch32 and non TCG guests do not have FEAT_HADFS. */
g_assert_not_reached();
#endif
}
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC PATCH] target/arm: make arm_casq_ptw CONFIG_TCG only
2023-06-30 11:07 [RFC PATCH] target/arm: make arm_casq_ptw CONFIG_TCG only Alex Bennée
@ 2023-06-30 13:26 ` Richard Henderson
0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2023-06-30 13:26 UTC (permalink / raw)
To: Alex Bennée, qemu-devel; +Cc: Peter Maydell, open list:ARM TCG CPUs
On 6/30/23 13:07, Alex Bennée wrote:
> The ptw code is accessed by non-TCG code (specifically arm_pamax and
> arm_cpu_get_phys_page_attrs_debug) but most of it is really only for
> TCG emulation. Seeing as we already assert for a non TARGET_AARCH64
> build lets extend the test rather than further messing with the ifdef
> ladder.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>
> ---
> NB: I need this because I'm about to change the probe action is calls
> and probes are very definitely TCG only operations through cputlb.c.
> ---
> target/arm/ptw.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/target/arm/ptw.c b/target/arm/ptw.c
> index 422bf7e3b1..8cac685aa6 100644
> --- a/target/arm/ptw.c
> +++ b/target/arm/ptw.c
> @@ -628,7 +628,7 @@ static uint64_t arm_casq_ptw(CPUARMState *env, uint64_t old_val,
> uint64_t new_val, S1Translate *ptw,
> ARMMMUFaultInfo *fi)
> {
> -#ifdef TARGET_AARCH64
> +#if defined(TARGET_AARCH64) && defined(CONFIG_TCG)
> uint64_t cur_val;
> void *host = ptw->out_host;
>
> @@ -708,7 +708,7 @@ static uint64_t arm_casq_ptw(CPUARMState *env, uint64_t old_val,
>
> return cur_val;
> #else
> - /* AArch32 does not have FEAT_HADFS. */
> + /* AArch32 and non TCG guests do not have FEAT_HADFS. */
Better as
AArch32 does not have FEAT_HADFS; non-TCG guests only use debug-mode.
Otherwise,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-06-30 13:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-30 11:07 [RFC PATCH] target/arm: make arm_casq_ptw CONFIG_TCG only Alex Bennée
2023-06-30 13:26 ` Richard Henderson
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).