lkml.org 
[lkml]   [2017]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2017-03-16 08:36    [W:0.086 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site