qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Harsh Prateek Bora <harshpb@linux.ibm.com>,
	Glenn Miles <milesg@linux.ibm.com>,
	qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, clg@redhat.com, npiggin@gmail.com,
	rathc@linux.ibm.com, richard.henderson@linaro.org,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Pierrick Bouvier" <pierrick.bouvier@linaro.org>
Subject: Re: [PATCH 1/4] target/ppc: Add IBM PPE42 family of processors
Date: Mon, 25 Aug 2025 13:58:42 +0200	[thread overview]
Message-ID: <dc6dc7db-f4c3-4641-9707-383737e2b678@redhat.com> (raw)
In-Reply-To: <fd855a38-976f-430e-9db1-1bdce1cf869d@linux.ibm.com>

On 25/08/2025 13.46, Harsh Prateek Bora wrote:
> Hi Thomas,
> 
> On 8/25/25 17:04, Thomas Huth wrote:
>> On 25/08/2025 13.24, Harsh Prateek Bora wrote:
>>> Hi Glenn,
>>>
>>> This seems significant work. Thanks for upstreaming.
>>>
>>> On 8/20/25 02:58, Glenn Miles wrote:
>>>> Adds the IBM PPE42 family of processors supporting the
>>>
>>> family of 32-bit processors ?
>>>
>>>> PPE42, PPE42X and PPE42XM processor versions.  These
>>>> processors are used as embedded processors in the IBM
>>>> Power9, Power10 and Power12 processors for various
>>>> tasks.  It is basically a stripped down version of the
>>>> IBM PowerPC 405 processor, with some added instructions
>>>> for handling 64-bit loads and stores.
>>>>
>>>> For more information on the PPE 42 processor please visit:
>>>>
>>>> https://wiki.raptorcs.com/w/images/a/a3/PPE_42X_Core_Users_Manual.pdf
>>>>
>>>> Supports PPE42 SPR's (Including the MSR) and  Exceptions.
>>>>
>>>> Does not yet support new PPE42 instructions and does not
>>>> prevent access to some invalid instructions and registers
>>>> (currently allows for access to invalid GPR's and CR fields).
>>>>
>>>> Signed-off-by: Glenn Miles <milesg@linux.ibm.com>
>>>> ---
>>>>   target/ppc/cpu-models.c      |   7 +
>>>>   target/ppc/cpu-models.h      |   4 +
>>>>   target/ppc/cpu.h             |  66 +++++++-
>>>>   target/ppc/cpu_init.c        | 286 ++++++++++++++++++++++++++++++-----
>>>>   target/ppc/excp_helper.c     | 171 +++++++++++++++++++++
>>>>   target/ppc/helper_regs.c     |  28 +++-
>>>>   target/ppc/tcg-excp_helper.c |  12 ++
>>>>   target/ppc/translate.c       |   6 +-
>>>>   8 files changed, 535 insertions(+), 45 deletions(-)
>>>>
>>>> diff --git a/target/ppc/cpu-models.c b/target/ppc/cpu-models.c
>>>> index ea86ea202a..09f73e23a8 100644
>>>> --- a/target/ppc/cpu-models.c
>>>> +++ b/target/ppc/cpu-models.c
>>>> @@ -116,6 +116,13 @@
>>>>                   NULL)
>>>>       POWERPC_DEF("x2vp20", CPU_POWERPC_X2VP20,                 405,
>>>>                   NULL)
>>>> +    /* PPE42 Embedded 
>>>> Controllers                                            */
>>>> +    POWERPC_DEF("PPE42",         CPU_POWERPC_PPE42, ppe42,
>>>> +                "Generic PPE 42")
>>>> +    POWERPC_DEF("PPE42X",        CPU_POWERPC_PPE42X, ppe42x,
>>>> +                "Generic PPE 42X")
>>>> +    POWERPC_DEF("PPE42XM",       CPU_POWERPC_PPE42XM, ppe42xm,
>>>> +                "Generic PPE 42XM")
>>>
>>> Can all the PPE42 specific code be conditionally compiled only for
>>> !TARGET_PPC64 (and !CONFIG_USER_ONLY wherever possible)?
>>> Not only to reduce the bloating size of respective binaries, but also to
>>> avoid some code being added to hot path routines like 
>>> hreg_compute_hflags_value().
>>
>> qemu-system-ppc64 is a superset of qemu-system-ppc, and there are even 
>> efforts to unify all system functionality into a singly binary, so 
>> excluding a 32-bit feature from qemu-system-ppc64 sounds like a step into 
>> the wrong direction to me right now...?
> 
> We do have existing code getting conditionally compiled for TARGET_PPC64
> which I guess gets enabled with:
>   --configure target-list=<ppc64|ppc>-softmmu
> I understand the efforts are towards having a single binary to support
> both, but what gets built-in is still decided with configure choice?
> 
> Please correct/clarify with above understanding.

As I said, qemu-system-ppc64 is currently a full superset of 
qemu-system-ppc. The ppc64 binary contains all the 32-bit code, you can 
perfectly run a "g3beige" or "bamboo" machine with qemu-system-ppc64, too. 
By disabling the ppe42 code in the ppc64 binary, this would now introduce an 
execption to that unwritten rule, so I'd expect that we'd not rather want to 
do this now.

  Thomas



  reply	other threads:[~2025-08-25 12:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-19 21:28 [PATCH 0/4] Add IBM PPE42 CPU support Glenn Miles
2025-08-19 21:28 ` [PATCH 1/4] target/ppc: Add IBM PPE42 family of processors Glenn Miles
2025-08-25 11:24   ` Harsh Prateek Bora
2025-08-25 11:34     ` Thomas Huth
2025-08-25 11:46       ` Harsh Prateek Bora
2025-08-25 11:58         ` Thomas Huth [this message]
2025-08-25 12:08           ` Harsh Prateek Bora
2025-08-25 12:22             ` Thomas Huth
2025-08-25 12:36               ` Harsh Prateek Bora
2025-08-25 14:33                 ` BALATON Zoltan
2025-08-26  4:54                   ` Harsh Prateek Bora
2025-08-26 12:12                     ` BALATON Zoltan
2025-08-28 14:48                       ` Pierrick Bouvier
2025-08-25 16:56     ` Miles Glenn
2025-08-26  5:30       ` Harsh Prateek Bora
2025-08-19 21:28 ` [PATCH 2/4] target/ppc: Add IBM PPE42 special instructions Glenn Miles
2025-08-19 21:28 ` [PATCH 3/4] hw/ppc: Add a test machine for the IBM PPE42 CPU Glenn Miles
2025-08-19 21:28 ` [PATCH 4/4] tests/functional: Add test for IBM PPE42 instructions Glenn Miles
2025-08-25  9:10   ` Thomas Huth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dc6dc7db-f4c3-4641-9707-383737e2b678@redhat.com \
    --to=thuth@redhat.com \
    --cc=clg@redhat.com \
    --cc=harshpb@linux.ibm.com \
    --cc=milesg@linux.ibm.com \
    --cc=npiggin@gmail.com \
    --cc=philmd@linaro.org \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=rathc@linux.ibm.com \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).