[PATCH 01/18] target/ppc: limit cpu_interrupt_exittb to system emulation

Paolo Bonzini posted 18 patches 1 week ago
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Cameron Esfahani <dirty@apple.com>, Roman Bolshakov <rbolshakov@ddn.com>, Phil Dennis-Jordan <phil@philjordan.eu>, Mads Ynddal <mads@ynddal.dk>, Riku Voipio <riku.voipio@iki.fi>, Warner Losh <imp@bsdimp.com>, Kyle Evans <kevans@freebsd.org>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Yanan Wang <wangyanan55@huawei.com>, Zhao Liu <zhao1.liu@intel.com>, Nicholas Piggin <npiggin@gmail.com>, Chinmay Rath <rathc@linux.ibm.com>, Harsh Prateek Bora <harshpb@linux.ibm.com>, Laurent Vivier <laurent@vivier.eu>, Brian Cain <brian.cain@oss.qualcomm.com>, "Alex Bennée" <alex.bennee@linaro.org>, Peter Maydell <peter.maydell@linaro.org>, Michael Rolnik <mrolnik@gmail.com>, Marcelo Tosatti <mtosatti@redhat.com>, Reinoud Zandijk <reinoud@netbsd.org>, Sunil Muthuswamy <sunilmut@microsoft.com>, Stafford Horne <shorne@gmail.com>, Yoshinori Sato <yoshinori.sato@nifty.com>, David Hildenbrand <david@redhat.com>, Ilya Leoshkevich <iii@linux.ibm.com>, Thomas Huth <thuth@redhat.com>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Artyom Tarasenko <atar4qemu@gmail.com>
[PATCH 01/18] target/ppc: limit cpu_interrupt_exittb to system emulation
Posted by Paolo Bonzini 1 week ago
It is not used by user-mode emulation and is the only caller of
cpu_interrupt() in qemu-ppc* binaries.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/ppc/helper_regs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/ppc/helper_regs.c b/target/ppc/helper_regs.c
index 7e5726871e5..5f217397490 100644
--- a/target/ppc/helper_regs.c
+++ b/target/ppc/helper_regs.c
@@ -274,6 +274,7 @@ TCGTBCPUState ppc_get_tb_cpu_state(CPUState *cs)
     return (TCGTBCPUState){ .pc = env->nip, .flags = hflags_current };
 }
 
+#ifndef CONFIG_USER_ONLY
 void cpu_interrupt_exittb(CPUState *cs)
 {
     /*
@@ -285,6 +286,7 @@ void cpu_interrupt_exittb(CPUState *cs)
         cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
     }
 }
+#endif
 
 int hreg_store_msr(CPUPPCState *env, target_ulong value, int alter_hv)
 {
-- 
2.51.0
Re: [PATCH 01/18] target/ppc: limit cpu_interrupt_exittb to system emulation
Posted by Igor Mammedov 4 days, 14 hours ago
On Fri, 29 Aug 2025 17:28:52 +0200
Paolo Bonzini <pbonzini@redhat.com> wrote:

> It is not used by user-mode emulation and is the only caller of
> cpu_interrupt() in qemu-ppc* binaries.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-by: Igor Mammedov <imammedo@redhat.com>

> ---
>  target/ppc/helper_regs.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/target/ppc/helper_regs.c b/target/ppc/helper_regs.c
> index 7e5726871e5..5f217397490 100644
> --- a/target/ppc/helper_regs.c
> +++ b/target/ppc/helper_regs.c
> @@ -274,6 +274,7 @@ TCGTBCPUState ppc_get_tb_cpu_state(CPUState *cs)
>      return (TCGTBCPUState){ .pc = env->nip, .flags = hflags_current };
>  }
>  
> +#ifndef CONFIG_USER_ONLY
>  void cpu_interrupt_exittb(CPUState *cs)
>  {
>      /*
> @@ -285,6 +286,7 @@ void cpu_interrupt_exittb(CPUState *cs)
>          cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
>      }
>  }
> +#endif
>  
>  int hreg_store_msr(CPUPPCState *env, target_ulong value, int alter_hv)
>  {
Re: [PATCH 01/18] target/ppc: limit cpu_interrupt_exittb to system emulation
Posted by Richard Henderson 1 week ago
On 8/30/25 01:28, Paolo Bonzini wrote:
> It is not used by user-mode emulation and is the only caller of
> cpu_interrupt() in qemu-ppc* binaries.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   target/ppc/helper_regs.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/target/ppc/helper_regs.c b/target/ppc/helper_regs.c
> index 7e5726871e5..5f217397490 100644
> --- a/target/ppc/helper_regs.c
> +++ b/target/ppc/helper_regs.c
> @@ -274,6 +274,7 @@ TCGTBCPUState ppc_get_tb_cpu_state(CPUState *cs)
>       return (TCGTBCPUState){ .pc = env->nip, .flags = hflags_current };
>   }
>   
> +#ifndef CONFIG_USER_ONLY
>   void cpu_interrupt_exittb(CPUState *cs)
>   {
>       /*
> @@ -285,6 +286,7 @@ void cpu_interrupt_exittb(CPUState *cs)
>           cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
>       }
>   }
> +#endif
>   
>   int hreg_store_msr(CPUPPCState *env, target_ulong value, int alter_hv)
>   {

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~