* [Qemu-devel] [PATCH uq/master] apic: Fix legacy vmstate loading for KVM
@ 2012-02-05 11:45 Jan Kiszka
2012-02-08 16:40 ` Marcelo Tosatti
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2012-02-05 11:45 UTC (permalink / raw)
To: Avi Kivity, Marcelo Tosatti; +Cc: Paolo Bonzini, qemu-devel, kvm
From: Jan Kiszka <jan.kiszka@siemens.com>
Also in case of loading pre-vmstate machines, we also need to open-code
the reading of the timer expires value and instead call the post_load
callback to apply it (or not). This fixes loading of legacy states into
the KVM APIC.
Reported-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
hw/apic_common.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/hw/apic_common.c b/hw/apic_common.c
index 26991b4..8373d79 100644
--- a/hw/apic_common.c
+++ b/hw/apic_common.c
@@ -188,6 +188,7 @@ static void apic_reset_common(DeviceState *d)
static int apic_load_old(QEMUFile *f, void *opaque, int version_id)
{
APICCommonState *s = opaque;
+ APICCommonClass *info = APIC_COMMON_GET_CLASS(s);
int i;
if (version_id > 2) {
@@ -220,7 +221,11 @@ static int apic_load_old(QEMUFile *f, void *opaque, int version_id)
s->next_time = qemu_get_be64(f);
if (version_id >= 2) {
- qemu_get_timer(f, s->timer);
+ s->timer_expiry = qemu_get_be64(f);
+ }
+
+ if (info->post_load) {
+ info->post_load(s);
}
return 0;
}
--
1.7.3.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH uq/master] apic: Fix legacy vmstate loading for KVM
2012-02-05 11:45 [Qemu-devel] [PATCH uq/master] apic: Fix legacy vmstate loading for KVM Jan Kiszka
@ 2012-02-08 16:40 ` Marcelo Tosatti
0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2012-02-08 16:40 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Paolo Bonzini, Avi Kivity, kvm, qemu-devel
On Sun, Feb 05, 2012 at 12:45:20PM +0100, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Also in case of loading pre-vmstate machines, we also need to open-code
> the reading of the timer expires value and instead call the post_load
> callback to apply it (or not). This fixes loading of legacy states into
> the KVM APIC.
>
> Reported-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-08 16:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-05 11:45 [Qemu-devel] [PATCH uq/master] apic: Fix legacy vmstate loading for KVM Jan Kiszka
2012-02-08 16:40 ` Marcelo Tosatti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).