Current BIOS delays 10ms for AP to boot up, but we found it may be too short : on some machine 10ms is OK, some other not. And if we look at the OS side, Linux waits for 5s for AP to boot up, so I would suggest to wait for a much longer time, like 2000ms, is that OK? -Xin
>-----Original Message----- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of Li, Xin B >Sent: Wednesday, August 22, 2007 10:08 PM >To: kvm-devel@lists.sourceforge.net >Subject: [kvm-devel] [PATCH] Fix BIOS CPU enumeration > >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 > ------------------------------------------------------------------------- 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