* [PATCH] lapic3: fix kernel APIC timer saving
@ 2007-08-09 7:52 He, Qing
[not found] ` <37E52D09333DE2469A03574C88DBF40FA9C1B2-wq7ZOvIWXbM/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: He, Qing @ 2007-08-09 7:52 UTC (permalink / raw)
To: kvm-devel
[-- Attachment #1: Type: text/plain, Size: 1119 bytes --]
kvm: qemu: fix in-kernel APIC timer saving
This patch fixes a bug that APIC timer is disabled when migrating from
in-kernel APIC to userspace APIC, causing guest lockups.
Singed-off-by: Qing He <qing.he-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Yaozu (Eddie) Dong <eddie.dong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
diff --git a/qemu/hw/apic.c b/qemu/hw/apic.c
index fb6b1e6..1650962 100644
--- a/qemu/hw/apic.c
+++ b/qemu/hw/apic.c
@@ -784,13 +784,12 @@ static void
kvm_kernel_lapic_save_to_user(APICState *s)
s->lvt[i] = kapic_reg(kapic, 0x32 + i);
s->initial_count = kapic_reg(kapic, 0x38);
s->divide_conf = kapic_reg(kapic, 0x3e);
- s->initial_count_load_time = qemu_get_clock(vm_clock);
- s->next_time = s->initial_count_load_time;
v = (s->divide_conf & 3) | ((s->divide_conf >> 1) & 4);
s->count_shift = (v + 1) & 7;
- qemu_del_timer(s->timer);
+ s->initial_count_load_time = qemu_get_clock(vm_clock);
+ apic_timer_update(s, s->initial_count_load_time);
}
static void kvm_kernel_lapic_load_from_user(APICState *s)
[-- Attachment #2: kapic-timer-save.diff --]
[-- Type: application/octet-stream, Size: 749 bytes --]
diff --git a/qemu/hw/apic.c b/qemu/hw/apic.c
index fb6b1e6..1650962 100644
--- a/qemu/hw/apic.c
+++ b/qemu/hw/apic.c
@@ -784,13 +784,12 @@ static void kvm_kernel_lapic_save_to_user(APICState *s)
s->lvt[i] = kapic_reg(kapic, 0x32 + i);
s->initial_count = kapic_reg(kapic, 0x38);
s->divide_conf = kapic_reg(kapic, 0x3e);
- s->initial_count_load_time = qemu_get_clock(vm_clock);
- s->next_time = s->initial_count_load_time;
v = (s->divide_conf & 3) | ((s->divide_conf >> 1) & 4);
s->count_shift = (v + 1) & 7;
- qemu_del_timer(s->timer);
+ s->initial_count_load_time = qemu_get_clock(vm_clock);
+ apic_timer_update(s, s->initial_count_load_time);
}
static void kvm_kernel_lapic_load_from_user(APICState *s)
[-- Attachment #3: Type: text/plain, Size: 315 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
[-- Attachment #4: Type: text/plain, Size: 186 bytes --]
_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] lapic3: fix kernel APIC timer saving
[not found] ` <37E52D09333DE2469A03574C88DBF40FA9C1B2-wq7ZOvIWXbM/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2007-08-09 21:38 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2007-08-09 21:38 UTC (permalink / raw)
To: He, Qing; +Cc: kvm-devel
He, Qing wrote:
> kvm: qemu: fix in-kernel APIC timer saving
>
> This patch fixes a bug that APIC timer is disabled when migrating from
> in-kernel APIC to userspace APIC, causing guest lockups.
>
>
Applied, thanks.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-09 21:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-09 7:52 [PATCH] lapic3: fix kernel APIC timer saving He, Qing
[not found] ` <37E52D09333DE2469A03574C88DBF40FA9C1B2-wq7ZOvIWXbM/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-08-09 21:38 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox