[kvm:queue 1/3] arch/x86/include/asm/mmu_context.h:281:53: error: 'struct tlb_state' has no member named 'loaded_mm'

[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:   88147147d55cd3cd2ad8a7c9342d6c07c12405a6
commit: 455f536d6e80b5e31c477cb42af24374604fd80d [1/3] x86,kvm: Teach KVM's VMX code that CR3 isn't a constant
config: i386-tinyconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout 455f536d6e80b5e31c477cb42af24374604fd80d
        # save the attached .config to linux build tree
        make ARCH=i386 

All error/warnings (new ones prefixed by >>):

   In file included from arch/x86/include/asm/page.h:13:0,
                    from arch/x86/include/asm/thread_info.h:11,
                    from include/linux/thread_info.h:37,
                    from arch/x86/include/asm/preempt.h:6,
                    from include/linux/preempt.h:80,
                    from include/linux/spinlock.h:50,
                    from include/linux/rcupdate.h:38,
                    from include/linux/rculist.h:10,
                    from include/linux/pid.h:4,
                    from include/linux/sched.h:13,
                    from kernel///sched/core.c:8:
   arch/x86/include/asm/mmu_context.h: In function '__get_current_cr3_fast':
>> arch/x86/include/asm/mmu_context.h:281:53: error: 'struct tlb_state' has no member named 'loaded_mm'
     unsigned long cr3 = __pa(this_cpu_read(cpu_tlbstate.loaded_mm)->pgd);
                                                        ^
   arch/x86/include/asm/page_32.h:8:34: note: in definition of macro '__phys_addr_nodebug'
    #define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET)
                                     ^
>> arch/x86/include/asm/page.h:41:18: note: in expansion of macro '__phys_addr'
    #define __pa(x)  __phys_addr((unsigned long)(x))
                     ^~~~~~~~~~~
>> arch/x86/include/asm/mmu_context.h:281:22: note: in expansion of macro '__pa'
     unsigned long cr3 = __pa(this_cpu_read(cpu_tlbstate.loaded_mm)->pgd);
                         ^~~~
>> include/linux/percpu-defs.h:494:29: note: in expansion of macro '__pcpu_size_call_return'
    #define this_cpu_read(pcp)  __pcpu_size_call_return(this_cpu_read_, pcp)
                                ^~~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/include/asm/mmu_context.h:281:27: note: in expansion of macro 'this_cpu_read'
     unsigned long cr3 = __pa(this_cpu_read(cpu_tlbstate.loaded_mm)->pgd);
                              ^~~~~~~~~~~~~
>> arch/x86/include/asm/mmu_context.h:281:53: error: 'struct tlb_state' has no member named 'loaded_mm'
     unsigned long cr3 = __pa(this_cpu_read(cpu_tlbstate.loaded_mm)->pgd);
                                                        ^
   arch/x86/include/asm/page_32.h:8:34: note: in definition of macro '__phys_addr_nodebug'
    #define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET)
                                     ^
>> arch/x86/include/asm/page.h:41:18: note: in expansion of macro '__phys_addr'
    #define __pa(x)  __phys_addr((unsigned long)(x))
                     ^~~~~~~~~~~
>> arch/x86/include/asm/mmu_context.h:281:22: note: in expansion of macro '__pa'
     unsigned long cr3 = __pa(this_cpu_read(cpu_tlbstate.loaded_mm)->pgd);
                         ^~~~
>> include/linux/percpu-defs.h:306:2: note: in expansion of macro '__verify_pcpu_ptr'
     __verify_pcpu_ptr(&(variable));     \
     ^~~~~~~~~~~~~~~~~
>> include/linux/percpu-defs.h:494:29: note: in expansion of macro '__pcpu_size_call_return'
    #define this_cpu_read(pcp)  __pcpu_size_call_return(this_cpu_read_, pcp)
                                ^~~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/include/asm/mmu_context.h:281:27: note: in expansion of macro 'this_cpu_read'
     unsigned long cr3 = __pa(this_cpu_read(cpu_tlbstate.loaded_mm)->pgd);
                              ^~~~~~~~~~~~~
>> arch/x86/include/asm/mmu_context.h:281:53: error: 'struct tlb_state' has no member named 'loaded_mm'
     unsigned long cr3 = __pa(this_cpu_read(cpu_tlbstate.loaded_mm)->pgd);
                                                        ^
   arch/x86/include/asm/page_32.h:8:34: note: in definition of macro '__phys_addr_nodebug'
    #define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET)
                                     ^
>> arch/x86/include/asm/page.h:41:18: note: in expansion of macro '__phys_addr'
    #define __pa(x)  __phys_addr((unsigned long)(x))
                     ^~~~~~~~~~~
>> arch/x86/include/asm/mmu_context.h:281:22: note: in expansion of macro '__pa'
     unsigned long cr3 = __pa(this_cpu_read(cpu_tlbstate.loaded_mm)->pgd);
                         ^~~~
>> include/linux/percpu-defs.h:494:29: note: in expansion of macro '__pcpu_size_call_return'
    #define this_cpu_read(pcp)  __pcpu_size_call_return(this_cpu_read_, pcp)
                                ^~~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/include/asm/mmu_context.h:281:27: note: in expansion of macro 'this_cpu_read'
     unsigned long cr3 = __pa(this_cpu_read(cpu_tlbstate.loaded_mm)->pgd);
                              ^~~~~~~~~~~~~
>> arch/x86/include/asm/mmu_context.h:281:53: error: 'struct tlb_state' has no member named 'loaded_mm'
     unsigned long cr3 = __pa(this_cpu_read(cpu_tlbstate.loaded_mm)->pgd);
                                                        ^
   arch/x86/include/asm/page_32.h:8:34: note: in definition of macro '__phys_addr_nodebug'
    #define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET)
                                     ^
>> arch/x86/include/asm/page.h:41:18: note: in expansion of macro '__phys_addr'
    #define __pa(x)  __phys_addr((unsigned long)(x))
                     ^~~~~~~~~~~
>> arch/x86/include/asm/mmu_context.h:281:22: note: in expansion of macro '__pa'
     unsigned long cr3 = __pa(this_cpu_read(cpu_tlbstate.loaded_mm)->pgd);
                         ^~~~
>> arch/x86/include/asm/percpu.h:413:31: note: in expansion of macro 'percpu_from_op'
    #define this_cpu_read_1(pcp)  percpu_from_op("mov", pcp)
                                  ^~~~~~~~~~~~~~

vim +281 arch/x86/include/asm/mmu_context.h

   275	 *
   276	 * It's intended to be used for code like KVM that sneakily changes CR3
   277	 * and needs to restore it.  It needs to be used very carefully.
   278	 */
   279	static inline unsigned long __get_current_cr3_fast(void)
   280	{
 > 281		unsigned long cr3 = __pa(this_cpu_read(cpu_tlbstate.loaded_mm)->pgd);
   282	
   283		/* For now, be very restrictive about when this can be called. */
   284		VM_WARN_ON(in_nmi() || !in_atomic());

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