# git rev-parse -q --verify 7222b01e9353ba0a944a1bf5dd2f669a15e2c3df^{commit} 7222b01e9353ba0a944a1bf5dd2f669a15e2c3df already have revision, skipping fetch # git checkout -q -f -B kisskb 7222b01e9353ba0a944a1bf5dd2f669a15e2c3df # git clean -qxdf # < git log -1 # commit 7222b01e9353ba0a944a1bf5dd2f669a15e2c3df # Author: Michael Ellerman # Date: Fri Sep 24 01:10:31 2021 +1000 # # KVM: PPC: Book3S HV: Use GLOBAL_TOC for kvmppc_h_set_dabr/xdabr() # # kvmppc_h_set_dabr(), and kvmppc_h_set_xdabr() which jumps into # it, need to use _GLOBAL_TOC to setup the kernel TOC pointer, because # kvmppc_h_set_dabr() uses LOAD_REG_ADDR() to load dawr_force_enable. # # When called from hcall_try_real_mode() we have the kernel TOC in r2, # established near the start of kvmppc_interrupt_hv(), so there is no # issue. # # But they can also be called from kvmppc_pseries_do_hcall() which is # module code, so the access ends up happening with the kvm-hv module's # r2, which will not point at dawr_force_enable and could even cause a # fault. # # With the current code layout and compilers we haven't observed a fault # in practice, the load hits somewhere in kvm-hv.ko and silently returns # some bogus value. # # Note that we we expect p8/p9 guests to use the DAWR, but SLOF uses # h_set_dabr() to test if sc1 works correctly, see SLOF's # lib/libhvcall/brokensc1.c. # # Fixes: c1fe190c0672 ("powerpc: Add force enable of DAWR on P9 option") # Signed-off-by: Michael Ellerman # Reviewed-by: Daniel Axtens # Link: https://lore.kernel.org/r/20210923151031.72408-1-mpe@ellerman.id.au # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 7222b01e9353ba0a944a1bf5dd2f669a15e2c3df # < make -s -j 32 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_smp_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- mpc85xx_smp_defconfig # < make -s -j 32 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_smp_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- help # make -s -j 32 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_smp_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- olddefconfig # make -s -j 32 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_smp_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- :1559:2: warning: #warning syscall futex_waitv not implemented [-Wcpp] In file included from /kisskb/src/include/linux/kernel.h:11:0, from /kisskb/src/include/linux/list.h:9, from /kisskb/src/include/linux/module.h:12, from /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:15: /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c: In function 'allocate_bd': /kisskb/src/include/linux/err.h:22:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) ^ /kisskb/src/include/linux/compiler.h:78:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:139:6: note: in expansion of macro 'IS_ERR_VALUE' if (IS_ERR_VALUE(fep->ring_mem_addr)) ^ /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8541cds.dts:341.15-350.5: Warning (pci_device_reg): /pci@e0008000/i8259@19000: PCI unit address format error, expected "12,0" /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8541cds.dts:330.3-21: Warning (pci_device_bus_num): /pci@e0008000/i8259@19000:bus-range: PCI bus number 1 out of range, expected (0 - 0) /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8555cds.dts:341.15-350.5: Warning (pci_device_reg): /pci@e0008000/i8259@19000: PCI unit address format error, expected "12,0" /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8555cds.dts:330.3-21: Warning (pci_device_bus_num): /pci@e0008000/i8259@19000:bus-range: PCI bus number 1 out of range, expected (0 - 0) Completed OK # rm -rf /kisskb/build/powerpc-fixes_mpc85xx_smp_defconfig_powerpc-gcc5 # Build took: 0:01:26.812724