All of lore.kernel.org
 help / color / mirror / Atom feed
* kvm/qemu: apic sync with latest official qemu source
@ 2007-01-24 14:01 Rechberger, Markus
       [not found] ` <EB72D1F7AEB56A49AFDF91133DB6F09502456754-GZEWsUgYTwZ8F96hXnIoVgC/G2K4zDHf@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Rechberger, Markus @ 2007-01-24 14:01 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f


[-- Attachment #1.1: Type: text/plain, Size: 254 bytes --]

This patch is a sync with the latest apic code in the qemu repository,
this fixes a system crash after linux tries to set up apic after the
first reboot.

 

Signed-off-by: Markus Rechberger <markus.rechberger-5C7GfCeVMHo@public.gmane.org>

 


[-- Attachment #1.2: Type: text/html, Size: 1744 bytes --]

[-- Attachment #2: apic-patch.diff --]
[-- Type: application/octet-stream, Size: 1405 bytes --]

--- kvm-12/qemu/hw/apic.c	2006-10-08 13:30:16.000000000 +0200
+++ hw/apic.c	2006-10-08 20:20:51.000000000 +0200
@@ -382,8 +382,6 @@
 {
     int i;
 
-    for(i = 0; i < APIC_LVT_NB; i++)
-        s->lvt[i] = 1 << 16; /* mask LVT */
     s->tpr = 0;
     s->spurious_vec = 0xff;
     s->log_dest = 0;
@@ -391,7 +389,8 @@
     memset(s->isr, 0, sizeof(s->isr));
     memset(s->tmr, 0, sizeof(s->tmr));
     memset(s->irr, 0, sizeof(s->irr));
-    memset(s->lvt, 0, sizeof(s->lvt));
+    for(i = 0; i < APIC_LVT_NB; i++)
+        s->lvt[i] = 1 << 16; /* mask LVT */
     s->esr = 0;
     memset(s->icr, 0, sizeof(s->icr));
     s->divide_conf = 0;
@@ -477,9 +476,9 @@
     intno = get_highest_priority_int(s->irr);
     if (intno < 0)
         return -1;
-    reset_bit(s->irr, intno);
     if (s->tpr && intno <= s->tpr)
         return s->spurious_vec & 0xff;
+    reset_bit(s->irr, intno);
     set_bit(s->isr, intno);
     apic_update_irq(s);
     return intno;
@@ -754,7 +753,7 @@
     APICState *s = opaque;
     int i;
 
-    if (version_id != 1)
+    if (version_id > 2)
         return -EINVAL;
 
     /* XXX: what if the base changes? (registered memory regions) */
@@ -782,7 +781,8 @@
     qemu_get_be64s(f, &s->initial_count_load_time);
     qemu_get_be64s(f, &s->next_time);
 
-    qemu_get_timer(f, s->timer);
+    if (version_id >= 2)
+        qemu_get_timer(f, s->timer);
     return 0;
 }
 

[-- Attachment #3: Type: text/plain, Size: 347 bytes --]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

[-- 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	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-01-24 14:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-24 14:01 kvm/qemu: apic sync with latest official qemu source Rechberger, Markus
     [not found] ` <EB72D1F7AEB56A49AFDF91133DB6F09502456754-GZEWsUgYTwZ8F96hXnIoVgC/G2K4zDHf@public.gmane.org>
2007-01-24 14:12   ` Avi Kivity
     [not found]     ` <45B76947.9080201-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-01-24 14:25       ` Dor Laor

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.