On 10/22/23 05:44, Mark Cave-Ayland wrote:
On 22/10/2023 06:59, Richard Henderson wrote:
Changes for v4:
* Implement htstate for RDHPR, WRHPR.
This was the issue with sun4v rom, "wrhpr %g0, %htstate".
Previously we "implemented" this with nop. But since we
have env->htstate[], add the obvious implementation.
Ah I see. So presumably the patch that implements this could also have a Fixes:
https://gitlab.com/qemu-project/qemu/-/issues/847 tag?
Yes indeed. I'd forgotten about that one.
* The fp asi reorg got lost with "sizes", one of which was for
the size of the access, and the other was a proxy for the
original instruction. This broke "stda reg, [addr] #ASI_FL8_P",
used in Mark's netbsd image.
I found a build failure when building this series with --target-list='sparc-softmmu
sparc64-softmmu':
cc -m64 -mcx16 -Ilibqemu-sparc-softmmu.fa.p -I. -I.. -Itarget/sparc -I../target/sparc
-Iqapi -Itrace -Iui -Iui/shader -I/usr/include/pixman-1 -I/usr/include/spice-server
-I/usr/include/spice-1 -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -fdiagnostics-color=auto -Wall -Winvalid-pch
-Werror -std=gnu11 -O2 -g -fstack-protector-strong -Wundef -Wwrite-strings
-Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wold-style-declaration
-Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self
-Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined
-Wimplicit-fallthrough=2 -Wmissing-format-attribute -Wno-missing-include-dirs
-Wno-shift-negative-value -Wno-psabi -isystem /home/build/src/qemu/git/qemu/linux-headers
-isystem linux-headers -iquote . -iquote /home/build/src/qemu/git/qemu -iquote
/home/build/src/qemu/git/qemu/include -iquote
/home/build/src/qemu/git/qemu/host/include/x86_64 -iquote
/home/build/src/qemu/git/qemu/host/include/generic -iquote
/home/build/src/qemu/git/qemu/tcg/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -fno-strict-aliasing -fno-common -fwrapv -fPIE
-isystem../linux-headers -isystemlinux-headers -DNEED_CPU_H
'-DCONFIG_TARGET="sparc-softmmu-config-target.h"'
'-DCONFIG_DEVICES="sparc-softmmu-config-devices.h"' -MD -MQ
libqemu-sparc-softmmu.fa.p/target_sparc_translate.c.o -MF
libqemu-sparc-softmmu.fa.p/target_sparc_translate.c.o.d -o
libqemu-sparc-softmmu.fa.p/target_sparc_translate.c.o -c ../target/sparc/translate.c
In file included from ../target/sparc/translate.c:21:
../target/sparc/translate.c: In function ‘do_wrhtstate’:
/home/build/src/qemu/git/qemu/include/qemu/osdep.h:261:35: error: call to
‘qemu_build_not_reached_always’ declared with attribute error: code path is reachable
261 | #define qemu_build_not_reached() qemu_build_not_reached_always()
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../target/sparc/translate.c:3800:5: note: in expansion of macro
‘qemu_build_not_reached’
3800 | qemu_build_not_reached();
| ^~~~~~~~~~~~~~~~~~~~~~
[10/23] cc -m64 -mcx16 -Iqemu-io.p
Ho hum, I think I only tested this change with --enable-debug.
I'll improve the avail_HYPV() test so the compiler can tell this is a 64-bit
thing.
Otherwise this version passes all my boot tests so:
Tested-by: Mark Cave-Ayland <mark.cave-ayl...@ilande.co.uk>
Acked-by: Mark Cave-Ayland <mark.cave-ayl...@ilande.co.uk>
Feel free to take this via tcg-next if it's easier for you, and thanks once again for such
a great piece of work :)
Thank you for the testing. I can certainly send the PR.
r~