'valgrind ls' command throws "Facility 'SCV' unavailable (12), exception at 0x5806aad0, MSR=800000000280f033", on kernel where SCV support is not there. Contact Information = nasastry@in.ibm.com ---uname output--- Linux ltcden14-lp8 4.18.0-359.el8.bz196163.ppc64le #1 SMP Sat Jan 29 01:35:20 EST 2022 ppc64le ppc64le ppc64le GNU/Linux Machine Type = IBM,9080-HEX ---Debugger--- A debugger is not configured ---Steps to Reproduce--- 1. Install valgrind-3.18.1-6.el8.ppc64le if not installed 2. Run 'valgrind ls' command 3. Check the 'dmesg' ... Facility 'SCV' unavailable (12), exception at 0x5806aad0, MSR=800000000280f033 [root@ltcden14-lp8 ~]# LD_SHOW_AUXV=1 /bin/true AT_DCACHEBSIZE: 0x80 AT_ICACHEBSIZE: 0x80 AT_UCACHEBSIZE: 0x0 AT_SYSINFO_EHDR: 0x7fffbacb0000 AT_??? (0x28): 0xc000 AT_??? (0x29): 0x60080 AT_??? (0x2a): 0x8000 AT_??? (0x2b): 0x80080 AT_??? (0x2c): 0x100000 AT_??? (0x2d): 0x80080 AT_??? (0x2e): 0x400000 AT_??? (0x2f): 0x100080 AT_HWCAP: true_le archpmu vsx arch_2_06 dfp ic_snoop smt mmu fpu altivec ppc64 ppc32 AT_PAGESZ: 65536 AT_CLKTCK: 100 AT_PHDR: 0x13bd60040 AT_PHENT: 56 AT_PHNUM: 9 AT_BASE: 0x7fffbacd0000 AT_FLAGS: 0x0 AT_ENTRY: 0x13bd61a7c AT_UID: 0 AT_EUID: 0 AT_GID: 0 AT_EGID: 0 AT_SECURE: 0 AT_RANDOM: 0x7fffdf1bb070 AT_HWCAP2: mma arch_3_1 darn ieee128 arch_3_00 vcrypto tar isel ebb dscr arch_2_07 AT_EXECFN: /bin/true AT_PLATFORM: power10 AT_BASE_PLATFORM:power10 [root@ltcden14-lp8 ~]# grep model /proc/cpuinfo model : IBM,9080-HEX Userspace tool common name: valgrind Userspace rpm: valgrind-3.18.1-6.el8.ppc64le The userspace tool has the following bit modes: 64-bit Userspace tool obtained from project website: na
Created attachment 146924 [details] Powerpc fix checking for scv support add check for scv instruction The attached patch fixes the issue of testing the scv instruction which results in an entry in dmesg. It also adds the missing check for scv support in VEX/priv/guest_ppc_toIR.c, function dis_syslink().
patch committed commit 7f11271403219d21c46e3b831cc1709336e792f1 (HEAD -> master, origin/master, origin/HEAD) Author: Carl Love <carll@us.ibm.com> Date: Fri Feb 11 14:07:20 2022 -0600 Powerpc: Fix checking for scv support, add check to scv instruction parsing. The check for the scv instruction in coregrind/m_machine.c issues an scv instruction and uses sigill to determine if the instruction is supported. Issuing scv on systems that don't support scv, i.e. scv support is not in HWCAPS2, generates a message in dmesg "Facility 'SCV' unavailable (12), exception". This patch removes the sigill based scv instruction test from coregrind/m_machine.c. The scv support is now determined by reading the HWCAPS2 in setup_client_stack(). VG_(machine_ppc64_set_scv_support) is called to set the flag ppc_scv_supported in struct VexArchInfo. The allow_scv flag is added in disInstr_PPC_WRK. The allow_scv flag is used to ensure the host has support for scv before generating the iops for the scv instruction.
Patch committed commit 7f11271403219d21c46e3b831cc1709336e792f1 (HEAD -> master, origin/master, origin/HEAD) Author: Carl Love <carll@us.ibm.com> Date: Fri Feb 11 14:07:20 2022 -0600 Powerpc: Fix checking for scv support, add check to scv instruction parsing. The check for the scv instruction in coregrind/m_machine.c issues an scv instruction and uses sigill to determine if the instruction is supported. Issuing scv on systems that don't support scv, i.e. scv support is not in HWCAPS2, generates a message in dmesg "Facility 'SCV' unavailable (12), exception". This patch removes the sigill based scv instruction test from coregrind/m_machine.c. The scv support is now determined by reading the HWCAPS2 in setup_client_stack(). VG_(machine_ppc64_set_scv_support) is called to set the flag ppc_scv_supported in struct VexArchInfo. The allow_scv flag is added in disInstr_PPC_WRK. The allow_scv flag is used to ensure the host has support for scv before generating the iops for the scv instruction.