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 <[EMAIL PROTECTED]>

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/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to