tree:
https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git x86/entry
head: 5c8d5a67cdc4a03d2c383cb4e70375c2da1eb5eb
commit: 36e542056fc9af793328f226b87e02a4c008975e [16/21] x86/kvm: Use generic exit to
guest work function
config: x86_64-rhel-7.6-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
git checkout 36e542056fc9af793328f226b87e02a4c008975e
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from arch/x86/kvm/x86.c:58:
include/linux/entry-common.h: In function '__exit_to_guest_mode_work_pending':
> include/linux/entry-common.h:406:3: error:
'_TIF_NEED_RESCHED_MASK' undeclared (first use in this function); did you mean
'TIF_NEED_RESCHED'?
406 | (_TIF_NEED_RESCHED_MASK | _TIF_SIGPENDING |
\
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:452:22: note: in expansion of macro
'EXIT_TO_GUEST_MODE_WORK'
452 | return !!(ti_work & EXIT_TO_GUEST_MODE_WORK);
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:406:3: note: each undeclared identifier is reported only
once for each function it appears in
406 | (_TIF_NEED_RESCHED_MASK | _TIF_SIGPENDING | \
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:452:22: note: in expansion of macro
'EXIT_TO_GUEST_MODE_WORK'
452 | return !!(ti_work & EXIT_TO_GUEST_MODE_WORK);
| ^~~~~~~~~~~~~~~~~~~~~~~
> include/linux/entry-common.h:453:1: warning: control reaches end
of non-void function [-Wreturn-type]
453 | }
| ^
--
In file included from arch/x86/include/asm/idtentry.h:9,
from arch/x86/include/asm/traps.h:9,
from arch/x86/kernel/traps.c:48:
include/linux/entry-common.h: In function '__exit_to_guest_mode_work_pending':
> include/linux/entry-common.h:406:3: error:
'_TIF_NEED_RESCHED_MASK' undeclared (first use in this function); did you mean
'TIF_NEED_RESCHED'?
406 | (_TIF_NEED_RESCHED_MASK | _TIF_SIGPENDING |
\
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:452:22: note: in expansion of macro
'EXIT_TO_GUEST_MODE_WORK'
452 | return !!(ti_work & EXIT_TO_GUEST_MODE_WORK);
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:406:3: note: each undeclared identifier is reported only
once for each function it appears in
406 | (_TIF_NEED_RESCHED_MASK | _TIF_SIGPENDING | \
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:452:22: note: in expansion of macro
'EXIT_TO_GUEST_MODE_WORK'
452 | return !!(ti_work & EXIT_TO_GUEST_MODE_WORK);
| ^~~~~~~~~~~~~~~~~~~~~~~
--
In file included from arch/x86/entry/common.c:13:
include/linux/entry-common.h: In function '__exit_to_guest_mode_work_pending':
> include/linux/entry-common.h:406:3: error:
'_TIF_NEED_RESCHED_MASK' undeclared (first use in this function); did you mean
'TIF_NEED_RESCHED'?
406 | (_TIF_NEED_RESCHED_MASK | _TIF_SIGPENDING |
\
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:452:22: note: in expansion of macro
'EXIT_TO_GUEST_MODE_WORK'
452 | return !!(ti_work & EXIT_TO_GUEST_MODE_WORK);
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:406:3: note: each undeclared identifier is reported only
once for each function it appears in
406 | (_TIF_NEED_RESCHED_MASK | _TIF_SIGPENDING | \
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:452:22: note: in expansion of macro
'EXIT_TO_GUEST_MODE_WORK'
452 | return !!(ti_work & EXIT_TO_GUEST_MODE_WORK);
| ^~~~~~~~~~~~~~~~~~~~~~~
arch/x86/entry/common.c: At top level:
arch/x86/entry/common.c:210:24: warning: no previous prototype for
'do_SYSENTER_32' [-Wmissing-prototypes]
210 | __visible noinstr long do_SYSENTER_32(struct pt_regs *regs)
| ^~~~~~~~~~~~~~
arch/x86/entry/common.c:273:24: warning: no previous prototype for
'xen_pv_evtchn_do_upcall' [-Wmissing-prototypes]
273 | __visible noinstr void xen_pv_evtchn_do_upcall(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~~~~~~~
--
In file included from arch/x86/include/asm/idtentry.h:9,
from arch/x86/include/asm/traps.h:9,
from arch/x86/xen/enlighten_pv.c:62:
include/linux/entry-common.h: In function '__exit_to_guest_mode_work_pending':
> include/linux/entry-common.h:406:3: error:
'_TIF_NEED_RESCHED_MASK' undeclared (first use in this function); did you mean
'TIF_NEED_RESCHED'?
406 | (_TIF_NEED_RESCHED_MASK | _TIF_SIGPENDING |
\
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:452:22: note: in expansion of macro
'EXIT_TO_GUEST_MODE_WORK'
452 | return !!(ti_work & EXIT_TO_GUEST_MODE_WORK);
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:406:3: note: each undeclared identifier is reported only
once for each function it appears in
406 | (_TIF_NEED_RESCHED_MASK | _TIF_SIGPENDING | \
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:452:22: note: in expansion of macro
'EXIT_TO_GUEST_MODE_WORK'
452 | return !!(ti_work & EXIT_TO_GUEST_MODE_WORK);
| ^~~~~~~~~~~~~~~~~~~~~~~
arch/x86/xen/enlighten_pv.c: At top level:
arch/x86/xen/enlighten_pv.c:1231:34: warning: no previous prototype for
'xen_start_kernel' [-Wmissing-prototypes]
1231 | asmlinkage __visible void __init xen_start_kernel(void)
| ^~~~~~~~~~~~~~~~
--
In file included from arch/x86/include/asm/idtentry.h:9,
from arch/x86/xen/smp_pv.c:29:
include/linux/entry-common.h: In function '__exit_to_guest_mode_work_pending':
> include/linux/entry-common.h:406:3: error:
'_TIF_NEED_RESCHED_MASK' undeclared (first use in this function); did you mean
'TIF_NEED_RESCHED'?
406 | (_TIF_NEED_RESCHED_MASK | _TIF_SIGPENDING |
\
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:452:22: note: in expansion of macro
'EXIT_TO_GUEST_MODE_WORK'
452 | return !!(ti_work & EXIT_TO_GUEST_MODE_WORK);
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:406:3: note: each undeclared identifier is reported only
once for each function it appears in
406 | (_TIF_NEED_RESCHED_MASK | _TIF_SIGPENDING | \
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:452:22: note: in expansion of macro
'EXIT_TO_GUEST_MODE_WORK'
452 | return !!(ti_work & EXIT_TO_GUEST_MODE_WORK);
| ^~~~~~~~~~~~~~~~~~~~~~~
arch/x86/xen/smp_pv.c: At top level:
arch/x86/xen/smp_pv.c:92:27: warning: no previous prototype for
'cpu_bringup_and_idle' [-Wmissing-prototypes]
92 | asmlinkage __visible void cpu_bringup_and_idle(void)
| ^~~~~~~~~~~~~~~~~~~~
--
In file included from arch/x86/include/asm/idtentry.h:9,
from arch/x86/include/asm/traps.h:9,
from arch/x86/mm/extable.c:8:
include/linux/entry-common.h: In function '__exit_to_guest_mode_work_pending':
> include/linux/entry-common.h:406:3: error:
'_TIF_NEED_RESCHED_MASK' undeclared (first use in this function); did you mean
'TIF_NEED_RESCHED'?
406 | (_TIF_NEED_RESCHED_MASK | _TIF_SIGPENDING |
\
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:452:22: note: in expansion of macro
'EXIT_TO_GUEST_MODE_WORK'
452 | return !!(ti_work & EXIT_TO_GUEST_MODE_WORK);
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:406:3: note: each undeclared identifier is reported only
once for each function it appears in
406 | (_TIF_NEED_RESCHED_MASK | _TIF_SIGPENDING | \
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:452:22: note: in expansion of macro
'EXIT_TO_GUEST_MODE_WORK'
452 | return !!(ti_work & EXIT_TO_GUEST_MODE_WORK);
| ^~~~~~~~~~~~~~~~~~~~~~~
arch/x86/mm/extable.c: At top level:
arch/x86/mm/extable.c:26:16: warning: no previous prototype for
'ex_handler_default' [-Wmissing-prototypes]
26 | __visible bool ex_handler_default(const struct exception_table_entry *fixup,
| ^~~~~~~~~~~~~~~~~~
arch/x86/mm/extable.c:36:16: warning: no previous prototype for
'ex_handler_fault' [-Wmissing-prototypes]
36 | __visible bool ex_handler_fault(const struct exception_table_entry *fixup,
| ^~~~~~~~~~~~~~~~
arch/x86/mm/extable.c:57:16: warning: no previous prototype for
'ex_handler_fprestore' [-Wmissing-prototypes]
57 | __visible bool ex_handler_fprestore(const struct exception_table_entry *fixup,
| ^~~~~~~~~~~~~~~~~~~~
arch/x86/mm/extable.c:72:16: warning: no previous prototype for
'ex_handler_uaccess' [-Wmissing-prototypes]
72 | __visible bool ex_handler_uaccess(const struct exception_table_entry *fixup,
| ^~~~~~~~~~~~~~~~~~
arch/x86/mm/extable.c:83:16: warning: no previous prototype for
'ex_handler_rdmsr_unsafe' [-Wmissing-prototypes]
83 | __visible bool ex_handler_rdmsr_unsafe(const struct exception_table_entry
*fixup,
| ^~~~~~~~~~~~~~~~~~~~~~~
arch/x86/mm/extable.c:100:16: warning: no previous prototype for
'ex_handler_wrmsr_unsafe' [-Wmissing-prototypes]
100 | __visible bool ex_handler_wrmsr_unsafe(const struct exception_table_entry
*fixup,
| ^~~~~~~~~~~~~~~~~~~~~~~
arch/x86/mm/extable.c:116:16: warning: no previous prototype for
'ex_handler_clear_fs' [-Wmissing-prototypes]
116 | __visible bool ex_handler_clear_fs(const struct exception_table_entry *fixup,
| ^~~~~~~~~~~~~~~~~~~
--
In file included from kernel/entry/common.c:4:
include/linux/entry-common.h: In function '__exit_to_guest_mode_work_pending':
> include/linux/entry-common.h:406:3: error:
'_TIF_NEED_RESCHED_MASK' undeclared (first use in this function); did you mean
'TIF_NEED_RESCHED'?
406 | (_TIF_NEED_RESCHED_MASK | _TIF_SIGPENDING |
\
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:452:22: note: in expansion of macro
'EXIT_TO_GUEST_MODE_WORK'
452 | return !!(ti_work & EXIT_TO_GUEST_MODE_WORK);
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:406:3: note: each undeclared identifier is reported only
once for each function it appears in
406 | (_TIF_NEED_RESCHED_MASK | _TIF_SIGPENDING | \
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:452:22: note: in expansion of macro
'EXIT_TO_GUEST_MODE_WORK'
452 | return !!(ti_work & EXIT_TO_GUEST_MODE_WORK);
| ^~~~~~~~~~~~~~~~~~~~~~~
kernel/entry/common.c: In function 'exit_to_guest_mode_work':
> kernel/entry/common.c:376:17: error:
'_TIF_NEED_RESCHED_MASK' undeclared (first use in this function); did you mean
'TIF_NEED_RESCHED'?
376 | if (ti_work & _TIF_NEED_RESCHED_MASK)
{
| ^~~~~~~~~~~~~~~~~~~~~~
| TIF_NEED_RESCHED
> kernel/entry/common.c:393:1: error: expected 'while'
before 'int'
393 | int exit_to_guest_mode(struct kvm_vcpu *vcpu)
| ^~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from arch/x86/include/asm/percpu.h:45,
from arch/x86/include/asm/current.h:6,
from include/linux/sched.h:12,
from include/linux/context_tracking.h:5,
from kernel/entry/common.c:3:
> include/linux/export.h:98:2: warning: ISO C90 forbids mixed
declarations and code [-Wdeclaration-after-statement]
98 | extern typeof(sym)
sym; \
| ^~~~~~
include/linux/export.h:147:39: note: in expansion of macro '___EXPORT_SYMBOL'
147 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
159 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
| ^~~~~~~~~~~~~~
kernel/entry/common.c:411:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
411 | EXPORT_SYMBOL_GPL(exit_to_guest_mode);
| ^~~~~~~~~~~~~~~~~
In file included from arch/x86/include/asm/current.h:5,
from include/linux/sched.h:12,
from include/linux/context_tracking.h:5,
from kernel/entry/common.c:3:
> include/linux/compiler.h:343:2: warning: ISO C90 forbids mixed
declarations and code [-Wdeclaration-after-statement]
343 | static void *
__section(.discard.addressable) __used \
| ^~~~~~
include/linux/export.h:51:2: note: in expansion of macro '__ADDRESSABLE'
51 | __ADDRESSABLE(sym) \
| ^~~~~~~~~~~~~
include/linux/export.h:108:2: note: in expansion of macro '__KSYMTAB_ENTRY'
108 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
include/linux/export.h:147:39: note: in expansion of macro '___EXPORT_SYMBOL'
147 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
159 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
| ^~~~~~~~~~~~~~
kernel/entry/common.c:411:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
411 | EXPORT_SYMBOL_GPL(exit_to_guest_mode);
| ^~~~~~~~~~~~~~~~~
> kernel/entry/common.c:411:1: error: expected declaration or
statement at end of input
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from arch/x86/include/asm/percpu.h:45,
from arch/x86/include/asm/current.h:6,
from include/linux/sched.h:12,
from include/linux/context_tracking.h:5,
from kernel/entry/common.c:3:
include/linux/export.h:100:20: warning: unused variable
'__kstrtabns_exit_to_guest_mode' [-Wunused-variable]
100 | extern const char __kstrtabns_##sym[]; \
| ^~~~~~~~~~~~
include/linux/export.h:147:39: note: in expansion of macro '___EXPORT_SYMBOL'
147 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
159 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
| ^~~~~~~~~~~~~~
kernel/entry/common.c:411:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
411 | EXPORT_SYMBOL_GPL(exit_to_guest_mode);
| ^~~~~~~~~~~~~~~~~
include/linux/export.h:99:20: warning: unused variable
'__kstrtab_exit_to_guest_mode' [-Wunused-variable]
99 | extern const char __kstrtab_##sym[]; \
| ^~~~~~~~~~
include/linux/export.h:147:39: note: in expansion of macro '___EXPORT_SYMBOL'
147 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
159 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
| ^~~~~~~~~~~~~~
kernel/entry/common.c:411:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
411 | EXPORT_SYMBOL_GPL(exit_to_guest_mode);
| ^~~~~~~~~~~~~~~~~
At top level:
kernel/entry/common.c:366:12: warning: 'exit_to_guest_mode_work' defined but
not used [-Wunused-function]
366 | static int exit_to_guest_mode_work(struct kvm_vcpu *vcpu, unsigned long
ti_work)
| ^~~~~~~~~~~~~~~~~~~~~~~
--
In file included from arch/x86/include/asm/idtentry.h:9,
from arch/x86/include/asm/traps.h:9,
from arch/x86/kernel/cpu/intel.c:24:
include/linux/entry-common.h: In function '__exit_to_guest_mode_work_pending':
> include/linux/entry-common.h:406:3: error:
'_TIF_NEED_RESCHED_MASK' undeclared (first use in this function); did you mean
'TIF_NEED_RESCHED'?
406 | (_TIF_NEED_RESCHED_MASK | _TIF_SIGPENDING |
\
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:452:22: note: in expansion of macro
'EXIT_TO_GUEST_MODE_WORK'
452 | return !!(ti_work & EXIT_TO_GUEST_MODE_WORK);
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:406:3: note: each undeclared identifier is reported only
once for each function it appears in
406 | (_TIF_NEED_RESCHED_MASK | _TIF_SIGPENDING | \
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:452:22: note: in expansion of macro
'EXIT_TO_GUEST_MODE_WORK'
452 | return !!(ti_work & EXIT_TO_GUEST_MODE_WORK);
| ^~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/cpu/intel.c: In function 'init_intel':
arch/x86/kernel/cpu/intel.c:642:20: warning: variable 'l2' set but not used
[-Wunused-but-set-variable]
642 | unsigned int l1, l2;
| ^~
--
In file included from arch/x86/kvm/vmx/vmx.c:30:
include/linux/entry-common.h: In function '__exit_to_guest_mode_work_pending':
> include/linux/entry-common.h:406:3: error:
'_TIF_NEED_RESCHED_MASK' undeclared (first use in this function); did you mean
'TIF_NEED_RESCHED'?
406 | (_TIF_NEED_RESCHED_MASK | _TIF_SIGPENDING |
\
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:452:22: note: in expansion of macro
'EXIT_TO_GUEST_MODE_WORK'
452 | return !!(ti_work & EXIT_TO_GUEST_MODE_WORK);
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:406:3: note: each undeclared identifier is reported only
once for each function it appears in
406 | (_TIF_NEED_RESCHED_MASK | _TIF_SIGPENDING | \
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/entry-common.h:452:22: note: in expansion of macro
'EXIT_TO_GUEST_MODE_WORK'
452 | return !!(ti_work & EXIT_TO_GUEST_MODE_WORK);
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/x86/kvm/vmx/vmx.c:51:
arch/x86/kvm/vmx/capabilities.h: At top level:
arch/x86/kvm/vmx/capabilities.h:7:10: fatal error: lapic.h: No such file or directory
7 | #include "lapic.h"
| ^~~~~~~~~
compilation terminated.
vim +406 include/linux/entry-common.h
1adc6c0ca59cff Thomas Gleixner 2019-10-23 404
1adc6c0ca59cff Thomas Gleixner 2019-10-23 405 #define EXIT_TO_GUEST_MODE_WORK \
1adc6c0ca59cff Thomas Gleixner 2019-10-23 @406 (_TIF_NEED_RESCHED_MASK | _TIF_SIGPENDING
| \
1adc6c0ca59cff Thomas Gleixner 2019-10-23 407 _TIF_NOTIFY_RESUME |
ARCH_EXIT_TO_GUEST_MODE_WORK)
1adc6c0ca59cff Thomas Gleixner 2019-10-23 408
1adc6c0ca59cff Thomas Gleixner 2019-10-23 409 struct kvm_vcpu;
1adc6c0ca59cff Thomas Gleixner 2019-10-23 410
1adc6c0ca59cff Thomas Gleixner 2019-10-23 411 /**
1adc6c0ca59cff Thomas Gleixner 2019-10-23 412 * arch_exit_to_guest_mode_work -
Architecture specific exit to guest mode
1adc6c0ca59cff Thomas Gleixner 2019-10-23 413 * work function.
1adc6c0ca59cff Thomas Gleixner 2019-10-23 414 * @vcpu: Pointer to current's VCPU
data
1adc6c0ca59cff Thomas Gleixner 2019-10-23 415 * @ti_work: Cached TIF flags gathered in
exit_to_guest_mode()
1adc6c0ca59cff Thomas Gleixner 2019-10-23 416 *
1adc6c0ca59cff Thomas Gleixner 2019-10-23 417 * Invoked from exit_to_guest_mode_work().
Defaults to NOOP. Can be
1adc6c0ca59cff Thomas Gleixner 2019-10-23 418 * replaced by architecture specific
code.
1adc6c0ca59cff Thomas Gleixner 2019-10-23 419 */
1adc6c0ca59cff Thomas Gleixner 2019-10-23 420 static inline int
arch_exit_to_guest_mode_work(struct kvm_vcpu *vcpu,
1adc6c0ca59cff Thomas Gleixner 2019-10-23 421 unsigned long ti_work);
1adc6c0ca59cff Thomas Gleixner 2019-10-23 422
1adc6c0ca59cff Thomas Gleixner 2019-10-23 423 #ifndef arch_exit_to_guest_mode_work
1adc6c0ca59cff Thomas Gleixner 2019-10-23 424 static inline int
arch_exit_to_guest_mode_work(struct kvm_vcpu *vcpu,
1adc6c0ca59cff Thomas Gleixner 2019-10-23 425 unsigned long ti_work)
1adc6c0ca59cff Thomas Gleixner 2019-10-23 426 {
1adc6c0ca59cff Thomas Gleixner 2019-10-23 427 return 0;
1adc6c0ca59cff Thomas Gleixner 2019-10-23 428 }
1adc6c0ca59cff Thomas Gleixner 2019-10-23 429 #endif
1adc6c0ca59cff Thomas Gleixner 2019-10-23 430
1adc6c0ca59cff Thomas Gleixner 2019-10-23 431 /**
1adc6c0ca59cff Thomas Gleixner 2019-10-23 432 * exit_to_guest_mode - Check and handle
pending work which needs to be
1adc6c0ca59cff Thomas Gleixner 2019-10-23 433 * handled before returning to guest
mode
1adc6c0ca59cff Thomas Gleixner 2019-10-23 434 * @vcpu: Pointer to current's VCPU
data
1adc6c0ca59cff Thomas Gleixner 2019-10-23 435 *
1adc6c0ca59cff Thomas Gleixner 2019-10-23 436 * Returns: 0 or an error code
1adc6c0ca59cff Thomas Gleixner 2019-10-23 437 */
1adc6c0ca59cff Thomas Gleixner 2019-10-23 438 int exit_to_guest_mode(struct kvm_vcpu
*vcpu);
1adc6c0ca59cff Thomas Gleixner 2019-10-23 439
1adc6c0ca59cff Thomas Gleixner 2019-10-23 440 /**
1adc6c0ca59cff Thomas Gleixner 2019-10-23 441 * __exit_to_guest_mode_work_pending -
Check if work is pending
1adc6c0ca59cff Thomas Gleixner 2019-10-23 442 *
1adc6c0ca59cff Thomas Gleixner 2019-10-23 443 * Returns: True if work pending, False
otherwise.
1adc6c0ca59cff Thomas Gleixner 2019-10-23 444 *
1adc6c0ca59cff Thomas Gleixner 2019-10-23 445 * Bare variant of
exit_to_guest_mode_work_pending(). Can be called from
1adc6c0ca59cff Thomas Gleixner 2019-10-23 446 * interrupt enabled code for racy quick
checks with care.
1adc6c0ca59cff Thomas Gleixner 2019-10-23 447 */
1adc6c0ca59cff Thomas Gleixner 2019-10-23 448 static inline bool
__exit_to_guest_mode_work_pending(void)
1adc6c0ca59cff Thomas Gleixner 2019-10-23 449 {
1adc6c0ca59cff Thomas Gleixner 2019-10-23 450 unsigned long ti_work =
READ_ONCE(current_thread_info()->flags);
1adc6c0ca59cff Thomas Gleixner 2019-10-23 451
1adc6c0ca59cff Thomas Gleixner 2019-10-23 @452 return !!(ti_work &
EXIT_TO_GUEST_MODE_WORK);
1adc6c0ca59cff Thomas Gleixner 2019-10-23 @453 }
1adc6c0ca59cff Thomas Gleixner 2019-10-23 454
:::::: The code at line 406 was first introduced by commit
:::::: 1adc6c0ca59cff49d0e9da4e959157d811eaf809 entry: Provide infrastructure for work
before entering a guest
:::::: TO: Thomas Gleixner <tglx(a)linutronix.de>
:::::: CC: Thomas Gleixner <tglx(a)linutronix.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org