2003-05-28 09:43:41

by Petr Vandrovec

[permalink] [raw]
Subject: Re: local apic timer ints not working with vmware: nolocala

On 27 May 03 at 20:53, Brian J. Murrell wrote:
> Using a distribution (Mandrake's Cooker) patched kernel, I am unable to
> successfully boot at 2.4.20ish kernel on VMware 2.0.4 build 1142. The
> problem seems to be with using local apic timer interrupts. The last few
> lines of the boot sequence before the kernel hangs are (copied by hand, so
> please excuse typos):
>
> Using local APIC timer interrupts.
> calibrating APIC timer ...
> ..... CPU clock speed is 1658.7651 MHz.
> ..... host bus clock speed is 0.0000 MHz.
> cpu: 0, clocks: 0, slice: 0
>
> I do know that I could simply build a kernel with the CONFIG_X86_UP_APIC
> to work around this problem, but that means a "special" kernel just for
> VMware and also means not being able to use vendor supplied kernels, or
> vendor supplied boot media (i.e. CD-ROMs).

Just get VMware 3 or 4 - they (properly) emulate APIC timer and you'll
get information that host bus is running at 66.xxxx MHz. With VMware 2
you have to boot with noapic.
Petr Vandrovec



2003-05-28 17:21:20

by Brian J. Murrell

[permalink] [raw]
Subject: Re: local apic timer ints not working with vmware: nolocalapic

On Wed, May 28, 2003 at 11:56:29AM +0200, Petr Vandrovec wrote:
>
> Just get VMware 3 or 4

Unfortunately, I cannot currently afford to buy (outright -- there is
no upgrade path from 2 to 4) a newer version of VMware. Really, other
than this issue of the local APIC timer, I don't really need or care
to have a newer version of VMware anyway.

> - they (properly) emulate APIC timer and you'll
> get information that host bus is running at 66.xxxx MHz. With VMware 2
> you have to boot with noapic.

If only this worked. I tried noapic, but it still tries to use the
local APIC timer interrupts. noapic seems to only disable IO-APIC.
That is why I was "proposing" a new kernel command line arg,
"nolocalapic".

b.

--
Brian J. Murrell


Attachments:
(No filename) (740.00 B)
(No filename) (189.00 B)
Download all attachments

2003-05-28 17:39:15

by Zwane Mwaikambo

[permalink] [raw]
Subject: Re: local apic timer ints not working with vmware: nolocalapic

On Wed, 28 May 2003 [email protected] wrote:

> > - they (properly) emulate APIC timer and you'll
> > get information that host bus is running at 66.xxxx MHz. With VMware 2
> > you have to boot with noapic.
>
> If only this worked. I tried noapic, but it still tries to use the
> local APIC timer interrupts. noapic seems to only disable IO-APIC.
> That is why I was "proposing" a new kernel command line arg,
> "nolocalapic".

I submitted a patch for nolapic before...

Index: linux-2.5.45-ac1/arch/i386/kernel/apic.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.45-ac1/arch/i386/kernel/apic.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 apic.c
--- linux-2.5.45-ac1/arch/i386/kernel/apic.c 5 Nov 2002 04:47:02 -0000 1.1.1.1
+++ linux-2.5.45-ac1/arch/i386/kernel/apic.c 6 Nov 2002 00:19:38 -0000
@@ -609,11 +609,27 @@

#endif /* CONFIG_PM */

+int enable_local_apic_flag __initdata = 0; /* 0=probe, 1=force, 2=disable e.g. DMI */
+
+static int __init nolapic_setup(char *str)
+{
+ enable_local_apic_flag = 2;
+ return 1;
+}
+
+static int __init lapic_setup(char *str)
+{
+ enable_local_apic_flag = 1;
+ return 1;
+}
+
+__setup("nolapic", nolapic_setup);
+__setup("lapic", lapic_setup);
+
/*
* Detect and enable local APICs on non-SMP boards.
* Original code written by Keir Fraser.
*/
-int dont_enable_local_apic __initdata = 0;

static int __init detect_init_APIC (void)
{
@@ -621,11 +637,14 @@
extern void get_cpu_vendor(struct cpuinfo_x86*);

/* Disabled by DMI scan or kernel option? */
- if (dont_enable_local_apic)
+ if (enable_local_apic_flag == 2)
return -1;

/* Workaround for us being called before identify_cpu(). */
get_cpu_vendor(&boot_cpu_data);
+
+ if (enable_local_apic_flag == 1)
+ goto force_apic;

switch (boot_cpu_data.x86_vendor) {
case X86_VENDOR_AMD:
@@ -642,6 +661,7 @@
goto no_apic;
}

+force_apic:
if (!cpu_has_apic) {
/*
* Some BIOSes disable the local APIC in the
Index: linux-2.5.45-ac1/arch/i386/kernel/dmi_scan.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.45-ac1/arch/i386/kernel/dmi_scan.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 dmi_scan.c
--- linux-2.5.45-ac1/arch/i386/kernel/dmi_scan.c 5 Nov 2002 04:47:02 -0000 1.1.1.1
+++ linux-2.5.45-ac1/arch/i386/kernel/dmi_scan.c 6 Nov 2002 00:22:02 -0000
@@ -314,9 +314,9 @@
static int __init local_apic_kills_bios(struct dmi_blacklist *d)
{
#ifdef CONFIG_X86_LOCAL_APIC
- extern int dont_enable_local_apic;
- if (!dont_enable_local_apic) {
- dont_enable_local_apic = 1;
+ extern int enable_local_apic_flag;
+ if (!enable_local_apic_flag) {
+ enable_local_apic_flag = 2;
printk(KERN_WARNING "%s with broken BIOS detected. "
"Refusing to enable the local APIC.\n",
d->ident);
@@ -333,9 +333,9 @@
static int __init apm_kills_local_apic(struct dmi_blacklist *d)
{
#ifdef CONFIG_X86_LOCAL_APIC
- extern int dont_enable_local_apic;
- if (apm_info.bios.version && !dont_enable_local_apic) {
- dont_enable_local_apic = 1;
+ extern int enable_local_apic_flag;
+ if (apm_info.bios.version && !enable_local_apic_flag) {
+ enable_local_apic_flag = 2;
printk(KERN_WARNING "%s with broken BIOS detected. "
"Refusing to enable the local APIC.\n",
d->ident);
--
function.linuxpower.ca