Re: [PATCH 2/3] kvm: nVMX: Validate the I/O bitmaps on nested VM-entry

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

 



Hi Jim,

[auto build test ERROR on kvm/linux-next]
[also build test ERROR on v4.12 next-20170707]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Jim-Mattson/kvm-nVMX-Don-t-set-vmcs12-to-launched-when-VMLAUNCH-fails/20170708-143456
base:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git linux-next
config: x86_64-randconfig-x018-201727 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

Note: the linux-review/Jim-Mattson/kvm-nVMX-Don-t-set-vmcs12-to-launched-when-VMLAUNCH-fails/20170708-143456 HEAD 34a49303d38afcc4d67de2391b2fa3aa769e458a builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/mm_types_task.h:10,
                    from include/linux/mm_types.h:4,
                    from arch/x86/kvm/irq.h:25,
                    from arch/x86/kvm/vmx.c:19:
   arch/x86/kvm/vmx.c: In function 'nested_vmx_check_io_bitmap_controls':
>> arch/x86/kvm/vmx.c:9580:7: error: implicit declaration of function 'page_address_valid' [-Werror=implicit-function-declaration]
     if (!page_address_valid(vcpu, vmcs12->io_bitmap_a) ||
          ^
   include/linux/compiler.h:160:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
   arch/x86/kvm/vmx.c:9580:2: note: in expansion of macro 'if'
     if (!page_address_valid(vcpu, vmcs12->io_bitmap_a) ||
     ^~
   Cyclomatic Complexity 5 include/linux/compiler.h:__read_once_size
   Cyclomatic Complexity 5 include/linux/compiler.h:__write_once_size
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:atomic_read
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:atomic_dec_and_test
   Cyclomatic Complexity 3 arch/x86/include/asm/bitops.h:set_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:__set_bit
   Cyclomatic Complexity 3 arch/x86/include/asm/bitops.h:clear_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:__clear_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:test_and_set_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:test_and_clear_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:constant_test_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:variable_test_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:fls
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:fls64
   Cyclomatic Complexity 1 include/linux/log2.h:__ilog2_u32
   Cyclomatic Complexity 1 include/linux/log2.h:__ilog2_u64
   Cyclomatic Complexity 2 arch/x86/include/asm/jump_label.h:arch_static_branch
   Cyclomatic Complexity 1 include/linux/jump_label.h:static_key_false
   Cyclomatic Complexity 1 include/linux/cpumask.h:cpumask_check
   Cyclomatic Complexity 1 include/linux/cpumask.h:cpumask_set_cpu
   Cyclomatic Complexity 1 include/linux/cpumask.h:cpumask_clear_cpu
   Cyclomatic Complexity 1 include/linux/cpumask.h:cpumask_test_cpu
   Cyclomatic Complexity 1 include/linux/cpumask.h:get_cpu_mask
   Cyclomatic Complexity 1 include/asm-generic/getorder.h:__get_order
   Cyclomatic Complexity 1 include/linux/list.h:INIT_LIST_HEAD
   Cyclomatic Complexity 1 include/linux/list.h:__list_del
   Cyclomatic Complexity 1 arch/x86/include/asm/current.h:get_current
   Cyclomatic Complexity 1 arch/x86/include/asm/segment.h:__loadsegment_fs
   Cyclomatic Complexity 1 arch/x86/include/asm/msr.h:rdtsc
   Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:__cpuid
   Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:paravirt_get_debugreg
   Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:read_cr0
   Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:read_cr3
   Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:__write_cr4
   Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:paravirt_read_msr
   Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:paravirt_write_msr
   Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:paravirt_read_msr_safe
   Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:paravirt_write_msr_safe
   Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:wrmsrl
   Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:rdmsrl_safe
   Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:load_TR_desc
   Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:load_gs_index
   Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:write_gdt_entry
   Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:arch_local_save_flags
   Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:arch_local_irq_disable
   Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:arch_local_irq_enable
   Cyclomatic Complexity 1 arch/x86/include/asm/special_insns.h:__read_pkru
   Cyclomatic Complexity 1 arch/x86/include/asm/special_insns.h:__write_pkru
   Cyclomatic Complexity 1 include/linux/err.h:ERR_PTR
   Cyclomatic Complexity 1 arch/x86/include/asm/irqflags.h:arch_irqs_disabled_flags
   Cyclomatic Complexity 1 arch/x86/include/asm/processor.h:cpuid
   Cyclomatic Complexity 1 arch/x86/include/asm/processor.h:cpuid_eax
   Cyclomatic Complexity 1 arch/x86/include/asm/processor.h:cpuid_ecx
   Cyclomatic Complexity 1 arch/x86/include/asm/processor.h:get_debugctlmsr
   Cyclomatic Complexity 1 arch/x86/include/asm/processor.h:update_debugctlmsr
   Cyclomatic Complexity 1 arch/x86/include/asm/preempt.h:preempt_count
   Cyclomatic Complexity 7 arch/x86/include/asm/preempt.h:__preempt_count_add
   Cyclomatic Complexity 7 arch/x86/include/asm/preempt.h:__preempt_count_sub
   Cyclomatic Complexity 1 include/linux/spinlock.h:spinlock_check
   Cyclomatic Complexity 1 include/linux/spinlock.h:spin_lock
   Cyclomatic Complexity 1 include/linux/spinlock.h:spin_unlock
   Cyclomatic Complexity 1 include/linux/spinlock.h:spin_unlock_irqrestore
   Cyclomatic Complexity 1 include/linux/ktime.h:ns_to_ktime
   Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_read_lock_sched_notrace
   Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_read_unlock_sched_notrace
   Cyclomatic Complexity 1 include/linux/nodemask.h:node_state
   Cyclomatic Complexity 1 arch/x86/include/asm/topology.h:numa_node_id
   Cyclomatic Complexity 1 arch/x86/include/asm/apic.h:x2apic_enabled
   Cyclomatic Complexity 1 include/linux/topology.h:numa_mem_id
   Cyclomatic Complexity 1 include/linux/gfp.h:gfp_zonelist
   Cyclomatic Complexity 1 include/linux/gfp.h:node_zonelist
   Cyclomatic Complexity 1 include/linux/sched.h:task_tgid_nr
   Cyclomatic Complexity 1 include/linux/sched.h:task_thread_info
   Cyclomatic Complexity 1 include/linux/sched.h:need_resched
   Cyclomatic Complexity 1 include/linux/page_ref.h:page_ref_count
   Cyclomatic Complexity 1 include/linux/page_ref.h:page_ref_dec_and_test
   Cyclomatic Complexity 2 arch/x86/include/asm/pgtable.h:read_pkru
   Cyclomatic Complexity 1 include/linux/mm.h:lowmem_page_address
   Cyclomatic Complexity 56 include/linux/slab.h:kmalloc_index
   Cyclomatic Complexity 68 include/linux/slab.h:kmalloc_large
   Cyclomatic Complexity 9 include/linux/slab.h:kmalloc
   Cyclomatic Complexity 1 arch/x86/include/asm/desc.h:get_current_gdt_rw
   Cyclomatic Complexity 1 arch/x86/include/asm/desc.h:get_cpu_gdt_ro_index
   Cyclomatic Complexity 1 arch/x86/include/asm/desc.h:get_cpu_gdt_ro
   Cyclomatic Complexity 1 arch/x86/include/asm/desc.h:get_current_gdt_ro
   Cyclomatic Complexity 1 arch/x86/include/asm/desc.h:native_store_idt
   Cyclomatic Complexity 1 arch/x86/include/asm/desc.h:force_reload_TR
   Cyclomatic Complexity 1 arch/x86/include/asm/kvm_host.h:kvm_read_ldt
   Cyclomatic Complexity 1 arch/x86/include/asm/kvm_host.h:kvm_load_ldt
   Cyclomatic Complexity 1 arch/x86/include/asm/kvm_host.h:read_msr
   Cyclomatic Complexity 1 arch/x86/include/asm/kvm_host.h:get_rdx_init_val
   Cyclomatic Complexity 1 arch/x86/include/asm/kvm_host.h:get_canonical

vim +/page_address_valid +9580 arch/x86/kvm/vmx.c

  9574	static int nested_vmx_check_io_bitmap_controls(struct kvm_vcpu *vcpu,
  9575						       struct vmcs12 *vmcs12)
  9576	{
  9577		if (!nested_cpu_has(vmcs12, CPU_BASED_USE_IO_BITMAPS))
  9578			return 0;
  9579	
> 9580		if (!page_address_valid(vcpu, vmcs12->io_bitmap_a) ||
  9581		    !page_address_valid(vcpu, vmcs12->io_bitmap_b))
  9582			return -EINVAL;
  9583	

---
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