[kvms390:protvirt 23/37] arch/s390/kvm/kvm-s390.c:3650:30: warning: passing argument 1 of 'uv_convert_to_secure' makes integer from pointer without a cast

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git protvirt
head:   c18cc8b3d6089420f52d8e2c1de67a8b1afab9b1
commit: 690453485fdbc052afa80a38688f3ab0133da979 [23/37] KVM: s390: protvirt: Make sure prefix is always protected
config: s390-debug_defconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 690453485fdbc052afa80a38688f3ab0133da979
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=s390 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   arch/s390/kvm/kvm-s390.c: In function 'kvm_s390_handle_requests':
>> arch/s390/kvm/kvm-s390.c:3650:30: warning: passing argument 1 of 'uv_convert_to_secure' makes integer from pointer without a cast [-Wint-conversion]
       rc = uv_convert_to_secure(vcpu->arch.gmap,
                                 ^~~~
   In file included from arch/s390/kvm/kvm-s390.c:47:0:
   arch/s390/include/asm/uv.h:345:19: note: expected 'long unsigned int' but argument is of type 'struct gmap *'
    static inline int uv_convert_to_secure(unsigned long handle, unsigned long gaddr) { return 0; }
                      ^~~~~~~~~~~~~~~~~~~~
   arch/s390/kvm/kvm-s390.c:3653:30: warning: passing argument 1 of 'uv_convert_to_secure' makes integer from pointer without a cast [-Wint-conversion]
       rc = uv_convert_to_secure(vcpu->arch.gmap,
                                 ^~~~
   In file included from arch/s390/kvm/kvm-s390.c:47:0:
   arch/s390/include/asm/uv.h:345:19: note: expected 'long unsigned int' but argument is of type 'struct gmap *'
    static inline int uv_convert_to_secure(unsigned long handle, unsigned long gaddr) { return 0; }
                      ^~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/uaccess.h:11:0,
                    from include/linux/crypto.h:21,
                    from include/crypto/hash.h:11,
                    from include/linux/uio.h:10,
                    from include/linux/socket.h:8,
                    from include/linux/skbuff.h:20,
                    from include/linux/if_ether.h:19,
                    from arch/s390/include/asm/diag.h:12,
                    from arch/s390/include/asm/kvm_para.h:25,
                    from include/uapi/linux/kvm_para.h:36,
                    from include/linux/kvm_para.h:5,
                    from include/linux/kvm_host.h:32,
                    from arch/s390/kvm/kvm-s390.c:23:
   arch/s390/include/asm/uaccess.h: In function '__get_user_fn':
   arch/s390/include/asm/uaccess.h:143:9: warning: 'rc' may be used uninitialized in this function [-Wmaybe-uninitialized]
     return rc;
            ^~

vim +/uv_convert_to_secure +3650 arch/s390/kvm/kvm-s390.c

  3630	
  3631	static int kvm_s390_handle_requests(struct kvm_vcpu *vcpu)
  3632	{
  3633	retry:
  3634		kvm_s390_vcpu_request_handled(vcpu);
  3635		if (!kvm_request_pending(vcpu))
  3636			return 0;
  3637		/*
  3638		 * We use MMU_RELOAD just to re-arm the ipte notifier for the
  3639		 * guest prefix page. gmap_mprotect_notify will wait on the ptl lock.
  3640		 * This ensures that the ipte instruction for this request has
  3641		 * already finished. We might race against a second unmapper that
  3642		 * wants to set the blocking bit. Lets just retry the request loop.
  3643		 */
  3644		if (kvm_check_request(KVM_REQ_MMU_RELOAD, vcpu)) {
  3645			int rc;
  3646			rc = gmap_mprotect_notify(vcpu->arch.gmap,
  3647						  kvm_s390_get_prefix(vcpu),
  3648						  PAGE_SIZE * 2, PROT_WRITE);
  3649			if (!rc && kvm_s390_pv_is_protected(vcpu->kvm)) {
> 3650				rc = uv_convert_to_secure(vcpu->arch.gmap,
  3651							  kvm_s390_get_prefix(vcpu));
  3652				WARN_ON_ONCE(rc && rc != -EEXIST);
  3653				rc = uv_convert_to_secure(vcpu->arch.gmap,
  3654							  kvm_s390_get_prefix(vcpu) + PAGE_SIZE);
  3655				WARN_ON_ONCE(rc && rc != -EEXIST);
  3656				rc = 0;
  3657			}
  3658			if (rc) {
  3659				kvm_make_request(KVM_REQ_MMU_RELOAD, vcpu);
  3660				return rc;
  3661			}
  3662			goto retry;
  3663		}
  3664	
  3665		if (kvm_check_request(KVM_REQ_TLB_FLUSH, vcpu)) {
  3666			vcpu->arch.sie_block->ihcpu = 0xffff;
  3667			goto retry;
  3668		}
  3669	
  3670		if (kvm_check_request(KVM_REQ_ENABLE_IBS, vcpu)) {
  3671			if (!ibs_enabled(vcpu)) {
  3672				trace_kvm_s390_enable_disable_ibs(vcpu->vcpu_id, 1);
  3673				kvm_s390_set_cpuflags(vcpu, CPUSTAT_IBS);
  3674			}
  3675			goto retry;
  3676		}
  3677	
  3678		if (kvm_check_request(KVM_REQ_DISABLE_IBS, vcpu)) {
  3679			if (ibs_enabled(vcpu)) {
  3680				trace_kvm_s390_enable_disable_ibs(vcpu->vcpu_id, 0);
  3681				kvm_s390_clear_cpuflags(vcpu, CPUSTAT_IBS);
  3682			}
  3683			goto retry;
  3684		}
  3685	
  3686		if (kvm_check_request(KVM_REQ_ICPT_OPEREXC, vcpu)) {
  3687			vcpu->arch.sie_block->ictl |= ICTL_OPEREXC;
  3688			goto retry;
  3689		}
  3690	
  3691		if (kvm_check_request(KVM_REQ_START_MIGRATION, vcpu)) {
  3692			/*
  3693			 * Disable CMM virtualization; we will emulate the ESSA
  3694			 * instruction manually, in order to provide additional
  3695			 * functionalities needed for live migration.
  3696			 */
  3697			vcpu->arch.sie_block->ecb2 &= ~ECB2_CMMA;
  3698			goto retry;
  3699		}
  3700	
  3701		if (kvm_check_request(KVM_REQ_STOP_MIGRATION, vcpu)) {
  3702			/*
  3703			 * Re-enable CMM virtualization if CMMA is available and
  3704			 * CMM has been used.
  3705			 */
  3706			if ((vcpu->kvm->arch.use_cmma) &&
  3707			    (vcpu->kvm->mm->context.uses_cmm))
  3708				vcpu->arch.sie_block->ecb2 |= ECB2_CMMA;
  3709			goto retry;
  3710		}
  3711	
  3712		/* nothing to do, just clear the request */
  3713		kvm_clear_request(KVM_REQ_UNHALT, vcpu);
  3714		/* we left the vsie handler, nothing to do, just clear the request */
  3715		kvm_clear_request(KVM_REQ_VSIE_RESTART, vcpu);
  3716	
  3717		return 0;
  3718	}
  3719	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux