tree:
https://git.kernel.org/pub/scm/linux/kernel/git/kas/linux.git kvm-unmapped-poison
head: e792cd01c639cc658a27badfd07157668a7a5d53
commit: e792cd01c639cc658a27badfd07157668a7a5d53 [7/7] KVM: unmap guest memory with
poison
config: s390-randconfig-r022-20210323 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
78a65cd945d006ff02f9d24d9cc20a302ed93b08)
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
#
https://git.kernel.org/pub/scm/linux/kernel/git/kas/linux.git/commit/?id=...
git remote add kas
https://git.kernel.org/pub/scm/linux/kernel/git/kas/linux.git
git fetch --no-tags kas kvm-unmapped-poison
git checkout e792cd01c639cc658a27badfd07157668a7a5d53
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/s390/include/asm/kvm_para.h:25:
In file included from arch/s390/include/asm/diag.h:12:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro
'__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro
'___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from arch/s390/kvm/../../../virt/kvm/kvm_main.c:18:
In file included from include/linux/kvm_host.h:32:
In file included from include/linux/kvm_para.h:5:
In file included from include/uapi/linux/kvm_para.h:39:
In file included from arch/s390/include/asm/kvm_para.h:25:
In file included from arch/s390/include/asm/diag.h:12:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro
'__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro
'___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from arch/s390/kvm/../../../virt/kvm/kvm_main.c:18:
In file included from include/linux/kvm_host.h:32:
In file included from include/linux/kvm_para.h:5:
In file included from include/uapi/linux/kvm_para.h:39:
In file included from arch/s390/include/asm/kvm_para.h:25:
In file included from arch/s390/include/asm/diag.h:12:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro
'__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from arch/s390/kvm/../../../virt/kvm/kvm_main.c:18:
In file included from include/linux/kvm_host.h:32:
In file included from include/linux/kvm_para.h:5:
In file included from include/uapi/linux/kvm_para.h:39:
In file included from arch/s390/include/asm/kvm_para.h:25:
In file included from arch/s390/include/asm/diag.h:12:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
> arch/s390/kvm/../../../virt/kvm/kvm_main.c:2873:7: error:
implicit declaration of function 'TestClearPageHWPoison'
[-Werror,-Wimplicit-function-declaration]
if
(TestClearPageHWPoison(page)) {
^
arch/s390/kvm/../../../virt/kvm/kvm_main.c:2873:7: note: did you mean
'ClearPageHWPoison'?
include/linux/page-flags.h:435:1: note: 'ClearPageHWPoison' declared here
PAGEFLAG_FALSE(HWPoison)
^
include/linux/page-flags.h:323:26: note: expanded from macro 'PAGEFLAG_FALSE'
SETPAGEFLAG_NOOP(uname) CLEARPAGEFLAG_NOOP(uname)
^
include/linux/page-flags.h:311:20: note: expanded from macro
'CLEARPAGEFLAG_NOOP'
static inline void ClearPage##uname(struct page *page) { }
^
<scratch space>:119:1: note: expanded from here
ClearPageHWPoison
^
20 warnings and 1 error generated.
vim +/TestClearPageHWPoison +2873 arch/s390/kvm/../../../virt/kvm/kvm_main.c
2844
2845 int kvm_share_memory(struct kvm *kvm, unsigned long gfn, unsigned long npages)
2846 {
2847 unsigned long end = gfn + npages;
2848
2849 if (!npages)
2850 return 0;
2851
2852 /*
2853 * Out of slots.
2854 * Still worth to proceed: the new range may merge with an existing
2855 * one.
2856 */
2857 WARN_ON_ONCE(kvm->nr_shared_ranges == ARRAY_SIZE(kvm->shared_ranges));
2858
2859 if (mmap_write_lock_killable(kvm->mm))
2860 return -KVM_EINTR;
2861 kvm->nr_shared_ranges = add_range_with_merge(kvm->shared_ranges,
2862 ARRAY_SIZE(kvm->shared_ranges),
2863 kvm->nr_shared_ranges, gfn, end);
2864 kvm->nr_shared_ranges = clean_sort_range(kvm->shared_ranges,
2865 ARRAY_SIZE(kvm->shared_ranges));
2866 mmap_write_unlock(kvm->mm);
2867
2868 for (; gfn < end; gfn++) {
2869 struct page *page = gfn_to_page(kvm, gfn);
2870
2871 if (page == KVM_ERR_PTR_BAD_PAGE)
2872 continue;
2873 if (TestClearPageHWPoison(page)) {
2874 lock_page(page);
2875 remove_migration_ptes(page, page, false);
2876 unlock_page(page);
2877 put_page(page);
2878 }
2879 put_page(page);
2880 }
2881
2882 return 0;
2883 }
2884
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org