All of lore.kernel.org
 help / color / mirror / Atom feed
* arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
@ 2020-12-26 19:01 ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2020-12-26 19:01 UTC (permalink / raw)
  To: Andrew Jones; +Cc: kbuild-all, linux-kernel, Marc Zyngier

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f838f8d2b694cf9d524dc4423e9dd2db13892f3f
commit: 53f985584e3c2ebe5f2455530fbf87a001528db8 KVM: arm64: pvtime: Fix stolen time accounting across migration
date:   4 months ago
config: arm64-randconfig-s032-20201223 (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.3-184-g1b896707-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=53f985584e3c2ebe5f2455530fbf87a001528db8
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 53f985584e3c2ebe5f2455530fbf87a001528db8
        # 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/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64

vim +27 arch/arm64/kvm/pvtime.c

    12	
    13	void kvm_update_stolen_time(struct kvm_vcpu *vcpu)
    14	{
    15		struct kvm *kvm = vcpu->kvm;
    16		u64 base = vcpu->arch.steal.base;
    17		u64 last_steal = vcpu->arch.steal.last_steal;
    18		u64 offset = offsetof(struct pvclock_vcpu_stolen_time, stolen_time);
    19		u64 steal = 0;
    20		int idx;
    21	
    22		if (base == GPA_INVALID)
    23			return;
    24	
    25		idx = srcu_read_lock(&kvm->srcu);
    26		if (!kvm_get_guest(kvm, base + offset, steal)) {
  > 27			steal = le64_to_cpu(steal);
    28			vcpu->arch.steal.last_steal = READ_ONCE(current->sched_info.run_delay);
    29			steal += vcpu->arch.steal.last_steal - last_steal;
    30			kvm_put_guest(kvm, base + offset, cpu_to_le64(steal));
    31		}
    32		srcu_read_unlock(&kvm->srcu, idx);
    33	}
    34	

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

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
@ 2020-12-26 19:01 ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2020-12-26 19:01 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f838f8d2b694cf9d524dc4423e9dd2db13892f3f
commit: 53f985584e3c2ebe5f2455530fbf87a001528db8 KVM: arm64: pvtime: Fix stolen time accounting across migration
date:   4 months ago
config: arm64-randconfig-s032-20201223 (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.3-184-g1b896707-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=53f985584e3c2ebe5f2455530fbf87a001528db8
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 53f985584e3c2ebe5f2455530fbf87a001528db8
        # 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/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64

vim +27 arch/arm64/kvm/pvtime.c

    12	
    13	void kvm_update_stolen_time(struct kvm_vcpu *vcpu)
    14	{
    15		struct kvm *kvm = vcpu->kvm;
    16		u64 base = vcpu->arch.steal.base;
    17		u64 last_steal = vcpu->arch.steal.last_steal;
    18		u64 offset = offsetof(struct pvclock_vcpu_stolen_time, stolen_time);
    19		u64 steal = 0;
    20		int idx;
    21	
    22		if (base == GPA_INVALID)
    23			return;
    24	
    25		idx = srcu_read_lock(&kvm->srcu);
    26		if (!kvm_get_guest(kvm, base + offset, steal)) {
  > 27			steal = le64_to_cpu(steal);
    28			vcpu->arch.steal.last_steal = READ_ONCE(current->sched_info.run_delay);
    29			steal += vcpu->arch.steal.last_steal - last_steal;
    30			kvm_put_guest(kvm, base + offset, cpu_to_le64(steal));
    31		}
    32		srcu_read_unlock(&kvm->srcu, idx);
    33	}
    34	

---
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: 47300 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
@ 2021-11-10  2:46 ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-11-10  2:46 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: kbuild-all, linux-kernel, Thomas Gleixner, Ingo Molnar

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   cb690f5238d71f543f4ce874aa59237cf53a877c
commit: 63b3f96e1a989846a5a521d4fbef4bc86406929d kvm: Select SCHED_INFO instead of TASK_DELAY_ACCT
date:   6 months ago
config: arm64-randconfig-s032-20210927 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 11.2.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.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=63b3f96e1a989846a5a521d4fbef4bc86406929d
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 63b3f96e1a989846a5a521d4fbef4bc86406929d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/kvm/

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/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
--
   arch/arm64/kvm/mmio.c: note: in included file:
>> arch/arm64/include/asm/kvm_emulate.h:439:32: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned long @@     got restricted __be16 [usertype] @@
   arch/arm64/include/asm/kvm_emulate.h:439:32: sparse:     expected unsigned long
   arch/arm64/include/asm/kvm_emulate.h:439:32: sparse:     got restricted __be16 [usertype]
>> arch/arm64/include/asm/kvm_emulate.h:441:32: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned long @@     got restricted __be32 [usertype] @@
   arch/arm64/include/asm/kvm_emulate.h:441:32: sparse:     expected unsigned long
   arch/arm64/include/asm/kvm_emulate.h:441:32: sparse:     got restricted __be32 [usertype]
>> arch/arm64/include/asm/kvm_emulate.h:443:32: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned long @@     got restricted __be64 [usertype] @@
   arch/arm64/include/asm/kvm_emulate.h:443:32: sparse:     expected unsigned long
   arch/arm64/include/asm/kvm_emulate.h:443:32: sparse:     got restricted __be64 [usertype]
>> arch/arm64/include/asm/kvm_emulate.h:450:32: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned long @@     got restricted __le16 [usertype] @@
   arch/arm64/include/asm/kvm_emulate.h:450:32: sparse:     expected unsigned long
   arch/arm64/include/asm/kvm_emulate.h:450:32: sparse:     got restricted __le16 [usertype]
>> arch/arm64/include/asm/kvm_emulate.h:452:32: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned long @@     got restricted __le32 [usertype] @@
   arch/arm64/include/asm/kvm_emulate.h:452:32: sparse:     expected unsigned long
   arch/arm64/include/asm/kvm_emulate.h:452:32: sparse:     got restricted __le32 [usertype]
>> arch/arm64/include/asm/kvm_emulate.h:454:32: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned long @@     got restricted __le64 [usertype] @@
   arch/arm64/include/asm/kvm_emulate.h:454:32: sparse:     expected unsigned long
   arch/arm64/include/asm/kvm_emulate.h:454:32: sparse:     got restricted __le64 [usertype]
>> arch/arm64/include/asm/kvm_emulate.h:408:32: sparse: sparse: cast to restricted __be16
>> arch/arm64/include/asm/kvm_emulate.h:410:32: sparse: sparse: cast to restricted __be32
>> arch/arm64/include/asm/kvm_emulate.h:412:32: sparse: sparse: cast to restricted __be64
>> arch/arm64/include/asm/kvm_emulate.h:419:32: sparse: sparse: cast to restricted __le16
>> arch/arm64/include/asm/kvm_emulate.h:419:32: sparse: sparse: cast to restricted __le16
>> arch/arm64/include/asm/kvm_emulate.h:419:32: sparse: sparse: cast to restricted __le16
>> arch/arm64/include/asm/kvm_emulate.h:419:32: sparse: sparse: cast to restricted __le16
>> arch/arm64/include/asm/kvm_emulate.h:421:32: sparse: sparse: cast to restricted __le32
>> arch/arm64/include/asm/kvm_emulate.h:421:32: sparse: sparse: cast to restricted __le32
>> arch/arm64/include/asm/kvm_emulate.h:421:32: sparse: sparse: cast to restricted __le32
>> arch/arm64/include/asm/kvm_emulate.h:421:32: sparse: sparse: cast to restricted __le32
>> arch/arm64/include/asm/kvm_emulate.h:421:32: sparse: sparse: cast to restricted __le32
>> arch/arm64/include/asm/kvm_emulate.h:421:32: sparse: sparse: cast to restricted __le32
>> arch/arm64/include/asm/kvm_emulate.h:423:32: sparse: sparse: cast to restricted __le64
>> arch/arm64/include/asm/kvm_emulate.h:423:32: sparse: sparse: cast to restricted __le64
>> arch/arm64/include/asm/kvm_emulate.h:423:32: sparse: sparse: cast to restricted __le64
>> arch/arm64/include/asm/kvm_emulate.h:423:32: sparse: sparse: cast to restricted __le64
>> arch/arm64/include/asm/kvm_emulate.h:423:32: sparse: sparse: cast to restricted __le64
>> arch/arm64/include/asm/kvm_emulate.h:423:32: sparse: sparse: cast to restricted __le64
>> arch/arm64/include/asm/kvm_emulate.h:423:32: sparse: sparse: cast to restricted __le64
>> arch/arm64/include/asm/kvm_emulate.h:423:32: sparse: sparse: cast to restricted __le64
>> arch/arm64/include/asm/kvm_emulate.h:423:32: sparse: sparse: cast to restricted __le64
>> arch/arm64/include/asm/kvm_emulate.h:423:32: sparse: sparse: cast to restricted __le64
--
>> arch/arm64/kvm/arch_timer.c:1016:66: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void *vcpu_info @@     got struct kvm_vcpu *[noderef] __percpu * @@
   arch/arm64/kvm/arch_timer.c:1016:66: sparse:     expected void *vcpu_info
   arch/arm64/kvm/arch_timer.c:1016:66: sparse:     got struct kvm_vcpu *[noderef] __percpu *
   arch/arm64/kvm/arch_timer.c:1049:74: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void *vcpu_info @@     got struct kvm_vcpu *[noderef] __percpu * @@
   arch/arm64/kvm/arch_timer.c:1049:74: sparse:     expected void *vcpu_info
   arch/arm64/kvm/arch_timer.c:1049:74: sparse:     got struct kvm_vcpu *[noderef] __percpu *
--
>> arch/arm64/kvm/vgic/vgic-mmio.c:854:24: sparse: sparse: cast to restricted __le16
>> arch/arm64/kvm/vgic/vgic-mmio.c:854:24: sparse: sparse: cast to restricted __le16
>> arch/arm64/kvm/vgic/vgic-mmio.c:854:24: sparse: sparse: cast to restricted __le16
>> arch/arm64/kvm/vgic/vgic-mmio.c:854:24: sparse: sparse: cast to restricted __le16
>> arch/arm64/kvm/vgic/vgic-mmio.c:856:24: sparse: sparse: cast to restricted __le32
>> arch/arm64/kvm/vgic/vgic-mmio.c:856:24: sparse: sparse: cast to restricted __le32
>> arch/arm64/kvm/vgic/vgic-mmio.c:856:24: sparse: sparse: cast to restricted __le32
>> arch/arm64/kvm/vgic/vgic-mmio.c:856:24: sparse: sparse: cast to restricted __le32
>> arch/arm64/kvm/vgic/vgic-mmio.c:856:24: sparse: sparse: cast to restricted __le32
>> arch/arm64/kvm/vgic/vgic-mmio.c:856:24: sparse: sparse: cast to restricted __le32
>> arch/arm64/kvm/vgic/vgic-mmio.c:858:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-mmio.c:858:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-mmio.c:858:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-mmio.c:858:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-mmio.c:858:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-mmio.c:858:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-mmio.c:858:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-mmio.c:858:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-mmio.c:858:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-mmio.c:858:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-mmio.c:878:22: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long data @@     got restricted __le16 [usertype] @@
   arch/arm64/kvm/vgic/vgic-mmio.c:878:22: sparse:     expected unsigned long data
   arch/arm64/kvm/vgic/vgic-mmio.c:878:22: sparse:     got restricted __le16 [usertype]
>> arch/arm64/kvm/vgic/vgic-mmio.c:881:22: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long data @@     got restricted __le32 [usertype] @@
   arch/arm64/kvm/vgic/vgic-mmio.c:881:22: sparse:     expected unsigned long data
   arch/arm64/kvm/vgic/vgic-mmio.c:881:22: sparse:     got restricted __le32 [usertype]
>> arch/arm64/kvm/vgic/vgic-mmio.c:884:22: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long data @@     got restricted __le64 [usertype] @@
   arch/arm64/kvm/vgic/vgic-mmio.c:884:22: sparse:     expected unsigned long data
   arch/arm64/kvm/vgic/vgic-mmio.c:884:22: sparse:     got restricted __le64 [usertype]
   arch/arm64/kvm/vgic/vgic-mmio.c:88:17: sparse: sparse: context imbalance in 'vgic_mmio_write_group' - different lock contexts for basic block
   arch/arm64/kvm/vgic/vgic-mmio.c:124:9: sparse: sparse: context imbalance in 'vgic_mmio_write_senable' - different lock contexts for basic block
   arch/arm64/kvm/vgic/vgic-mmio.c:195:9: sparse: sparse: context imbalance in 'vgic_uaccess_write_senable' - different lock contexts for basic block
   arch/arm64/kvm/vgic/vgic-mmio.c:278:9: sparse: sparse: context imbalance in 'vgic_mmio_write_spending' - different lock contexts for basic block
   arch/arm64/kvm/vgic/vgic-mmio.c:320:9: sparse: sparse: context imbalance in 'vgic_uaccess_write_spending' - different lock contexts for basic block
   arch/arm64/kvm/vgic/vgic-mmio.c:565:9: sparse: sparse: context imbalance in 'vgic_mmio_change_active' - wrong count at exit
   arch/arm64/kvm/vgic/vgic-mmio.c:773:30: sparse: sparse: context imbalance in 'vgic_write_irq_line_level_info' - different lock contexts for basic block
--
>> arch/arm64/kvm/vgic/vgic-its.c:824:17: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-its.c:824:17: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-its.c:824:17: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-its.c:824:17: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-its.c:824:17: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-its.c:824:17: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-its.c:824:17: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-its.c:824:17: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-its.c:824:17: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-its.c:824:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:955:24: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:955:24: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:955:24: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:955:24: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:955:24: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:955:24: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:955:24: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:955:24: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:955:24: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:955:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-its.c:2133:13: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [assigned] [usertype] val @@     got restricted __le64 [usertype] @@
   arch/arm64/kvm/vgic/vgic-its.c:2133:13: sparse:     expected unsigned long long [assigned] [usertype] val
   arch/arm64/kvm/vgic/vgic-its.c:2133:13: sparse:     got restricted __le64 [usertype]
   arch/arm64/kvm/vgic/vgic-its.c:2159:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2159:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2159:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2159:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2159:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2159:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2159:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2159:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2159:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2159:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2280:13: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [assigned] [usertype] val @@     got restricted __le64 [usertype] @@
   arch/arm64/kvm/vgic/vgic-its.c:2280:13: sparse:     expected unsigned long long [assigned] [usertype] val
   arch/arm64/kvm/vgic/vgic-its.c:2280:13: sparse:     got restricted __le64 [usertype]
   arch/arm64/kvm/vgic/vgic-its.c:2306:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2306:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2306:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2306:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2306:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2306:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2306:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2306:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2306:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2306:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2404:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2404:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2404:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2404:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2404:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2404:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2404:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2404:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2404:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2404:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2460:13: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [assigned] [usertype] val @@     got restricted __le64 [usertype] @@
   arch/arm64/kvm/vgic/vgic-its.c:2460:13: sparse:     expected unsigned long long [assigned] [usertype] val
   arch/arm64/kvm/vgic/vgic-its.c:2460:13: sparse:     got restricted __le64 [usertype]
   arch/arm64/kvm/vgic/vgic-its.c:2476:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2476:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2476:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2476:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2476:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2476:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2476:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2476:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2476:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2476:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:280:12: sparse: sparse: context imbalance in 'update_lpi_config' - different lock contexts for basic block
   arch/arm64/kvm/vgic/vgic-its.c:443:9: sparse: sparse: context imbalance in 'its_sync_lpi_pending_table' - different lock contexts for basic block
   arch/arm64/kvm/vgic/vgic-its.c:730:12: sparse: sparse: context imbalance in 'vgic_its_trigger_msi' - different lock contexts for basic block
   arch/arm64/kvm/vgic/vgic-its.c:752:5: sparse: sparse: context imbalance in 'vgic_its_inject_cached_translation' - wrong count at exit

vim +27 arch/arm64/kvm/pvtime.c

b48c1a45a19089 virt/kvm/arm/pvtime.c   Steven Price 2019-10-21  12  
8564d6372a7d8a virt/kvm/arm/pvtime.c   Steven Price 2019-10-21  13  void kvm_update_stolen_time(struct kvm_vcpu *vcpu)
8564d6372a7d8a virt/kvm/arm/pvtime.c   Steven Price 2019-10-21  14  {
8564d6372a7d8a virt/kvm/arm/pvtime.c   Steven Price 2019-10-21  15  	struct kvm *kvm = vcpu->kvm;
53f985584e3c2e arch/arm64/kvm/pvtime.c Andrew Jones 2020-08-04  16  	u64 base = vcpu->arch.steal.base;
2dbd780e34ac53 arch/arm64/kvm/pvtime.c Andrew Jones 2020-08-04  17  	u64 last_steal = vcpu->arch.steal.last_steal;
53f985584e3c2e arch/arm64/kvm/pvtime.c Andrew Jones 2020-08-04  18  	u64 offset = offsetof(struct pvclock_vcpu_stolen_time, stolen_time);
53f985584e3c2e arch/arm64/kvm/pvtime.c Andrew Jones 2020-08-04  19  	u64 steal = 0;
8564d6372a7d8a virt/kvm/arm/pvtime.c   Steven Price 2019-10-21  20  	int idx;
8564d6372a7d8a virt/kvm/arm/pvtime.c   Steven Price 2019-10-21  21  
8564d6372a7d8a virt/kvm/arm/pvtime.c   Steven Price 2019-10-21  22  	if (base == GPA_INVALID)
8564d6372a7d8a virt/kvm/arm/pvtime.c   Steven Price 2019-10-21  23  		return;
8564d6372a7d8a virt/kvm/arm/pvtime.c   Steven Price 2019-10-21  24  
53f985584e3c2e arch/arm64/kvm/pvtime.c Andrew Jones 2020-08-04  25  	idx = srcu_read_lock(&kvm->srcu);
53f985584e3c2e arch/arm64/kvm/pvtime.c Andrew Jones 2020-08-04  26  	if (!kvm_get_guest(kvm, base + offset, steal)) {
53f985584e3c2e arch/arm64/kvm/pvtime.c Andrew Jones 2020-08-04 @27  		steal = le64_to_cpu(steal);
2dbd780e34ac53 arch/arm64/kvm/pvtime.c Andrew Jones 2020-08-04  28  		vcpu->arch.steal.last_steal = READ_ONCE(current->sched_info.run_delay);
2dbd780e34ac53 arch/arm64/kvm/pvtime.c Andrew Jones 2020-08-04  29  		steal += vcpu->arch.steal.last_steal - last_steal;
53f985584e3c2e arch/arm64/kvm/pvtime.c Andrew Jones 2020-08-04  30  		kvm_put_guest(kvm, base + offset, cpu_to_le64(steal));
53f985584e3c2e arch/arm64/kvm/pvtime.c Andrew Jones 2020-08-04  31  	}
8564d6372a7d8a virt/kvm/arm/pvtime.c   Steven Price 2019-10-21  32  	srcu_read_unlock(&kvm->srcu, idx);
8564d6372a7d8a virt/kvm/arm/pvtime.c   Steven Price 2019-10-21  33  }
8564d6372a7d8a virt/kvm/arm/pvtime.c   Steven Price 2019-10-21  34  

:::::: The code at line 27 was first introduced by commit
:::::: 53f985584e3c2ebe5f2455530fbf87a001528db8 KVM: arm64: pvtime: Fix stolen time accounting across migration

:::::: TO: Andrew Jones <drjones@redhat.com>
:::::: CC: Marc Zyngier <maz@kernel.org>

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

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
@ 2021-11-10  2:46 ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-11-10  2:46 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   cb690f5238d71f543f4ce874aa59237cf53a877c
commit: 63b3f96e1a989846a5a521d4fbef4bc86406929d kvm: Select SCHED_INFO instead of TASK_DELAY_ACCT
date:   6 months ago
config: arm64-randconfig-s032-20210927 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 11.2.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.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=63b3f96e1a989846a5a521d4fbef4bc86406929d
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 63b3f96e1a989846a5a521d4fbef4bc86406929d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/kvm/

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/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
--
   arch/arm64/kvm/mmio.c: note: in included file:
>> arch/arm64/include/asm/kvm_emulate.h:439:32: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned long @@     got restricted __be16 [usertype] @@
   arch/arm64/include/asm/kvm_emulate.h:439:32: sparse:     expected unsigned long
   arch/arm64/include/asm/kvm_emulate.h:439:32: sparse:     got restricted __be16 [usertype]
>> arch/arm64/include/asm/kvm_emulate.h:441:32: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned long @@     got restricted __be32 [usertype] @@
   arch/arm64/include/asm/kvm_emulate.h:441:32: sparse:     expected unsigned long
   arch/arm64/include/asm/kvm_emulate.h:441:32: sparse:     got restricted __be32 [usertype]
>> arch/arm64/include/asm/kvm_emulate.h:443:32: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned long @@     got restricted __be64 [usertype] @@
   arch/arm64/include/asm/kvm_emulate.h:443:32: sparse:     expected unsigned long
   arch/arm64/include/asm/kvm_emulate.h:443:32: sparse:     got restricted __be64 [usertype]
>> arch/arm64/include/asm/kvm_emulate.h:450:32: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned long @@     got restricted __le16 [usertype] @@
   arch/arm64/include/asm/kvm_emulate.h:450:32: sparse:     expected unsigned long
   arch/arm64/include/asm/kvm_emulate.h:450:32: sparse:     got restricted __le16 [usertype]
>> arch/arm64/include/asm/kvm_emulate.h:452:32: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned long @@     got restricted __le32 [usertype] @@
   arch/arm64/include/asm/kvm_emulate.h:452:32: sparse:     expected unsigned long
   arch/arm64/include/asm/kvm_emulate.h:452:32: sparse:     got restricted __le32 [usertype]
>> arch/arm64/include/asm/kvm_emulate.h:454:32: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned long @@     got restricted __le64 [usertype] @@
   arch/arm64/include/asm/kvm_emulate.h:454:32: sparse:     expected unsigned long
   arch/arm64/include/asm/kvm_emulate.h:454:32: sparse:     got restricted __le64 [usertype]
>> arch/arm64/include/asm/kvm_emulate.h:408:32: sparse: sparse: cast to restricted __be16
>> arch/arm64/include/asm/kvm_emulate.h:410:32: sparse: sparse: cast to restricted __be32
>> arch/arm64/include/asm/kvm_emulate.h:412:32: sparse: sparse: cast to restricted __be64
>> arch/arm64/include/asm/kvm_emulate.h:419:32: sparse: sparse: cast to restricted __le16
>> arch/arm64/include/asm/kvm_emulate.h:419:32: sparse: sparse: cast to restricted __le16
>> arch/arm64/include/asm/kvm_emulate.h:419:32: sparse: sparse: cast to restricted __le16
>> arch/arm64/include/asm/kvm_emulate.h:419:32: sparse: sparse: cast to restricted __le16
>> arch/arm64/include/asm/kvm_emulate.h:421:32: sparse: sparse: cast to restricted __le32
>> arch/arm64/include/asm/kvm_emulate.h:421:32: sparse: sparse: cast to restricted __le32
>> arch/arm64/include/asm/kvm_emulate.h:421:32: sparse: sparse: cast to restricted __le32
>> arch/arm64/include/asm/kvm_emulate.h:421:32: sparse: sparse: cast to restricted __le32
>> arch/arm64/include/asm/kvm_emulate.h:421:32: sparse: sparse: cast to restricted __le32
>> arch/arm64/include/asm/kvm_emulate.h:421:32: sparse: sparse: cast to restricted __le32
>> arch/arm64/include/asm/kvm_emulate.h:423:32: sparse: sparse: cast to restricted __le64
>> arch/arm64/include/asm/kvm_emulate.h:423:32: sparse: sparse: cast to restricted __le64
>> arch/arm64/include/asm/kvm_emulate.h:423:32: sparse: sparse: cast to restricted __le64
>> arch/arm64/include/asm/kvm_emulate.h:423:32: sparse: sparse: cast to restricted __le64
>> arch/arm64/include/asm/kvm_emulate.h:423:32: sparse: sparse: cast to restricted __le64
>> arch/arm64/include/asm/kvm_emulate.h:423:32: sparse: sparse: cast to restricted __le64
>> arch/arm64/include/asm/kvm_emulate.h:423:32: sparse: sparse: cast to restricted __le64
>> arch/arm64/include/asm/kvm_emulate.h:423:32: sparse: sparse: cast to restricted __le64
>> arch/arm64/include/asm/kvm_emulate.h:423:32: sparse: sparse: cast to restricted __le64
>> arch/arm64/include/asm/kvm_emulate.h:423:32: sparse: sparse: cast to restricted __le64
--
>> arch/arm64/kvm/arch_timer.c:1016:66: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void *vcpu_info @@     got struct kvm_vcpu *[noderef] __percpu * @@
   arch/arm64/kvm/arch_timer.c:1016:66: sparse:     expected void *vcpu_info
   arch/arm64/kvm/arch_timer.c:1016:66: sparse:     got struct kvm_vcpu *[noderef] __percpu *
   arch/arm64/kvm/arch_timer.c:1049:74: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void *vcpu_info @@     got struct kvm_vcpu *[noderef] __percpu * @@
   arch/arm64/kvm/arch_timer.c:1049:74: sparse:     expected void *vcpu_info
   arch/arm64/kvm/arch_timer.c:1049:74: sparse:     got struct kvm_vcpu *[noderef] __percpu *
--
>> arch/arm64/kvm/vgic/vgic-mmio.c:854:24: sparse: sparse: cast to restricted __le16
>> arch/arm64/kvm/vgic/vgic-mmio.c:854:24: sparse: sparse: cast to restricted __le16
>> arch/arm64/kvm/vgic/vgic-mmio.c:854:24: sparse: sparse: cast to restricted __le16
>> arch/arm64/kvm/vgic/vgic-mmio.c:854:24: sparse: sparse: cast to restricted __le16
>> arch/arm64/kvm/vgic/vgic-mmio.c:856:24: sparse: sparse: cast to restricted __le32
>> arch/arm64/kvm/vgic/vgic-mmio.c:856:24: sparse: sparse: cast to restricted __le32
>> arch/arm64/kvm/vgic/vgic-mmio.c:856:24: sparse: sparse: cast to restricted __le32
>> arch/arm64/kvm/vgic/vgic-mmio.c:856:24: sparse: sparse: cast to restricted __le32
>> arch/arm64/kvm/vgic/vgic-mmio.c:856:24: sparse: sparse: cast to restricted __le32
>> arch/arm64/kvm/vgic/vgic-mmio.c:856:24: sparse: sparse: cast to restricted __le32
>> arch/arm64/kvm/vgic/vgic-mmio.c:858:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-mmio.c:858:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-mmio.c:858:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-mmio.c:858:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-mmio.c:858:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-mmio.c:858:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-mmio.c:858:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-mmio.c:858:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-mmio.c:858:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-mmio.c:858:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-mmio.c:878:22: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long data @@     got restricted __le16 [usertype] @@
   arch/arm64/kvm/vgic/vgic-mmio.c:878:22: sparse:     expected unsigned long data
   arch/arm64/kvm/vgic/vgic-mmio.c:878:22: sparse:     got restricted __le16 [usertype]
>> arch/arm64/kvm/vgic/vgic-mmio.c:881:22: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long data @@     got restricted __le32 [usertype] @@
   arch/arm64/kvm/vgic/vgic-mmio.c:881:22: sparse:     expected unsigned long data
   arch/arm64/kvm/vgic/vgic-mmio.c:881:22: sparse:     got restricted __le32 [usertype]
>> arch/arm64/kvm/vgic/vgic-mmio.c:884:22: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long data @@     got restricted __le64 [usertype] @@
   arch/arm64/kvm/vgic/vgic-mmio.c:884:22: sparse:     expected unsigned long data
   arch/arm64/kvm/vgic/vgic-mmio.c:884:22: sparse:     got restricted __le64 [usertype]
   arch/arm64/kvm/vgic/vgic-mmio.c:88:17: sparse: sparse: context imbalance in 'vgic_mmio_write_group' - different lock contexts for basic block
   arch/arm64/kvm/vgic/vgic-mmio.c:124:9: sparse: sparse: context imbalance in 'vgic_mmio_write_senable' - different lock contexts for basic block
   arch/arm64/kvm/vgic/vgic-mmio.c:195:9: sparse: sparse: context imbalance in 'vgic_uaccess_write_senable' - different lock contexts for basic block
   arch/arm64/kvm/vgic/vgic-mmio.c:278:9: sparse: sparse: context imbalance in 'vgic_mmio_write_spending' - different lock contexts for basic block
   arch/arm64/kvm/vgic/vgic-mmio.c:320:9: sparse: sparse: context imbalance in 'vgic_uaccess_write_spending' - different lock contexts for basic block
   arch/arm64/kvm/vgic/vgic-mmio.c:565:9: sparse: sparse: context imbalance in 'vgic_mmio_change_active' - wrong count at exit
   arch/arm64/kvm/vgic/vgic-mmio.c:773:30: sparse: sparse: context imbalance in 'vgic_write_irq_line_level_info' - different lock contexts for basic block
--
>> arch/arm64/kvm/vgic/vgic-its.c:824:17: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-its.c:824:17: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-its.c:824:17: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-its.c:824:17: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-its.c:824:17: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-its.c:824:17: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-its.c:824:17: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-its.c:824:17: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-its.c:824:17: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-its.c:824:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:955:24: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:955:24: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:955:24: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:955:24: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:955:24: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:955:24: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:955:24: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:955:24: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:955:24: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:955:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-its.c:2133:13: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [assigned] [usertype] val @@     got restricted __le64 [usertype] @@
   arch/arm64/kvm/vgic/vgic-its.c:2133:13: sparse:     expected unsigned long long [assigned] [usertype] val
   arch/arm64/kvm/vgic/vgic-its.c:2133:13: sparse:     got restricted __le64 [usertype]
   arch/arm64/kvm/vgic/vgic-its.c:2159:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2159:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2159:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2159:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2159:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2159:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2159:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2159:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2159:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2159:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2280:13: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [assigned] [usertype] val @@     got restricted __le64 [usertype] @@
   arch/arm64/kvm/vgic/vgic-its.c:2280:13: sparse:     expected unsigned long long [assigned] [usertype] val
   arch/arm64/kvm/vgic/vgic-its.c:2280:13: sparse:     got restricted __le64 [usertype]
   arch/arm64/kvm/vgic/vgic-its.c:2306:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2306:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2306:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2306:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2306:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2306:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2306:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2306:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2306:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2306:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2404:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2404:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2404:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2404:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2404:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2404:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2404:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2404:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2404:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2404:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2460:13: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [assigned] [usertype] val @@     got restricted __le64 [usertype] @@
   arch/arm64/kvm/vgic/vgic-its.c:2460:13: sparse:     expected unsigned long long [assigned] [usertype] val
   arch/arm64/kvm/vgic/vgic-its.c:2460:13: sparse:     got restricted __le64 [usertype]
   arch/arm64/kvm/vgic/vgic-its.c:2476:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2476:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2476:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2476:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2476:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2476:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2476:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2476:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2476:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2476:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:280:12: sparse: sparse: context imbalance in 'update_lpi_config' - different lock contexts for basic block
   arch/arm64/kvm/vgic/vgic-its.c:443:9: sparse: sparse: context imbalance in 'its_sync_lpi_pending_table' - different lock contexts for basic block
   arch/arm64/kvm/vgic/vgic-its.c:730:12: sparse: sparse: context imbalance in 'vgic_its_trigger_msi' - different lock contexts for basic block
   arch/arm64/kvm/vgic/vgic-its.c:752:5: sparse: sparse: context imbalance in 'vgic_its_inject_cached_translation' - wrong count at exit

vim +27 arch/arm64/kvm/pvtime.c

b48c1a45a19089 virt/kvm/arm/pvtime.c   Steven Price 2019-10-21  12  
8564d6372a7d8a virt/kvm/arm/pvtime.c   Steven Price 2019-10-21  13  void kvm_update_stolen_time(struct kvm_vcpu *vcpu)
8564d6372a7d8a virt/kvm/arm/pvtime.c   Steven Price 2019-10-21  14  {
8564d6372a7d8a virt/kvm/arm/pvtime.c   Steven Price 2019-10-21  15  	struct kvm *kvm = vcpu->kvm;
53f985584e3c2e arch/arm64/kvm/pvtime.c Andrew Jones 2020-08-04  16  	u64 base = vcpu->arch.steal.base;
2dbd780e34ac53 arch/arm64/kvm/pvtime.c Andrew Jones 2020-08-04  17  	u64 last_steal = vcpu->arch.steal.last_steal;
53f985584e3c2e arch/arm64/kvm/pvtime.c Andrew Jones 2020-08-04  18  	u64 offset = offsetof(struct pvclock_vcpu_stolen_time, stolen_time);
53f985584e3c2e arch/arm64/kvm/pvtime.c Andrew Jones 2020-08-04  19  	u64 steal = 0;
8564d6372a7d8a virt/kvm/arm/pvtime.c   Steven Price 2019-10-21  20  	int idx;
8564d6372a7d8a virt/kvm/arm/pvtime.c   Steven Price 2019-10-21  21  
8564d6372a7d8a virt/kvm/arm/pvtime.c   Steven Price 2019-10-21  22  	if (base == GPA_INVALID)
8564d6372a7d8a virt/kvm/arm/pvtime.c   Steven Price 2019-10-21  23  		return;
8564d6372a7d8a virt/kvm/arm/pvtime.c   Steven Price 2019-10-21  24  
53f985584e3c2e arch/arm64/kvm/pvtime.c Andrew Jones 2020-08-04  25  	idx = srcu_read_lock(&kvm->srcu);
53f985584e3c2e arch/arm64/kvm/pvtime.c Andrew Jones 2020-08-04  26  	if (!kvm_get_guest(kvm, base + offset, steal)) {
53f985584e3c2e arch/arm64/kvm/pvtime.c Andrew Jones 2020-08-04 @27  		steal = le64_to_cpu(steal);
2dbd780e34ac53 arch/arm64/kvm/pvtime.c Andrew Jones 2020-08-04  28  		vcpu->arch.steal.last_steal = READ_ONCE(current->sched_info.run_delay);
2dbd780e34ac53 arch/arm64/kvm/pvtime.c Andrew Jones 2020-08-04  29  		steal += vcpu->arch.steal.last_steal - last_steal;
53f985584e3c2e arch/arm64/kvm/pvtime.c Andrew Jones 2020-08-04  30  		kvm_put_guest(kvm, base + offset, cpu_to_le64(steal));
53f985584e3c2e arch/arm64/kvm/pvtime.c Andrew Jones 2020-08-04  31  	}
8564d6372a7d8a virt/kvm/arm/pvtime.c   Steven Price 2019-10-21  32  	srcu_read_unlock(&kvm->srcu, idx);
8564d6372a7d8a virt/kvm/arm/pvtime.c   Steven Price 2019-10-21  33  }
8564d6372a7d8a virt/kvm/arm/pvtime.c   Steven Price 2019-10-21  34  

:::::: The code at line 27 was first introduced by commit
:::::: 53f985584e3c2ebe5f2455530fbf87a001528db8 KVM: arm64: pvtime: Fix stolen time accounting across migration

:::::: TO: Andrew Jones <drjones@redhat.com>
:::::: CC: Marc Zyngier <maz@kernel.org>

---
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: 36231 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
@ 2021-05-08 20:16 ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-05-08 20:16 UTC (permalink / raw)
  To: Andrew Jones; +Cc: kbuild-all, linux-kernel, Marc Zyngier

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b741596468b010af2846b75f5e75a842ce344a6e
commit: 53f985584e3c2ebe5f2455530fbf87a001528db8 KVM: arm64: pvtime: Fix stolen time accounting across migration
date:   9 months ago
config: arm64-randconfig-s032-20210508 (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.3-341-g8af24329-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=53f985584e3c2ebe5f2455530fbf87a001528db8
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 53f985584e3c2ebe5f2455530fbf87a001528db8
        # 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__' W=1 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/pvtime.c:27:25: sparse: sparse: cast to restricted __le64

vim +27 arch/arm64/kvm/pvtime.c

    12	
    13	void kvm_update_stolen_time(struct kvm_vcpu *vcpu)
    14	{
    15		struct kvm *kvm = vcpu->kvm;
    16		u64 base = vcpu->arch.steal.base;
    17		u64 last_steal = vcpu->arch.steal.last_steal;
    18		u64 offset = offsetof(struct pvclock_vcpu_stolen_time, stolen_time);
    19		u64 steal = 0;
    20		int idx;
    21	
    22		if (base == GPA_INVALID)
    23			return;
    24	
    25		idx = srcu_read_lock(&kvm->srcu);
    26		if (!kvm_get_guest(kvm, base + offset, steal)) {
  > 27			steal = le64_to_cpu(steal);
    28			vcpu->arch.steal.last_steal = READ_ONCE(current->sched_info.run_delay);
    29			steal += vcpu->arch.steal.last_steal - last_steal;
    30			kvm_put_guest(kvm, base + offset, cpu_to_le64(steal));
    31		}
    32		srcu_read_unlock(&kvm->srcu, idx);
    33	}
    34	

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

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
@ 2021-05-08 20:16 ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-05-08 20:16 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b741596468b010af2846b75f5e75a842ce344a6e
commit: 53f985584e3c2ebe5f2455530fbf87a001528db8 KVM: arm64: pvtime: Fix stolen time accounting across migration
date:   9 months ago
config: arm64-randconfig-s032-20210508 (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.3-341-g8af24329-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=53f985584e3c2ebe5f2455530fbf87a001528db8
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 53f985584e3c2ebe5f2455530fbf87a001528db8
        # 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__' W=1 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/pvtime.c:27:25: sparse: sparse: cast to restricted __le64

vim +27 arch/arm64/kvm/pvtime.c

    12	
    13	void kvm_update_stolen_time(struct kvm_vcpu *vcpu)
    14	{
    15		struct kvm *kvm = vcpu->kvm;
    16		u64 base = vcpu->arch.steal.base;
    17		u64 last_steal = vcpu->arch.steal.last_steal;
    18		u64 offset = offsetof(struct pvclock_vcpu_stolen_time, stolen_time);
    19		u64 steal = 0;
    20		int idx;
    21	
    22		if (base == GPA_INVALID)
    23			return;
    24	
    25		idx = srcu_read_lock(&kvm->srcu);
    26		if (!kvm_get_guest(kvm, base + offset, steal)) {
  > 27			steal = le64_to_cpu(steal);
    28			vcpu->arch.steal.last_steal = READ_ONCE(current->sched_info.run_delay);
    29			steal += vcpu->arch.steal.last_steal - last_steal;
    30			kvm_put_guest(kvm, base + offset, cpu_to_le64(steal));
    31		}
    32		srcu_read_unlock(&kvm->srcu, idx);
    33	}
    34	

---
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: 33421 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-11-10  2:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-26 19:01 arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64 kernel test robot
2020-12-26 19:01 ` kernel test robot
2021-05-08 20:16 kernel test robot
2021-05-08 20:16 ` kernel test robot
2021-11-10  2:46 kernel test robot
2021-11-10  2:46 ` 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.