Skip to contentSkip to conversation

APIC handling on x86-64

DISCUSSION Jan Beulich 2 participants 3 messages Mar 20, 2006

lore
Share & tools
lore
#0 lore raw
Quoted 7 lines

Yes, that's what stopped me taking x86/64 Linux code originally. I wonder if we can take just the IPI code from x86/64, plus whatever small changes we need to fix problems like this x460 bug. IPI code is reasonably self contained relative to the bulk of the apic code in apic.c. The x86/64 IPI code was a bunch cleaner than the i386 code last time I looked, and I don't think there are lurking legacy 32-bit issues in that area that would bite us?

Hmm, I'm not sure. Both because it wouldn't address all issues (the I/O APIC redirection table entries also need to be programmed in physical mode) and because I'm not so certain about legacy 32-bit issues (on 32-bits you still have to account for the PentiumPro/II/III behavior, namely the only 4-bit wide IDs, as that at least seems to imply different cut-off criteria for the decision what destination mode to use).

Jan

#1 lore raw
Quoted 7 lines · Jan Beulich

Hmm, I'm not sure. Both because it wouldn't address all issues (the I/O APIC redirection table entries also need to be programmed in physical mode) and because I'm not so certain about legacy 32-bit issues (on 32-bits you still have to account for the PentiumPro/II/III behavior, namely the only 4-bit wide IDs, as that at least seems to imply different cut-off criteria for the decision what destination mode to use).

We can just steal x86/64 phys cluster code for summit. ES7000 already has its own phys cluster code that doesn't look like it will have this issue, Bigsmp uses phys flat, and Default uses logical flat. So summit is the only subarch that needs fixing.

Xen's io_apic.c will program logical/phys dest mode appropriately (although it's taken from i386 io_apic.c, those parts of the i386 file are identical to x86/64 io_apic.c).

I'd also like to fix send_IPI_mask_sequence() to use physical destination mode. It scares me a bit that 2.6.16 native i386 bigsmp mode uses physical flat model, but uses send_IPI_mask_sequence with logical delivery. Seems weird to me.

Both this and the summit fix will be after 3.0.2 now.

-- Keir

#2 lore raw
Quoted 1 line · Keir Fraser

I'd also like to fix send_IPI_mask_sequence() to use physical destination mode. It scares me a bit that 2.6.16 native i386 bigsmp mode uses physical flat model, but uses send_IPI_mask_sequence with logical delivery. Seems weird to me.

Oh wow. I see that in fact mach-bigsmap and mach-es7000 both redefine APIC_DEST_LOGICAL to zero. That's very sleazy. :-)

-- Keir