linux-stable/arch/s390/kvm
Longpeng(Mike) 199b5763d3 KVM: add spinlock optimization framework
If a vcpu exits due to request a user mode spinlock, then
the spinlock-holder may be preempted in user mode or kernel mode.
(Note that not all architectures trap spin loops in user mode,
only AMD x86 and ARM/ARM64 currently do).

But if a vcpu exits in kernel mode, then the holder must be
preempted in kernel mode, so we should choose a vcpu in kernel mode
as a more likely candidate for the lock holder.

This introduces kvm_arch_vcpu_in_kernel() to decide whether the
vcpu is in kernel-mode when it's preempted.  kvm_vcpu_on_spin's
new argument says the same of the spinning VCPU.

Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-08-08 10:57:43 +02:00
..
diag.c KVM: add spinlock optimization framework 2017-08-08 10:57:43 +02:00
gaccess.c PPC: 2017-07-06 18:38:31 -07:00
gaccess.h s390: rename psw_bits enums 2017-06-12 16:26:02 +02:00
guestdbg.c s390: rename psw_bits enums 2017-06-12 16:26:02 +02:00
intercept.c KVM: s390: Support keyless subset guest mode 2017-04-21 11:08:11 +02:00
interrupt.c PPC: 2017-07-06 18:38:31 -07:00
irq.h KVM: s390: irq routing for adapter interrupts. 2014-03-21 13:43:00 +01:00
Kconfig KVM: halt_polling: provide a way to qualify wakeups during poll 2016-05-13 17:29:23 +02:00
kvm-s390.c KVM: add spinlock optimization framework 2017-08-08 10:57:43 +02:00
kvm-s390.h KVM: s390: Inject machine check into the guest 2017-06-28 12:42:32 +02:00
Makefile KVM: s390: vsie: initial support for nested virtualization 2016-06-21 09:43:33 +02:00
priv.c PPC: 2017-07-06 18:38:31 -07:00
sigp.c KVM: s390: don't use CPUSTAT_WAIT to detect if a VCPU is idle 2016-06-21 09:43:45 +02:00
sthyi.c KVM: s390: Handle sthyi also for instruction intercept 2017-03-16 13:04:38 +01:00
trace-s390.h KVM: s390: introduce adapter interrupt inject function 2017-04-06 13:15:37 +02:00
trace.h KVM: s390: trace and count all skey intercepts 2016-06-10 12:07:31 +02:00
vsie.c KVM: s390: Inject machine check into the nested guest 2017-06-28 12:42:33 +02:00