kernel_optimize_test/arch
Peter Shier 24647e0a39 KVM: x86: Return updated timer current count register from KVM_GET_LAPIC
kvm_vcpu_ioctl_get_lapic (implements KVM_GET_LAPIC ioctl) does a bulk copy
of the LAPIC registers but must take into account that the one-shot and
periodic timer current count register is computed upon reads and is not
present in register state. When restoring LAPIC state (e.g. after
migration), restart timers from their their current count values at time of
save.

Note: When a one-shot timer expires, the code in arch/x86/kvm/lapic.c does
not zero the value of the LAPIC initial count register (emulating HW
behavior). If no other timer is run and pending prior to a subsequent
KVM_GET_LAPIC call, the returned register set will include the expired
one-shot initial count. On a subsequent KVM_SET_LAPIC call the code will
see a non-zero initial count and start a new one-shot timer using the
expired timer's count. This is a prior existing bug and will be addressed
in a separate patch. Thanks to jmattson@google.com for this find.

Signed-off-by: Peter Shier <pshier@google.com>
Reviewed-by: Jim Mattson <jmattson@google.com>
Reviewed-by: Wanpeng Li <wanpengli@tencent.com>
Message-Id: <20181010225653.238911-1-pshier@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-04-15 12:08:40 -04:00
..
alpha
arc
arm ARM: 2020-04-02 15:13:15 -07:00
arm64 ARM: 2020-04-02 15:13:15 -07:00
c6x
csky
h8300
hexagon
ia64
m68k
microblaze
mips ARM: 2020-04-02 15:13:15 -07:00
nds32
nios2
openrisc
parisc
powerpc ARM: 2020-04-02 15:13:15 -07:00
riscv
s390 KVM: s390: Return last valid slot if approx index is out-of-bounds 2020-04-14 10:39:57 -04:00
sh Merge branch 'akpm' (patches from Andrew) 2020-04-02 13:55:34 -07:00
sparc
um Merge branch 'akpm' (patches from Andrew) 2020-04-02 13:55:34 -07:00
unicore32
x86 KVM: x86: Return updated timer current count register from KVM_GET_LAPIC 2020-04-15 12:08:40 -04:00
xtensa
.gitignore
Kconfig