qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Aditya Gupta <adityag@linux.ibm.com>,
	Nicholas Piggin <npiggin@gmail.com>,
	Harsh Prateek Bora <harshpb@linux.ibm.com>,
	Chinmay Rath <rathc@linux.ibm.com>
Cc: "Cédric Le Goater" <clg@redhat.com>,
	"Michael Tokarev" <mjt@tls.msk.ru>,
	qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
	"Thomas Huth" <thuth@redhat.com>
Subject: Re: [PATCH] fix: Fix build error with CONFIG_POWERNV disabled
Date: Tue, 2 Sep 2025 13:06:48 +0200	[thread overview]
Message-ID: <4cbbede6-0846-4b22-9bce-ec0bc9888e2d@linaro.org> (raw)
In-Reply-To: <aa71d2dc-ebd8-46bf-8693-4e17da3434ef@linaro.org>

On 2/9/25 12:44, Philippe Mathieu-Daudé wrote:
> On 20/8/25 14:25, Aditya Gupta wrote:
>> Currently when CONFIG_POWERNV is not enabled, the build fails, such as
>> with --without-default-devices:
>>
>>      $ ./configure --without-default-devices
>>      $ make
>>
>>      [281/283] Linking target qemu-system-ppc64
>>      FAILED: qemu-system-ppc64
>>      cc -m64 @qemu-system-ppc64.rsp
>>      /usr/bin/ld: libqemu-ppc64-softmmu.a.p/ 
>> target_ppc_misc_helper.c.o: in function `helper_load_sprd':
>>      .../target/ppc/misc_helper.c:335:(.text+0xcdc): undefined 
>> reference to `pnv_chip_find_core'
>>      /usr/bin/ld: libqemu-ppc64-softmmu.a.p/ 
>> target_ppc_misc_helper.c.o: in function `helper_store_sprd':
>>      .../target/ppc/misc_helper.c:375:(.text+0xdf4): undefined 
>> reference to `pnv_chip_find_core'
>>      collect2: error: ld returned 1 exit status
>>      ...
>>
>> This is since target/ppc/misc_helper.c references PowerNV specific
>> 'pnv_chip_find_core' call.
>>
>> Split the PowerNV specific SPRD code out of the generic PowerPC code, by
>> moving the SPRD code to pnv.c
>>
>> Fixes: 9808ce6d5cb ("target/ppc: Big-core scratch register fix")
>> Cc: Philippe Mathieu-Daudé <philmd@linaro.org>
>> Reported-by: Thomas Huth <thuth@redhat.com>
>> Suggested-by: Cédric Le Goater <clg@redhat.com>
>> Signed-off-by: Aditya Gupta <adityag@linux.ibm.com>
>> ---
>> Note that while moving the code, the 'target_ulong' type for sprc has 
>> been
>> modified to 'uint64_t'.
>>
>> Based on the discussion happened on [1].
>> Requires patch 1 and patch 2 of [1] to be applied, to fix the build.
>>
>> [1]: https://lore.kernel.org/qemu-devel/20250526112346.48744-1- 
>> philmd@linaro.org/
>> ---
>> ---
>>   hw/ppc/pnv.c             | 86 ++++++++++++++++++++++++++++++++++++++++
>>   target/ppc/cpu.h         |  4 ++
>>   target/ppc/misc_helper.c | 59 +++------------------------
>>   3 files changed, 96 insertions(+), 53 deletions(-)
> 
> Patch queued via hw-misc, thanks.

Dropping, as it doesn't pass on CI:

../target/ppc/kvm.c: In function ‘kvmppc_load_htab_chunk’:
../target/ppc/kvm.c:2763:32: error: ‘buf’ undeclared (first use in this 
function)
  2763 |     size_t chunksize = sizeof(*buf) + n_valid * HASH_PTE_SIZE_64;
       |                                ^~~
../target/ppc/kvm.c:2763:32: note: each undeclared identifier is 
reported only once for each function it appears in

https://gitlab.com/philmd/qemu/-/jobs/11214983966
https://gitlab.com/philmd/qemu/-/jobs/11214983979


  reply	other threads:[~2025-09-02 11:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-20 12:25 [PATCH] fix: Fix build error with CONFIG_POWERNV disabled Aditya Gupta
2025-08-21 10:53 ` Aditya Gupta
2025-08-21 12:05   ` Thomas Huth
2025-08-21 12:34     ` Aditya Gupta
2025-08-21 14:08 ` Stefan Hajnoczi
2025-09-01  6:59 ` Cédric Le Goater
2025-09-01  8:32   ` Aditya Gupta
2025-09-02 10:44 ` Philippe Mathieu-Daudé
2025-09-02 11:06   ` Philippe Mathieu-Daudé [this message]
2025-09-02 11:16     ` Philippe Mathieu-Daudé

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=4cbbede6-0846-4b22-9bce-ec0bc9888e2d@linaro.org \
    --to=philmd@linaro.org \
    --cc=adityag@linux.ibm.com \
    --cc=clg@redhat.com \
    --cc=harshpb@linux.ibm.com \
    --cc=mjt@tls.msk.ru \
    --cc=npiggin@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=rathc@linux.ibm.com \
    --cc=thuth@redhat.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).