lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201703161558.dkk9XW6R%fengguang.wu@intel.com>
Date:   Thu, 16 Mar 2017 15:34:41 +0800
From:   kbuild test robot <lkp@...el.com>
To:     "Michael S. Tsirkin" <mst@...hat.com>
Cc:     kbuild-all@...org, linux-kernel@...r.kernel.org,
        "Gabriel L. Somlo" <gsomlo@...il.com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Radim Krčmář <rkrcmar@...hat.com>,
        Jonathan Corbet <corbet@....net>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        Joerg Roedel <joro@...tes.org>, kvm@...r.kernel.org,
        linux-doc@...r.kernel.org
Subject: Re: [PATCH v4] kvm: better MWAIT emulation for guests

Hi Michael,

[auto build test WARNING on kvm/linux-next]
[also build test WARNING on v4.11-rc2 next-20170310]
[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/Michael-S-Tsirkin/kvm-better-MWAIT-emulation-for-guests/20170316-143518
base:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git linux-next
config: i386-randconfig-x018-201711 (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=i386 

All warnings (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/kvm_host.h:9,
                    from arch/x86/kvm/x86.c:22:
   arch/x86/kvm/x86.h: In function 'kvm_mwait_in_guest':
   arch/x86/kvm/x86.h:231:34: error: 'CPUID_MWAIT_LEAF' undeclared (first use in this function)
     if (boot_cpu_data.cpuid_level < CPUID_MWAIT_LEAF)
                                     ^
   include/linux/compiler.h:160:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> arch/x86/kvm/x86.h:231:2: note: in expansion of macro 'if'
     if (boot_cpu_data.cpuid_level < CPUID_MWAIT_LEAF)
     ^~
   arch/x86/kvm/x86.h:231:34: note: each undeclared identifier is reported only once for each function it appears in
     if (boot_cpu_data.cpuid_level < CPUID_MWAIT_LEAF)
                                     ^
   include/linux/compiler.h:160:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> arch/x86/kvm/x86.h:231:2: note: in expansion of macro 'if'
     if (boot_cpu_data.cpuid_level < CPUID_MWAIT_LEAF)
     ^~
   In file included from arch/x86/kvm/x86.c:28:0:
   arch/x86/kvm/x86.h:234:45: error: 'mwait_substates' undeclared (first use in this function)
     cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &mwait_substates);
                                                ^~~~~~~~~~~~~~~
   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/kvm_host.h:9,
                    from arch/x86/kvm/x86.c:22:
   arch/x86/kvm/x86.h:236:14: error: 'CPUID5_ECX_INTERRUPT_BREAK' undeclared (first use in this function)
     if (!(ecx & CPUID5_ECX_INTERRUPT_BREAK))
                 ^
   include/linux/compiler.h:160:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
   arch/x86/kvm/x86.h:236:2: note: in expansion of macro 'if'
     if (!(ecx & CPUID5_ECX_INTERRUPT_BREAK))
     ^~
   In file included from arch/x86/kvm/x86.c:28:0:
   arch/x86/kvm/x86.h:238:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
--
   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/mmu.c:21:
   arch/x86/kvm/x86.h: In function 'kvm_mwait_in_guest':
   arch/x86/kvm/x86.h:231:34: error: 'CPUID_MWAIT_LEAF' undeclared (first use in this function)
     if (boot_cpu_data.cpuid_level < CPUID_MWAIT_LEAF)
                                     ^
   include/linux/compiler.h:160:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> arch/x86/kvm/x86.h:231:2: note: in expansion of macro 'if'
     if (boot_cpu_data.cpuid_level < CPUID_MWAIT_LEAF)
     ^~
   arch/x86/kvm/x86.h:231:34: note: each undeclared identifier is reported only once for each function it appears in
     if (boot_cpu_data.cpuid_level < CPUID_MWAIT_LEAF)
                                     ^
   include/linux/compiler.h:160:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> arch/x86/kvm/x86.h:231:2: note: in expansion of macro 'if'
     if (boot_cpu_data.cpuid_level < CPUID_MWAIT_LEAF)
     ^~
   In file included from arch/x86/kvm/mmu.c:23:0:
   arch/x86/kvm/x86.h:234:45: error: 'mwait_substates' undeclared (first use in this function)
     cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &mwait_substates);
                                                ^~~~~~~~~~~~~~~
   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/mmu.c:21:
   arch/x86/kvm/x86.h:236:14: error: 'CPUID5_ECX_INTERRUPT_BREAK' undeclared (first use in this function)
     if (!(ecx & CPUID5_ECX_INTERRUPT_BREAK))
                 ^
   include/linux/compiler.h:160:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
   arch/x86/kvm/x86.h:236:2: note: in expansion of macro 'if'
     if (!(ecx & CPUID5_ECX_INTERRUPT_BREAK))
     ^~
   In file included from arch/x86/kvm/mmu.c:23:0:
   At top level:
   arch/x86/kvm/x86.h:216:13: warning: 'kvm_mwait_in_guest' defined but not used [-Wunused-function]
    static bool kvm_mwait_in_guest(void)
                ^~~~~~~~~~~~~~~~~~

vim +/if +231 arch/x86/kvm/x86.h

   215	
   216	static bool kvm_mwait_in_guest(void)
   217	{
   218		unsigned int eax, ebx, ecx;
   219	
   220		if (!cpu_has(&boot_cpu_data, X86_FEATURE_MWAIT))
   221			return -ENODEV;
   222	
   223		if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)
   224			return -ENODEV;
   225	
   226		/*
   227		 * Intel CPUs without CPUID5_ECX_INTERRUPT_BREAK are problematic as
   228		 * they would allow guest to stop the CPU completely by disabling
   229		 * interrupts then invoking MWAIT.
   230		 */
 > 231		if (boot_cpu_data.cpuid_level < CPUID_MWAIT_LEAF)
   232			return -ENODEV;
   233	
   234		cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &mwait_substates);
   235	
   236		if (!(ecx & CPUID5_ECX_INTERRUPT_BREAK))
   237			return -ENODEV;
   238	}
   239	

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

Download attachment ".config.gz" of type "application/gzip" (32586 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ