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>,
	Nicholas Piggin <npiggin@gmail.com>,
	Chinmay Rath <rathc@linux.ibm.com>,
	qemu-ppc@nongnu.org
Cc: qemu-devel@nongnu.org, "Cédric Le Goater" <clg@kaod.org>
Subject: Re: [RFC PATCH] target/ppc: Remove the unusable e200 CPUs
Date: Thu, 23 Oct 2025 16:48:49 +0200	[thread overview]
Message-ID: <61c3cd65-5451-412c-8291-3b00d17047d9@redhat.com> (raw)
In-Reply-To: <ff63dc6b-42c7-44f8-b0d0-268d3745a88f@linux.ibm.com>

On 23/10/2025 12.07, Harsh Prateek Bora wrote:
> Hi Thomas,
> I am seeing below CI failure with this patch:
> 
> In file included from ../target/ppc/cpu_init.c:46:
> In function ‘register_BookE206_sprs’,
>      inlined from ‘init_proc_e500’ at ../target/ppc/cpu_init.c:2910:5:
> ../target/ppc/spr_common.h:57:5: error: array subscript 3 is outside array 
> bounds of ‘uint32_t[2]’ {aka ‘unsigned int[2]’} [-Werror=array-bounds=]
>     57 |     _spr_register(env, num, name,              \
>        | 
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     58 |                   USR_ARG(uea_read) USR_ARG(uea_write)              \
>        | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     59 |                   SYS_ARG(oea_read) SYS_ARG(oea_write)              \
>        | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     60 |                   SYS_ARG(hea_read) SYS_ARG(hea_write)              \
>        | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     61 |                   KVM_ARG(one_reg_id) initial_value)
>        |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../target/ppc/spr_common.h:66:5: note: in expansion of macro 
> ‘spr_register_kvm_hv’
>     66 |     spr_register_kvm_hv(env, num, name, uea_read, uea_write, 
> oea_read,       \
>        |     ^~~~~~~~~~~~~~~~~~~
> ../target/ppc/spr_common.h:77:5: note: in expansion of macro ‘spr_register_kvm’
>     77 |     spr_register_kvm(env, num, name, uea_read, uea_write, 
>               \
>        |     ^~~~~~~~~~~~~~~~
> ../target/ppc/cpu_init.c:894:9: note: in expansion of macro ‘spr_register’
>    894 |         spr_register(env, SPR_BOOKE_TLB3CFG, "TLB3CFG",
>        |         ^~~~~~~~~~~~
> ../target/ppc/cpu_init.c: In function ‘init_proc_e500’:
> ../target/ppc/cpu_init.c:2809:14: note: at offset 12 into object ‘tlbncfg’ 
> of size 8
>   2809 |     uint32_t tlbncfg[2];
>        |              ^~~~~~~
> In function ‘register_BookE206_sprs’,
>      inlined from ‘init_proc_e500’ at ../target/ppc/cpu_init.c:2910:5:
> ../target/ppc/spr_common.h:57:5: error: array subscript 2 is outside array 
> bounds of ‘uint32_t[2]’ {aka ‘unsigned int[2]’} [-Werror=array-bounds=]
>     57 |     _spr_register(env, num, name,              \
>        | 
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     58 |                   USR_ARG(uea_read) USR_ARG(uea_write)              \
>        | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     59 |                   SYS_ARG(oea_read) SYS_ARG(oea_write)              \
>        | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     60 |                   SYS_ARG(hea_read) SYS_ARG(hea_write)              \
>        | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     61 |                   KVM_ARG(one_reg_id) initial_value)
>        |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../target/ppc/spr_common.h:66:5: note: in expansion of macro 
> ‘spr_register_kvm_hv’
>     66 |     spr_register_kvm_hv(env, num, name, uea_read, uea_write, 
> oea_read,       \
>        |     ^~~~~~~~~~~~~~~~~~~
> ../target/ppc/spr_common.h:77:5: note: in expansion of macro ‘spr_register_kvm’
>     77 |     spr_register_kvm(env, num, name, uea_read, uea_write, 
>               \
>        |     ^~~~~~~~~~~~~~~~
> ../target/ppc/cpu_init.c:900:9: note: in expansion of macro ‘spr_register’
>    900 |         spr_register(env, SPR_BOOKE_TLB2CFG, "TLB2CFG",
>        |         ^~~~~~~~~~~~
> ../target/ppc/cpu_init.c: In function ‘init_proc_e500’:
> ../target/ppc/cpu_init.c:2809:14: note: at offset 8 into object ‘tlbncfg’ of 
> size 8
>   2809 |     uint32_t tlbncfg[2];
>        |              ^~~~~~~
> cc1: all warnings being treated as errors
> [1374/1838] Compiling C object libqemu-ppc-softmmu.a.p/target_ppc_gdbstub.c.o
> [1375/1838] Compiling C object libqemu-ppc-softmmu.a.p/target_ppc_cpu- 
> models.c.o
> ninja: build stopped: subcommand failed.
> make: *** [Makefile:168: run-ninja] Error 1
> Cleaning up project directory and file based variables
> 00:00
> ERROR: Job failed: exit code 1
> 
> Kindly take a look.

Drat, I think I likely only tested it in a build folder where I had run 
configure with --disable-werror earlier, that's why I didn't notice. Sorry 
for that. I'll try to come up with a fix and send a v2 when it's ready.

  Thomas



      reply	other threads:[~2025-10-23 14:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-17 14:45 [RFC PATCH] target/ppc: Remove the unusable e200 CPUs Thomas Huth
2025-10-17 15:50 ` Harsh Prateek Bora
2025-10-18  6:01   ` Cédric Le Goater
2025-10-18  6:07     ` Harsh Prateek Bora
2025-10-20  4:24       ` Thomas Huth
2025-10-23 10:07 ` Harsh Prateek Bora
2025-10-23 14:48   ` Thomas Huth [this message]

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=61c3cd65-5451-412c-8291-3b00d17047d9@redhat.com \
    --to=thuth@redhat.com \
    --cc=clg@kaod.org \
    --cc=harshpb@linux.ibm.com \
    --cc=npiggin@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=rathc@linux.ibm.com \
    /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).