Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Oct 21, 2022

Conversation

ptrivedi
Copy link
Contributor

@ptrivedi ptrivedi commented Oct 12, 2022

Signed-off-by: Pooja Trivedi [email protected]

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:

  • updated the documentation and/or roadmap (if required)
  • added unit or e2e tests
  • provided instructions on how to upgrade

@jacobweinstock
Copy link
Member

jacobweinstock commented Oct 14, 2022

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?

@jacobweinstock jacobweinstock added the ready-to-merge Signal to Mergify to merge the PR. label Oct 21, 2022
@mergify mergify bot merged commit 73b36d3 into tinkerbell:main Oct 21, 2022
@ptrivedi ptrivedi deleted the iommu-settings branch October 21, 2022 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Signal to Mergify to merge the PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants