[kvm:queue 20/31] arch/x86/kvm/vmx.c:2502:78: warning: left shift count >= width of type

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

 



tree:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
head:   0e67722dd743e8218b4fc7924a1ab4ffda781517
commit: 8de182e8f597f4ec81a6fca865fb709c0753ca53 [20/31] KVM: nVMX: expose VPID capability to L1
config: i386-randconfig-x006-201539 (attached as .config)
reproduce:
  git checkout 8de182e8f597f4ec81a6fca865fb709c0753ca53
  # save the attached .config to linux build tree
  make ARCH=i386 

All warnings (new ones prefixed by >>):

   arch/x86/kvm/vmx.c: In function 'nested_vmx_setup_ctls_msrs':
>> arch/x86/kvm/vmx.c:2502:78: warning: left shift count >= width of type [-Wshift-count-overflow]
      vmx->nested.nested_vmx_ept_vpid_caps |= (unsigned long)vmx_capability.vpid << 32;
                                                                                 ^

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

  2486			SECONDARY_EXEC_XSAVES;
  2487	
  2488		if (enable_ept | enable_vpid) {
  2489			/* nested EPT: emulate EPT also to L1 */
  2490			vmx->nested.nested_vmx_secondary_ctls_high |=
  2491				SECONDARY_EXEC_ENABLE_EPT;
  2492			vmx->nested.nested_vmx_ept_vpid_caps = VMX_EPT_PAGE_WALK_4_BIT |
  2493				 VMX_EPTP_WB_BIT | VMX_EPT_2MB_PAGE_BIT |
  2494				 VMX_EPT_INVEPT_BIT;
  2495			vmx->nested.nested_vmx_ept_vpid_caps &= vmx_capability.ept;
  2496			/*
  2497			 * For nested guests, we don't do anything specific
  2498			 * for single context invalidation. Hence, only advertise
  2499			 * support for global context invalidation.
  2500			 */
  2501			vmx->nested.nested_vmx_ept_vpid_caps |= VMX_EPT_EXTENT_GLOBAL_BIT;
> 2502			vmx->nested.nested_vmx_ept_vpid_caps |= (unsigned long)vmx_capability.vpid << 32;
  2503		} else
  2504			vmx->nested.nested_vmx_ept_vpid_caps = 0;
  2505	
  2506		if (enable_unrestricted_guest)
  2507			vmx->nested.nested_vmx_secondary_ctls_high |=
  2508				SECONDARY_EXEC_UNRESTRICTED_GUEST;
  2509	
  2510		/* miscellaneous data */

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

Attachment: .config.gz
Description: Binary data


[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