# git rev-parse -q --verify bbbca72352bb9484bc057c91a408332b35ee8f4c^{commit} bbbca72352bb9484bc057c91a408332b35ee8f4c already have revision, skipping fetch # git checkout -q -f -B kisskb bbbca72352bb9484bc057c91a408332b35ee8f4c # git clean -qxdf # < git log -1 # commit bbbca72352bb9484bc057c91a408332b35ee8f4c # Author: Vaibhav Jain # Date: Tue Jan 25 01:52:04 2022 +0530 # # powerpc/papr_scm: Implement initial support for injecting smart errors # # Presently PAPR doesn't support injecting smart errors on an # NVDIMM. This makes testing the NVDIMM health reporting functionality # difficult as simulating NVDIMM health related events need a hacked up # qemu version. # # To solve this problem this patch proposes simulating certain set of # NVDIMM health related events in papr_scm. Specifically 'fatal' health # state and 'dirty' shutdown state. These error can be injected via the # user-space 'ndctl-inject-smart(1)' command. With the proposed patch and # corresponding ndctl patches following command flow is expected: # # $ sudo ndctl list -DH -d nmem0 # ... # "health_state":"ok", # "shutdown_state":"clean", # ... # # inject unsafe shutdown and fatal health error # $ sudo ndctl inject-smart nmem0 -Uf # ... # "health_state":"fatal", # "shutdown_state":"dirty", # ... # # uninject all errors # $ sudo ndctl inject-smart nmem0 -N # ... # "health_state":"ok", # "shutdown_state":"clean", # ... # # The patch adds a new member 'health_bitmap_inject_mask' inside struct # papr_scm_priv which is then bitwise ANDed to the health bitmap fetched from the # hypervisor. The value for 'health_bitmap_inject_mask' is accessible from sysfs # at nmemX/papr/health_bitmap_inject. # # A new PDSM named 'SMART_INJECT' is proposed that accepts newly # introduced 'struct nd_papr_pdsm_smart_inject' as payload thats # exchanged between libndctl and papr_scm to indicate the requested # smart-error states. # # When the processing the PDSM 'SMART_INJECT', papr_pdsm_smart_inject() # constructs a pair or 'inject_mask' and 'clear_mask' bitmaps from the payload # and bit-blt it to the 'health_bitmap_inject_mask'. This ensures the after being # fetched from the hypervisor, the health_bitmap reflects requested smart-error # states. # # Signed-off-by: Vaibhav Jain # Signed-off-by: Shivaprasad G Bhat # Signed-off-by: Michael Ellerman # Link: https://lore.kernel.org/r/20220124202204.1488346-1-vaibhav@linux.ibm.com # < /opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 bbbca72352bb9484bc057c91a408332b35ee8f4c # < make -s -j 32 ARCH=powerpc O=/kisskb/build/powerpc-next-rand_powerpc-randconfig_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- randconfig # Added to kconfig CONFIG_STANDALONE=y # Added to kconfig CONFIG_BUILD_DOCSRC=n # Added to kconfig CONFIG_MODULE_SIG=n # Added to kconfig CONFIG_CPU_BIG_ENDIAN=y # Added to kconfig CONFIG_PPC64=y # Added to kconfig CONFIG_PPC_DISABLE_WERROR=y # Added to kconfig CONFIG_SECTION_MISMATCH_WARN_ONLY=y # Added to kconfig CONFIG_PREVENT_FIRMWARE_BUILD=y # Added to kconfig CONFIG_CC_STACKPROTECTOR_STRONG=n # Added to kconfig CONFIG_GCC_PLUGINS=n # Added to kconfig CONFIG_LD_HEAD_STUB_CATCH=y # Added to kconfig CONFIG_TRIM_UNUSED_KSYMS=n # Added to kconfig CONFIG_UBSAN=n # < make -s -j 32 ARCH=powerpc O=/kisskb/build/powerpc-next-rand_powerpc-randconfig_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- help # make -s -j 32 ARCH=powerpc O=/kisskb/build/powerpc-next-rand_powerpc-randconfig_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- olddefconfig .config:6107:warning: override: reassigning to symbol PPC64 .config:6108:warning: override: reassigning to symbol PPC_DISABLE_WERROR .config:6110:warning: override: reassigning to symbol PREVENT_FIRMWARE_BUILD .config:6115:warning: override: reassigning to symbol UBSAN # make -s -j 32 ARCH=powerpc O=/kisskb/build/powerpc-next-rand_powerpc-randconfig_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- In file included from /kisskb/src/mm/damon/vaddr.c:761: /kisskb/src/mm/damon/vaddr-test.h: In function 'damon_test_three_regions_in_vmas': /kisskb/src/mm/damon/vaddr-test.h:96:1: warning: the frame size of 1296 bytes is larger than 1024 bytes [-Wframe-larger-than=] 96 | } | ^ /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/dc_fpu.c: In function 'dc_fpu_begin': /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/dc_fpu.c:97:4: error: implicit declaration of function 'enable_kernel_altivec'; did you mean 'enable_kernel_vsx'? [-Werror=implicit-function-declaration] 97 | enable_kernel_altivec(); | ^~~~~~~~~~~~~~~~~~~~~ | enable_kernel_vsx /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/dc_fpu.c: In function 'dc_fpu_end': /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/dc_fpu.c:133:4: error: implicit declaration of function 'disable_kernel_altivec'; did you mean 'disable_kernel_vsx'? [-Werror=implicit-function-declaration] 133 | disable_kernel_altivec(); | ^~~~~~~~~~~~~~~~~~~~~~ | disable_kernel_vsx cc1: some warnings being treated as errors make[5]: *** [/kisskb/src/scripts/Makefile.build:288: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/dc_fpu.o] Error 1 make[5]: *** Waiting for unfinished jobs.... make[4]: *** [/kisskb/src/scripts/Makefile.build:550: drivers/gpu/drm/amd/amdgpu] Error 2 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [/kisskb/src/scripts/Makefile.build:550: drivers/gpu/drm] Error 2 make[2]: *** [/kisskb/src/scripts/Makefile.build:550: drivers/gpu] Error 2 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [/kisskb/src/Makefile:1831: drivers] Error 2 make: *** [Makefile:219: __sub-make] Error 2 Command 'make -s -j 32 ARCH=powerpc O=/kisskb/build/powerpc-next-rand_powerpc-randconfig_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- ' returned non-zero exit status 2 # rm -rf /kisskb/build/powerpc-next-rand_powerpc-randconfig_powerpc-gcc9 # Build took: 0:03:49.055637