tinkerbell / hook

In-memory Operating System Installation Environment for Executing Tinkerbell Workflows
Apache License 2.0
102 stars 49 forks source link

Turn on Intel and AMD IOMMU support and interrupt remapping #146

Closed ptrivedi closed 1 year ago

ptrivedi commented 1 year ago

Signed-off-by: Pooja Trivedi poojatrivedi@gmail.com

Description

X2APIC (Intel's Advanced Programmable Interrupt Controller) hardware improves efficiency in multiprocessor systems. If interrupt mapping is not enabled on the kernel (via CONFIG_IRQ_REMAP kernel config option), X2APIC is automatically disabled as indicated by a somewhat misleading error message on kernel console: What it says: IRQ remapping doesn't support X2APIC mode, disable x2apic. What it actually means: IRQ remapping isn't enabled, so x2APIC was disabled.

The solution is to turn on IRQ remapping. When turning on irq remapping via menuconfig, the changes seen in the PR are made in the kernel config.

Why is this needed

When testing on Lenovo SR950 server, Hook kernel panics with the following call trace:

[   28.150844] APIC: Switch to symmetric I/O mode setup
[   28.156880] x2apic: IRQ remapping doesn't support X2APIC mode
[   28.163281] x2apic disabled
[   28.166391] mapped APIC to ffffffffff5fd000 (        fee00000)
[   28.173257] unchecked MSR access error: RDMSR from 0x80f at rIP: 0xffffffff8a051309 (native_read_msr+0x3/0x27)
[   28.184397] Call Trace:
[   28.187127]  paravirt_read_msr+0x9/0xa

A Hook built with irq remapping support works successfully. Ubuntu, Oracle Linux etc. have the option turned on.

Fixes: #

How Has This Been Tested?

How are existing users impacted? What migration steps/scripts do we need?

Checklist:

I have:

jacobweinstock commented 1 year ago

Hey @ptrivedi, would you mind adding a short description to the PR body and also the "Why this is needed" to the PR description and/or to your commit message, please?