* 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
* Re: kvm/qemu: apic sync with latest official qemu source
[not found] ` <EB72D1F7AEB56A49AFDF91133DB6F09502456754-GZEWsUgYTwZ8F96hXnIoVgC/G2K4zDHf@public.gmane.org>
@ 2007-01-24 14:12 ` Avi Kivity
[not found] ` <45B76947.9080201-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Avi Kivity @ 2007-01-24 14:12 UTC (permalink / raw)
To: Rechberger, Markus; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Rechberger, Markus wrote:
>
> 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.
>
>
>
I'm worried that a partial sync can introduce bugs. Did you test this
with a Windows guest as well? (we can now use the ACPI HAL on Windows,
which (ab)uses the APIC).
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: kvm/qemu: apic sync with latest official qemu source
[not found] ` <45B76947.9080201-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
@ 2007-01-24 14:25 ` Dor Laor
0 siblings, 0 replies; 3+ messages in thread
From: Dor Laor @ 2007-01-24 14:25 UTC (permalink / raw)
To: Avi Kivity, Rechberger, Markus; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
>Rechberger, Markus wrote:
>>
>> 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.
>>
>>
>>
>
>I'm worried that a partial sync can introduce bugs. Did you test this
>with a Windows guest as well? (we can now use the ACPI HAL on Windows,
>which (ab)uses the APIC).
>
I tested it on windows with APIC and it works.
Also the code shifts looks logical. (One is an even simple run over
bug).
Why did you change the version_id? You also did not register id == 2.
Will it survive save/restore? Because the apic timer is not restarted
on id < 2.
>
>--
>error compiling committee.c: too many arguments to function
>
>
>-----------------------------------------------------------------------
--
>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=DEVD
EV
>_______________________________________________
>kvm-devel mailing list
>kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>https://lists.sourceforge.net/lists/listinfo/kvm-devel
-------------------------------------------------------------------------
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
^ 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.