qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 04/13] target/ppc: prepare to split ppc_interrupt_pending


From: Matheus K. Ferst
Subject: Re: [RFC PATCH 04/13] target/ppc: prepare to split ppc_interrupt_pending by excp_model
Date: Wed, 17 Aug 2022 10:42:58 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 15/08/2022 17:25, Fabiano Rosas wrote:
Matheus Ferst <matheus.ferst@eldorado.org.br> writes:

Rename the method to ppc_interrupt_pending_legacy and create a new
ppc_interrupt_pending that will call the appropriate interrupt masking
method based on env->excp_model.

Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
---
  target/ppc/excp_helper.c | 10 +++++++++-
  1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c
index 8690017c70..59981efd16 100644
--- a/target/ppc/excp_helper.c
+++ b/target/ppc/excp_helper.c
@@ -1678,7 +1678,7 @@ void ppc_cpu_do_interrupt(CPUState *cs)
      powerpc_excp(cpu, cs->exception_index);
  }

-static int ppc_pending_interrupt(CPUPPCState *env)
+static int ppc_pending_interrupt_legacy(CPUPPCState *env)

Won't this code continue to be used for the older CPUs? If so, I don't
think the term legacy is appropriate. It ends up being dependent on
context and what people's definitions of "legacy" are.

(if this function is removed in a later patch, then that's ok).


For this RFC, I created methods for CPUs that change the interrupt masking logic when cs->halted is set. If the way we split the interruption code in the following patches is acceptable, I'm planning to add methods for all CPUs and remove ppc_pending_interrupt_legacy in future versions of this patch series.

Thanks,
Matheus K. Ferst
Instituto de Pesquisas ELDORADO <http://www.eldorado.org.br/>
Analista de Software
Aviso Legal - Disclaimer <https://www.eldorado.org.br/disclaimer.html>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]