Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

fix dom0 crash on large machines



Hi!

On large machines, the phycpu_info array is limited
to 32 and the array is used as apic index.

There are systems where the apic index of the first CPU
starts with 16 and ends beyond of 32.

On such machines the Dom0 boot fails with a panic:

    cpu12 at mainbus0 apid 32panic: cpu at apic id 32 already attached?

(See PR port-xen/41755)


This patch eliminates the limitation by removing
X86_MAXPROCS.
As a side effect, the patch also reduces the diff
to sys/arch/x86/x86/cpu.c

http://www.netbsd.org/~cegger/xen_phycpu.diff


I test it on a 48 CPU machine where the apic index
goes from 16 to 75:

cpu0 at mainbus0 apid 16: (application processor)
cpu1 at mainbus0 apid 17: (application processor)
cpu2 at mainbus0 apid 18: (application processor)
cpu3 at mainbus0 apid 19: (application processor)
cpu4 at mainbus0 apid 20: (application processor)
cpu5 at mainbus0 apid 21: (application processor)
cpu6 at mainbus0 apid 22: (application processor)
cpu7 at mainbus0 apid 23: (application processor)
cpu8 at mainbus0 apid 24: (application processor)
cpu9 at mainbus0 apid 25: (application processor)
cpu10 at mainbus0 apid 26: (application processor)
cpu11 at mainbus0 apid 27: (application processor)
cpu12 at mainbus0 apid 32: (application processor)
cpu13 at mainbus0 apid 33: (application processor)
cpu14 at mainbus0 apid 34: (application processor)
cpu15 at mainbus0 apid 35: (application processor)
cpu16 at mainbus0 apid 36: (application processor)
cpu17 at mainbus0 apid 37: (application processor)
cpu18 at mainbus0 apid 38: (application processor)
cpu19 at mainbus0 apid 39: (application processor)
cpu20 at mainbus0 apid 40: (application processor)
cpu21 at mainbus0 apid 41: (application processor)
cpu22 at mainbus0 apid 42: (application processor)
cpu23 at mainbus0 apid 43: (application processor)
cpu24 at mainbus0 apid 48: (application processor)
cpu25 at mainbus0 apid 49: (application processor)
cpu26 at mainbus0 apid 50: (application processor)
cpu27 at mainbus0 apid 51: (application processor)
cpu28 at mainbus0 apid 52: (application processor)
cpu29 at mainbus0 apid 53: (application processor)
cpu30 at mainbus0 apid 54: (application processor)
cpu31 at mainbus0 apid 55: (application processor)
cpu32 at mainbus0 apid 56: (application processor)
cpu33 at mainbus0 apid 57: (application processor)
cpu34 at mainbus0 apid 58: (application processor)
cpu35 at mainbus0 apid 59: (application processor)
cpu36 at mainbus0 apid 64: (application processor)
cpu37 at mainbus0 apid 65: (application processor)
cpu38 at mainbus0 apid 66: (application processor)
cpu39 at mainbus0 apid 67: (application processor)
cpu40 at mainbus0 apid 68: (application processor)
cpu41 at mainbus0 apid 69: (application processor)
cpu42 at mainbus0 apid 70: (application processor)
cpu43 at mainbus0 apid 71: (application processor)
cpu44 at mainbus0 apid 72: (application processor)
cpu45 at mainbus0 apid 73: (application processor)
cpu46 at mainbus0 apid 74: (application processor)
cpu47 at mainbus0 apid 75: (application processor)



Home | Main Index | Thread Index | Old Index