public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix BIOS CPU enumeration
@ 2007-08-22 14:08 Li, Xin B
       [not found] ` <B30DA1341B0CFA4893EF8A36B40B5C5D018E11FD-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Li, Xin B @ 2007-08-22 14:08 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

KVM BIOS uses the following code to delay an expected milliseconds

void delay_ms(int n)
{
    int i, j;
    for(i = 0; i < n; i++) {
        /* approximative ! */
        for(j = 0; j < 1000000; j++);
    }
}

It's OK when we run APIC in user level, but when APIC is in kernel, the
delayed time is not enough and causes BSP delays a too short peroid
that APs have no enough time to reach the point BIOS enumerates CPU,
so BIOS always reports only one CPU is detected in this VM.
The following patch fixed this issue.

Signed-off-by: Xin Li <xin.b.li-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

diff --git a/bios/rombios32.c b/bios/rombios32.c
index 1562047..9b200b9 100644
--- a/bios/rombios32.c
+++ b/bios/rombios32.c
@@ -355,7 +355,8 @@ void delay_ms(int n)
 {
     int i, j;
     for(i = 0; i < n; i++) {
-#ifdef BX_QEMU
+#if 0
+//#ifdef BX_QEMU
         /* approximative ! */
         for(j = 0; j < 1000000; j++);
 #else

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

end of thread, other threads:[~2007-08-23  8:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-22 14:08 [PATCH] Fix BIOS CPU enumeration Li, Xin B
     [not found] ` <B30DA1341B0CFA4893EF8A36B40B5C5D018E11FD-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-08-22 14:17   ` Li, Xin B
     [not found]     ` <B30DA1341B0CFA4893EF8A36B40B5C5D018E1200-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-08-22 14:41       ` Li, Xin B
     [not found]         ` <B30DA1341B0CFA4893EF8A36B40B5C5D018E1227-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-08-22 14:45           ` Avi Kivity
2007-08-23  7:50   ` Li, Xin B
     [not found]     ` <B30DA1341B0CFA4893EF8A36B40B5C5D018E15C1-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-08-23  8:29       ` Avi Kivity
     [not found]         ` <46CD454F.3000903-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-23  8:30           ` Li, Xin B
     [not found]             ` <B30DA1341B0CFA4893EF8A36B40B5C5D018E160A-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-08-23  8:47               ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox