linux/arch/s390
David Hildenbrand db0758b297 KVM: s390: step VCPU cpu timer during kvm_run ioctl
Architecturally we should only provide steal time if we are scheduled
away, and not if the host interprets a guest exit. We have to step
the guest CPU timer in these cases.

In the first shot, we will step the VCPU timer only during the kvm_run
ioctl. Therefore all time spent e.g. in interception handlers or on irq
delivery will be accounted for that VCPU.

We have to take care of a few special cases:
- Other VCPUs can test for pending irqs. We can only report a consistent
  value for the VCPU thread itself when adding the delta.
- We have to take care of STP sync, therefore we have to extend
  kvm_clock_sync() and disable preemption accordingly
- During any call to disable/enable/start/stop we could get premeempted
  and therefore get start/stop calls. Therefore we have to make sure we
  don't get into an inconsistent state.

Whenever a VCPU is scheduled out, sleeping, in user space or just about
to enter the SIE, the guest cpu timer isn't stepped.

Please note that all primitives are prepared to be called from both
environments (cpu timer accounting enabled or not), although not completely
used in this patch yet (e.g. kvm_s390_set_cpu_timer() will never be called
while cpu timer accounting is enabled).

Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
2016-03-08 13:57:52 +01:00
..
appldata s390: appldata: drop owner assignment from platform_drivers 2014-10-20 16:20:13 +02:00
boot s390/boot/decompression: disable floating point in decompressor 2015-09-29 14:45:10 +02:00
configs s390/configs: update default configurations 2016-01-11 13:01:28 +01:00
crypto crypto: s390/sha - replace raw value by their coresponding define 2015-10-15 21:05:11 +08:00
hypfs wrappers for ->i_mutex access 2016-01-22 18:04:28 -05:00
include KVM: s390: step VCPU cpu timer during kvm_run ioctl 2016-03-08 13:57:52 +01:00
kernel s390: remove all usages of PSW_ADDR_INSN 2016-01-19 12:14:03 +01:00
kvm KVM: s390: step VCPU cpu timer during kvm_run ioctl 2016-03-08 13:57:52 +01:00
lib s390/spinlock: do not yield to a CPU in udelay/mdelay 2015-11-27 09:24:18 +01:00
mm s390: remove all usages of PSW_ADDR_INSN 2016-01-19 12:14:03 +01:00
net bpf: move clearing of A/X into classic to eBPF migration prologue 2015-12-18 16:04:51 -05:00
numa s390/numa: move numa_init_late() from device to arch_initcall 2016-01-26 12:45:24 +01:00
oprofile s390: remove all usages of PSW_ADDR_INSN 2016-01-19 12:14:03 +01:00
pci s390/pci: remove iomap sanity checks 2016-01-26 12:46:45 +01:00
tools s390/facilities: add helper tool to generate facility lists 2015-12-18 14:59:20 +01:00
Kbuild s390/numa: add core infrastructure 2015-08-03 18:40:25 +02:00
Kconfig dma-mapping: always provide the dma_map_ops based implementation 2016-01-20 17:09:18 -08:00
Kconfig.debug arch: consolidate CONFIG_STRICT_DEVM in lib/Kconfig.debug 2016-01-09 06:30:49 -08:00
Makefile s390/facilities: add helper tool to generate facility lists 2015-12-18 14:59:20 +01:00
defconfig s390/configs: update default configurations 2016-01-11 13:01:28 +01:00