android_kernel_google_msm/arch/x86/kvm
Marcelo Tosatti 6d470d7ceb KVM: x86: move steal time initialization to vcpu entry time
commit 7cae2bedcbd4680b155999655e49c27b9cf020fa upstream.

As reported at https://bugs.launchpad.net/qemu/+bug/1494350,
it is possible to have vcpu->arch.st.last_steal initialized
from a thread other than vcpu thread, say the iothread, via
KVM_SET_MSRS.

Which can cause an overflow later (when subtracting from vcpu threads
sched_info.run_delay).

To avoid that, move steal time accumulation to vcpu entry time,
before copying steal time data to guest.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Reviewed-by: David Matlack <dmatlack@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Zefan Li <lizefan@huawei.com>
2016-03-21 09:17:59 +08:00
..
cpuid.c KVM: SVM: Add support for AMD's OSVW feature in guests 2012-03-05 14:52:21 +02:00
cpuid.h KVM: x86: invalid opcode oops on SET_SREGS with OSXSAVE bit set (CVE-2012-4461) 2012-12-03 11:47:11 -08:00
emulate.c KVM: emulate: fix CMPXCHG8B on 32-bit hosts 2015-06-19 11:40:19 +08:00
i8254.c KVM: x86: make vapics_in_nmi_mode atomic 2015-10-22 09:20:07 +08:00
i8254.h KVM: remove useless function declaration kvm_inject_pit_timer_irqs() 2011-05-11 07:57:09 -04:00
i8259.c KVM: x86: reset edge sense circuit of i8259 on init 2012-03-05 14:57:30 +02:00
irq.c
irq.h KVM: Intelligent device lookup on I/O bus 2011-09-25 19:17:59 +03:00
Kconfig KVM: Expose a version 2 architectural PMU to a guests 2011-12-27 11:24:29 +02:00
kvm_cache_regs.h KVM: MMU: Do not unconditionally read PDPTE from guest memory 2011-09-25 19:18:01 +03:00
kvm_timer.h KVM: emulate lapic tsc deadline timer for guest 2011-10-05 15:34:56 +02:00
lapic.c KVM: x86: properly restore LVT0 2015-10-22 09:20:07 +08:00
lapic.h KVM: x86: Convert vapic synchronization to _cached functions (CVE-2013-6368) 2014-01-29 05:10:42 -08:00
Makefile KVM: Expose a version 2 architectural PMU to a guests 2011-12-27 11:24:29 +02:00
mmu.c KVM: MMU: fix CR4.SMEP=1, CR0.WP=0 with shadow pages 2015-09-18 09:20:40 +08:00
mmu.h KVM: MMU: mmio page fault support 2011-07-24 11:50:40 +03:00
mmu_audit.c Merge branch 'kvm-updates/3.4' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2012-03-28 14:35:31 -07:00
mmutrace.h KVM: MMU: audit: replace mmu audit tracepoint with jump-label 2011-12-27 11:22:05 +02:00
paging_tmpl.h x86: remove the second argument of k[un]map_atomic() 2012-03-20 21:48:15 +08:00
pmu.c KVM: PMU emulation: GLOBAL_CTRL MSR should be enabled on reset 2012-04-10 15:34:10 +03:00
svm.c KVM: svm: unconditionally intercept #DB 2016-03-21 09:17:55 +08:00
timer.c KVM: x86: Simplify kvm timer handler 2011-12-27 11:17:05 +02:00
trace.h KVM: x86: work around infinite loop in microcode when #AC is delivered 2016-03-21 09:17:55 +08:00
tss.h
vmx.c KVM: x86: work around infinite loop in microcode when #AC is delivered 2016-03-21 09:17:55 +08:00
x86.c KVM: x86: move steal time initialization to vcpu entry time 2016-03-21 09:17:59 +08:00
x86.h kvm: x86: fix stale mmio cache bug 2015-02-02 17:04:35 +08:00