projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
24993d5
)
KVM: Avoid infinite-frequency local apic timer
author
Avi Kivity
<avi@qumranet.com>
Sun, 24 Feb 2008 12:37:50 +0000
(14:37 +0200)
committer
Avi Kivity
<avi@qumranet.com>
Tue, 4 Mar 2008 13:19:48 +0000
(15:19 +0200)
If the local apic initial count is zero, don't start a an hrtimer with infinite
frequency, locking up the host.
Signed-off-by: Avi Kivity <avi@qumranet.com>
arch/x86/kvm/lapic.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/x86/kvm/lapic.c
b/arch/x86/kvm/lapic.c
index 2cbee9479ce423850a99df39290e3efbbe51ae48..68a6b1511934760e97117080166f78b9a7d5ab72 100644
(file)
--- a/
arch/x86/kvm/lapic.c
+++ b/
arch/x86/kvm/lapic.c
@@
-647,6
+647,10
@@
static void start_apic_timer(struct kvm_lapic *apic)
apic->timer.period = apic_get_reg(apic, APIC_TMICT) *
APIC_BUS_CYCLE_NS * apic->timer.divide_count;
atomic_set(&apic->timer.pending, 0);
+
+ if (!apic->timer.period)
+ return;
+
hrtimer_start(&apic->timer.dev,
ktime_add_ns(now, apic->timer.period),
HRTIMER_MODE_ABS);