Vishal Chourasia and Philippe Mathieu-Daudé
a9c608904f
hw/core/loader: capture Error from load_image_targphys
...
Add Error **errp parameter to load_image_targphys(),
load_image_targphys_as(), and get_image_size() to enable better
error reporting when image loading fails.
Pass NULL for errp in all existing call sites to maintain current
behavior. No functional change intended in this patch.
Suggested-by: Peter Maydell <peter.maydell@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Aditya Gupta <adityag@linux.ibm.com >
Tested-by: Aditya Gupta <adityag@linux.ibm.com >
Signed-off-by: Vishal Chourasia <vishalc@linux.ibm.com >
Message-ID: <20251024130556.1942835-6-vishalc@linux.ibm.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
2025-10-28 08:19:18 +01:00
Cornelia Huck and Thomas Huth
d96519c6bd
hw: add compat machines for 10.2
...
Add 10.2 machine types for arm/i440fx/m68k/q35/s390x/spapr.
Signed-off-by: Cornelia Huck <cohuck@redhat.com >
Reviewed-by: Thomas Huth <thuth@redhat.com >
Acked-by: Michael S. Tsirkin <mst@redhat.com >
Message-ID: <20250805095616.1168905-1-cohuck@redhat.com >
Signed-off-by: Thomas Huth <thuth@redhat.com >
2025-08-27 07:07:53 +02:00
Philippe Mathieu-Daudé
2cd09e47aa
qom: Make InterfaceInfo[] uses const
...
Mechanical change using:
$ sed -i -E 's/\(InterfaceInfo.?\[/\(const InterfaceInfo\[/g' \
$(git grep -lE '\(InterfaceInfo.?\[\]\)')
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Message-Id: <20250424194905.82506-7-philmd@linaro.org >
2025-04-25 17:00:41 +02:00
Philippe Mathieu-Daudé
12d1a768bd
qom: Have class_init() take a const data argument
...
Mechanical change using gsed, then style manually adapted
to pass checkpatch.pl script.
Suggested-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20250424194905.82506-4-philmd@linaro.org >
2025-04-25 17:00:41 +02:00
Stefan Hajnoczi
019fbfa4bc
Merge tag 'pull-misc-2025-04-24' of https://repo.or.cz/qemu/armbru into staging
...
Miscellaneous patches for 2025-04-24
# -----BEGIN PGP SIGNATURE-----
#
# iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmgJ7dYSHGFybWJydUBy
# ZWRoYXQuY29tAAoJEDhwtADrkYZTiZIP/1PFAg/s3SoiLQwH/ZrjyUkm1kiKnjOH
# CC5Stw6I9tuYnDAhASAdSymofLv0NNydNe5ai6ZZAWRyRYjIcfNigKAGK4Di+Uhe
# nYxT0Yk8hNGwMhl6NnBp4mmCUNCwcbjT9uXdiYQxFYO/qqYR1388xJjeN3c362l3
# AaLrE5bX5sqa6TAkTeRPjeIqxlyGT7jnCrN7I1hMhDvbc3ITF3AMfYFMjnmAQgr+
# mTWGS1QogqqkloODbR1DKD1CAWOlpK+0HibhNF+lz71P0HlwVvy+HPXso505Wf0B
# dMwlSrZ1DnqNVF/y5IhMEMslahKajbjbFVhBjmrGl/8T821etCxxgB20c0vyFRy8
# qTyJGwBZaEo0VWr70unSmq45TRoeQvdHAw/e+GtilR0ci80q2ly4gbObnw7L8le+
# gqZo4IWmrwp2sbPepE57sYKQpEndwbRayf/kcFd0LPPpeINu9ZooXkYX0pOo6Cdg
# vDKMaEB1/fmPhjSlknxkKN9LZdR+nDw8162S1CKsUdWanAOjmP8haN19aoHhIekZ
# q+r2qUq/U827yNy9/qbInmsoFYDz9s6sAOE63jibd5rZZ9Anei6NOSgLzA4CqCR1
# +d0+TXp19gP9mLMFs7/ZclwkXCz47OQYhXYphjI3wM9x+xbdRcI4n+DOH5u5coKx
# AsA6+2n0GF4Y
# =GaoH
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 24 Apr 2025 03:52:54 EDT
# gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg: issuer "armbru@redhat.com "
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com >" [full]
# gpg: aka "Markus Armbruster <armbru@pond.sub.org >" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* tag 'pull-misc-2025-04-24' of https://repo.or.cz/qemu/armbru :
cleanup: Drop pointless label at end of function
cleanup: Drop pointless return at end of function
cleanup: Re-run return_directly.cocci
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com >
2025-04-24 13:44:57 -04:00
Markus Armbruster
8a2b516ba2
cleanup: Drop pointless return at end of function
...
A few functions now end with a label. The next commit will clean them
up.
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-ID: <20250407082643.2310002-3-armbru@redhat.com >
[Straightforward conflict with commit 988ad4cceb (hw/loongarch/virt:
Fix cpuslot::cpu set at last in virt_cpu_plug()) resolved]
2025-04-24 09:33:42 +02:00
Pierrick Bouvier and Richard Henderson
9c2ff9cdc9
exec/cpu-all: remove exec/target_page include
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-04-23 15:04:57 -07:00
Pierrick Bouvier and Richard Henderson
22a7c2f239
exec/cpu-all: remove exec/cpu-interrupt include
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-ID: <20250325045915.994760-8-pierrick.bouvier@linaro.org >
2025-04-23 15:04:57 -07:00
Cornelia Huck and Thomas Huth
4a00039c46
hw: add compat machines for 10.1
...
Add 10.1 machine types for arm/i440fx/m68k/q35/s390x/spapr.
Signed-off-by: Cornelia Huck <cohuck@redhat.com >
Reviewed-by: Zhao Liu <zhao1.liu@intel.com >
Reviewed-by: Thomas Huth <thuth@redhat.com >
Acked-by: Michael S. Tsirkin <mst@redhat.com >
Message-ID: <20250414094543.221241-1-cohuck@redhat.com >
Signed-off-by: Thomas Huth <thuth@redhat.com >
2025-04-23 07:51:25 +02:00
Philippe Mathieu-Daudé
adc1a4a26a
hw/loader: Pass ELFDATA endian order argument to load_elf()
...
Rather than passing a boolean 'is_big_endian' argument,
directly pass the ELFDATA, which can be unspecified using
the ELFDATANONE value.
Update the call sites:
0 -> ELFDATA2LSB
1 -> ELFDATA2MSB
TARGET_BIG_ENDIAN -> TARGET_BIG_ENDIAN ? ELFDATA2MSB : ELFDATA2LSB
Suggested-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20250127113824.50177-7-philmd@linaro.org >
2025-01-31 19:36:44 +01:00
Mark Cave-Ayland and Thomas Huth
ee58d282aa
next-cube: add my copyright to the top of the file
...
This series has involved rewriting and/or updating a considerable part of the
next-cube emulation so update the copyright in next-cube.c to reflect this.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Reviewed-by: Thomas Huth <huth@tuxfamily.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Message-ID: <20241222130012.1013374-34-mark.cave-ayland@ilande.co.uk >
Signed-off-by: Thomas Huth <huth@tuxfamily.org >
2024-12-29 07:13:47 +01:00
Mark Cave-Ayland and Thomas Huth
b28c9bd6b2
next-cube: rename old_scr2 and scr2_2 in next_scr2_rtc_update()
...
Rename them to old_scr2_rtc and scr2_rtc to reflect that they contain the previous
and current values of the SCR2 RTC bits.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Reviewed-by: Thomas Huth <huth@tuxfamily.org >
Message-ID: <20241222130012.1013374-33-mark.cave-ayland@ilande.co.uk >
Signed-off-by: Thomas Huth <huth@tuxfamily.org >
2024-12-29 07:13:47 +01:00
Mark Cave-Ayland and Thomas Huth
6963b2c054
next-cube: move next_rtc_cmd_is_write() and next_rtc_data_in_irq() functions
...
Move these functions in next-cube.c so that they are with the rest of the
next-rtc functions.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Reviewed-by: Thomas Huth <huth@tuxfamily.org >
Message-ID: <20241222130012.1013374-32-mark.cave-ayland@ilande.co.uk >
Signed-off-by: Thomas Huth <huth@tuxfamily.org >
2024-12-29 07:13:47 +01:00
Mark Cave-Ayland and Thomas Huth
eb1f03642d
next-cube: add rtc-power-out named gpio to trigger the NEXT_PWR_I interrupt
...
This allows us to decouple the next-pc and next-rtc devices from each
other in next_rtc_data_in_irq().
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-ID: <20241222130012.1013374-31-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Thomas Huth <huth@tuxfamily.org >
2024-12-29 07:13:47 +01:00
Mark Cave-Ayland and Thomas Huth
c1322be69d
next-cube: add rtc-cmd-reset named gpio to reset the rtc state machine
...
This allows us to decouple the next-pc and next-rtc devices from each
other in next_scr2_rtc_update().
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-ID: <20241222130012.1013374-30-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Thomas Huth <huth@tuxfamily.org >
2024-12-29 07:13:47 +01:00
Mark Cave-Ayland and Thomas Huth
44df953368
next-cube: use named gpio output for next-rtc data
...
Add a named gpio output for the next-rtc data and then update
next_rtc_data_in_irq() to drive the IRQ directly. This enables the next-rtc to
next-pc data to be wired up using the standard qdev gpio APIs.
At the same time rename the pc-rtc-data-in gpio to rtc-data-in which is possible
now that the previous rtc-data-in gpio has been moved to the next-rtc device.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-ID: <20241222130012.1013374-29-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Thomas Huth <huth@tuxfamily.org >
2024-12-29 07:13:47 +01:00
Mark Cave-Ayland and Thomas Huth
4387e938f4
next-cube: move rtc-data-in gpio from next-pc to next-rtc device
...
Add a new rtc-data-out gpio to the next-pc device and wire it up to the next-rtc
rtc-data-in gpio using the standard qdev gpio APIs.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Reviewed-by: Thomas Huth <huth@tuxfamily.org >
Message-ID: <20241222130012.1013374-28-mark.cave-ayland@ilande.co.uk >
Signed-off-by: Thomas Huth <huth@tuxfamily.org >
2024-12-29 07:13:47 +01:00
Mark Cave-Ayland and Thomas Huth
96d5c4d524
next-cube: move reset of next-rtc fields from next-pc to next-rtc
...
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Reviewed-by: Thomas Huth <huth@tuxfamily.org >
Message-ID: <20241222130012.1013374-27-mark.cave-ayland@ilande.co.uk >
Signed-off-by: Thomas Huth <huth@tuxfamily.org >
2024-12-29 07:13:47 +01:00
Mark Cave-Ayland and Thomas Huth
49100693e9
next-cube: QOMify NeXTRTC
...
This is to allow the RTC functionality to be maintained within its own separate
device rather than as part of the next-pc device.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-ID: <20241222130012.1013374-26-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Thomas Huth <huth@tuxfamily.org >
2024-12-29 07:13:47 +01:00
Mark Cave-Ayland and Thomas Huth
501b5099f6
next-cube: don't use rtc phase value of -1
...
The rtc phase value of -1 is directly equivalent to using a phase value of 0 so
simplify the logic to use an initial rtc phase of 0.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Reviewed-by: Thomas Huth <huth@tuxfamily.org >
Message-ID: <20241222130012.1013374-25-mark.cave-ayland@ilande.co.uk >
Signed-off-by: Thomas Huth <huth@tuxfamily.org >
2024-12-29 07:13:47 +01:00
Mark Cave-Ayland and Thomas Huth
68f54f7e59
next-cube: use named gpio to read RTC data bit in scr2
...
This is in preparation for moving NeXTRTC to its own separate device.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Reviewed-by: Thomas Huth <huth@tuxfamily.org >
Message-ID: <20241222130012.1013374-24-mark.cave-ayland@ilande.co.uk >
Signed-off-by: Thomas Huth <huth@tuxfamily.org >
2024-12-29 07:13:47 +01:00
Mark Cave-Ayland and Thomas Huth
ccbc8fa3f9
next-cube: use named gpio to set RTC data bit in scr2
...
This is in preparation for moving NeXTRTC to its own separate device.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Reviewed-by: Thomas Huth <huth@tuxfamily.org >
Message-ID: <20241222130012.1013374-23-mark.cave-ayland@ilande.co.uk >
Signed-off-by: Thomas Huth <huth@tuxfamily.org >
2024-12-29 07:13:47 +01:00
Mark Cave-Ayland and Thomas Huth
bbcaced2bf
next-cube: always use retval to return rtc read values
...
Instead of shifting out rtc read values from individual rtc registers, change
the logic so that rtc read commands are executed when the last bit of the rtc
command is received and the result stored in retval. This simplifies the rtc
read logic such that the shift out logic can be consolidated for rtc phases
between 8 and 16.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-ID: <20241222130012.1013374-22-mark.cave-ayland@ilande.co.uk >
Signed-off-by: Thomas Huth <huth@tuxfamily.org >
2024-12-29 07:13:47 +01:00
Mark Cave-Ayland and Thomas Huth
b37da8b95f
next-cube: separate rtc read and write shift logic
...
Introduce a new next_rtc_cmd_is_write() function to determine if an rtc command
is a read or write, and start by using it to avoid shifting the rtc input value
if a rtc read command is executed.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Reviewed-by: Thomas Huth <huth@tuxfamily.org >
Message-ID: <20241222130012.1013374-21-mark.cave-ayland@ilande.co.uk >
Signed-off-by: Thomas Huth <huth@tuxfamily.org >
2024-12-29 07:13:47 +01:00
Mark Cave-Ayland and Thomas Huth
825ac12564
next-cube: use qemu_irq to drive int_status in next_scr2_rtc_update()
...
Rather than directly clear bit 3 in int_status in next_scr2_rtc_update(), use
a qemu_irq to drive the equivalent NEXT_PWR_I signal.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Reviewed-by: Thomas Huth <huth@tuxfamily.org >
Message-ID: <20241222130012.1013374-20-mark.cave-ayland@ilande.co.uk >
Signed-off-by: Thomas Huth <huth@tuxfamily.org >
2024-12-29 07:13:47 +01:00