[kvm:queue 4/47] arch/x86/kvm/vmx/vmx.c:503:10: warning: cast from pointer to integer of different size

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

 



tree:   https://kernel.googlesource.com/pub/scm/virt/kvm/kvm.git queue
head:   f0b5105af6e0ca781fcc9aaf9277635ea7df2d36
commit: 6f6a657c99980485c265363447b269083dd1dc3a [4/47] KVM/Hyper-V/VMX: Add direct tlb flush support
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
reproduce:
        git checkout 6f6a657c99980485c265363447b269083dd1dc3a
        # save the attached .config to linux build tree
        make ARCH=i386 

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

All warnings (new ones prefixed by >>):

   In file included from include/linux/printk.h:332:0,
                    from include/linux/kernel.h:15,
                    from include/linux/list.h:9,
                    from include/linux/wait.h:7,
                    from include/linux/wait_bit.h:8,
                    from include/linux/fs.h:6,
                    from include/linux/highmem.h:5,
                    from arch/x86/kvm/vmx/vmx.c:17:
   arch/x86/kvm/vmx/vmx.c: In function 'hv_enable_direct_tlbflush':
>> arch/x86/kvm/vmx/vmx.c:503:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
             (u64)&vcpu->kvm);
             ^
   include/linux/dynamic_debug.h:125:15: note: in definition of macro '__dynamic_func_call'
      func(&id, ##__VA_ARGS__);  \
                  ^~~~~~~~~~~
   include/linux/dynamic_debug.h:153:2: note: in expansion of macro '_dynamic_func_call'
     _dynamic_func_call(fmt, __dynamic_pr_debug,  \
     ^~~~~~~~~~~~~~~~~~
   include/linux/printk.h:336:2: note: in expansion of macro 'dynamic_pr_debug'
     dynamic_pr_debug(fmt, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~
>> arch/x86/kvm/vmx/vmx.c:502:3: note: in expansion of macro 'pr_debug'
      pr_debug("KVM: Hyper-V: allocated PA_PG for %llx\n",
      ^~~~~~~~
   arch/x86/kvm/vmx/vmx.c:510:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     evmcs->hv_vm_id = (u64)vcpu->kvm;
                       ^
   In file included from include/linux/printk.h:332:0,
                    from include/linux/kernel.h:15,
                    from include/linux/list.h:9,
                    from include/linux/wait.h:7,
                    from include/linux/wait_bit.h:8,
                    from include/linux/fs.h:6,
                    from include/linux/highmem.h:5,
                    from arch/x86/kvm/vmx/vmx.c:17:
   arch/x86/kvm/vmx/vmx.c:514:4: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
       (u64)vcpu->kvm);
       ^
   include/linux/dynamic_debug.h:125:15: note: in definition of macro '__dynamic_func_call'
      func(&id, ##__VA_ARGS__);  \
                  ^~~~~~~~~~~
   include/linux/dynamic_debug.h:153:2: note: in expansion of macro '_dynamic_func_call'
     _dynamic_func_call(fmt, __dynamic_pr_debug,  \
     ^~~~~~~~~~~~~~~~~~
   include/linux/printk.h:336:2: note: in expansion of macro 'dynamic_pr_debug'
     dynamic_pr_debug(fmt, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~
   arch/x86/kvm/vmx/vmx.c:513:2: note: in expansion of macro 'pr_debug'
     pr_debug("KVM: Hyper-V: enabled DIRECT flush for %llx\n",
     ^~~~~~~~

vim +503 arch/x86/kvm/vmx/vmx.c

   488	
   489	static int hv_enable_direct_tlbflush(struct kvm_vcpu *vcpu)
   490	{
   491		struct hv_enlightened_vmcs *evmcs;
   492		struct hv_partition_assist_pg **p_hv_pa_pg =
   493				&vcpu->kvm->arch.hyperv.hv_pa_pg;
   494		/*
   495		 * Synthetic VM-Exit is not enabled in current code and so All
   496		 * evmcs in singe VM shares same assist page.
   497		 */
   498		if (!*p_hv_pa_pg) {
   499			*p_hv_pa_pg = kzalloc(PAGE_SIZE, GFP_KERNEL);
   500			if (!*p_hv_pa_pg)
   501				return -ENOMEM;
 > 502			pr_debug("KVM: Hyper-V: allocated PA_PG for %llx\n",
 > 503			       (u64)&vcpu->kvm);
   504		}
   505	
   506		evmcs = (struct hv_enlightened_vmcs *)to_vmx(vcpu)->loaded_vmcs->vmcs;
   507	
   508		evmcs->partition_assist_page =
   509			__pa(*p_hv_pa_pg);
   510		evmcs->hv_vm_id = (u64)vcpu->kvm;
   511		evmcs->hv_enlightenments_control.nested_flush_hypercall = 1;
   512	
   513		pr_debug("KVM: Hyper-V: enabled DIRECT flush for %llx\n",
   514			 (u64)vcpu->kvm);
   515		return 0;
   516	}
   517	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux