On 7/14/26 03:53, Vishal Chourasia wrote:
From: Vishal Chourasia <[email protected]> Moving the following instructions to decodetree specification: sc, scv : SC-form rfi, rfid, rfscv, hrfid : XL-form This builds upon the previous work that moved mfmsr and mtmsr[d] instructions to decodetree. The changes were verified by validating that the tcg ops generated by those instructions remain the same, which were captured with the `-d in_asm,op` flag, and also by booting a pseries qemu guest. This also includes improvements from review feedback: - Rename helpers to uppercase (RFI/RFID/RFSCV/HRFID) to match ISA mnemonics - Add TRANS_FLAGS_NOT() and TRANS64_FLAGS() macro variants - Add REQUIRE_INSNS_FLAGS_NOT() check for flag exclusion - Specify lev field as uint8_t in SC instruction format - Remove redundant masking in SCV since lev is already 7-bit - Replace TARGET_PPC64 ifdefs with REQUIRE_64BIT() macro - Gate SC, SCV, RFI, RFID, RFSCV, and HRFID with appropriate flags - Replace runtime is_book3s_arch2x() check in RFI with TRANS_FLAGS_NOT(SEGMENT_64B) - Consolidate CONFIG_USER_ONLY guards into single block Signed-off-by: Vishal Chourasia <[email protected]> --- v3: Addressed missing flag checks for RFI and HRFID instructions pointed out by Chinmay.
Thanks for taking care of this !
v2: In v1, do_rfi() path effectively only implemented the instruction for user-only and 64-bit builds, so on qemu-system-ppc every rfi was translated as invalid. This trapped OpenBIOS in exception return paths and caused the boot/tests to hang. In v2 restore the 32-bit system emulation rfi path while keeping rfid, hrfid, and rfscv 64-bit-only. target/ppc/helper.h | 8 +- target/ppc/insn32.decode | 11 +++ target/ppc/tcg-excp_helper.c | 8 +- target/ppc/translate.c | 126 ++------------------------- target/ppc/translate/misc-impl.c.inc | 100 +++++++++++++++++++++ 5 files changed, 126 insertions(+), 127 deletions(-)
