All of lore.kernel.org
 help / color / mirror / Atom feed
* arch/arm64/kvm/arm.c:1288:37: sparse: expected void
@ 2020-08-30 22:14 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-08-30 22:14 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 6350 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: David Brazdil <dbrazdil@google.com>
CC: Marc Zyngier <maz@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   dcc5c6f013d841e9ae74d527d312d512dfc2e2f0
commit: 71b3ec5f221b8b3ff545639be83ddfcd5d7c9800 KVM: arm64: Clean up cpu_init_hyp_mode()
date:   3 months ago
:::::: branch date: 3 hours ago
:::::: commit date: 3 months ago
config: arm64-randconfig-s031-20200831 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.2-191-g10164920-dirty
        git checkout 71b3ec5f221b8b3ff545639be83ddfcd5d7c9800
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

   arch/arm64/kvm/arm.c:1288:37: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void *val @@     got struct kvm_host_data [noderef] <asn:3> * @@
>> arch/arm64/kvm/arm.c:1288:37: sparse:     expected void *val
   arch/arm64/kvm/arm.c:1288:37: sparse:     got struct kvm_host_data [noderef] <asn:3> *

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=71b3ec5f221b8b3ff545639be83ddfcd5d7c9800
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 71b3ec5f221b8b3ff545639be83ddfcd5d7c9800
vim +1288 arch/arm64/kvm/arm.c

749cf76c5a363e arch/arm/kvm/arm.c   Christoffer Dall 2013-01-20  1271  
7e0befd521b6d4 virt/kvm/arm/arm.c   Miaohe Lin       2019-11-21  1272  static void cpu_init_hyp_mode(void)
342cd0ab0e6ca3 arch/arm/kvm/arm.c   Christoffer Dall 2013-01-20  1273  {
dac288f7b38a74 arch/arm/kvm/arm.c   Marc Zyngier     2013-05-14  1274  	phys_addr_t pgd_ptr;
342cd0ab0e6ca3 arch/arm/kvm/arm.c   Christoffer Dall 2013-01-20  1275  	unsigned long hyp_stack_ptr;
342cd0ab0e6ca3 arch/arm/kvm/arm.c   Christoffer Dall 2013-01-20  1276  	unsigned long vector_ptr;
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1277  	unsigned long tpidr_el2;
342cd0ab0e6ca3 arch/arm/kvm/arm.c   Christoffer Dall 2013-01-20  1278  
342cd0ab0e6ca3 arch/arm/kvm/arm.c   Christoffer Dall 2013-01-20  1279  	/* Switch from the HYP stub to our own HYP init vector */
5a677ce044f18a arch/arm/kvm/arm.c   Marc Zyngier     2013-04-12  1280  	__hyp_set_vectors(kvm_get_idmap_vector());
342cd0ab0e6ca3 arch/arm/kvm/arm.c   Christoffer Dall 2013-01-20  1281  
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1282  	/*
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1283  	 * Calculate the raw per-cpu offset without a translation from the
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1284  	 * kernel's mapping to the linear mapping, and store it in tpidr_el2
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1285  	 * so that we can use adr_l to access per-cpu variables in EL2.
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1286  	 */
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1287  	tpidr_el2 = ((unsigned long)this_cpu_ptr(&kvm_host_data) -
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15 @1288  		     (unsigned long)kvm_ksym_ref(kvm_host_data));
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1289  
dac288f7b38a74 arch/arm/kvm/arm.c   Marc Zyngier     2013-05-14  1290  	pgd_ptr = kvm_mmu_get_httbr();
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1291  	hyp_stack_ptr = __this_cpu_read(kvm_arm_hyp_stack_page) + PAGE_SIZE;
6840bdd73d0721 virt/kvm/arm/arm.c   Marc Zyngier     2018-01-03  1292  	vector_ptr = (unsigned long)kvm_get_hyp_vector();
342cd0ab0e6ca3 arch/arm/kvm/arm.c   Christoffer Dall 2013-01-20  1293  
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1294  	/*
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1295  	 * Call initialization code, and switch to the full blown HYP code.
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1296  	 * If the cpucaps haven't been finalized yet, something has gone very
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1297  	 * wrong, and hyp will crash and burn when it uses any
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1298  	 * cpus_have_const_cap() wrapper.
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1299  	 */
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1300  	BUG_ON(!system_capabilities_finalized());
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1301  	__kvm_call_hyp((void *)pgd_ptr, hyp_stack_ptr, vector_ptr, tpidr_el2);
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1302  
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1303  	/*
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1304  	 * Disabling SSBD on a non-VHE system requires us to enable SSBS
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1305  	 * at EL2.
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1306  	 */
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1307  	if (this_cpu_has_cap(ARM64_SSBS) &&
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1308  	    arm64_get_ssbd_state() == ARM64_SSBD_FORCE_DISABLE) {
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1309  		kvm_call_hyp(__kvm_enable_ssbs);
71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil    2020-05-15  1310  	}
342cd0ab0e6ca3 arch/arm/kvm/arm.c   Christoffer Dall 2013-01-20  1311  }
342cd0ab0e6ca3 arch/arm/kvm/arm.c   Christoffer Dall 2013-01-20  1312  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31938 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-30 22:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-30 22:14 arch/arm64/kvm/arm.c:1288:37: sparse: expected void kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.