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

DynamicTablesPkg/ArmGicCParser: Parse VGIC interrupt for all CPUs #6441

Merged
merged 1 commit into from
Nov 23, 2024

Conversation

ardbiesheuvel
Copy link
Member

There are two issues in the GIC FDT parsing code:

  • the GICC Flags 'Enabled' bit is overwritten when parsing the VGIC Maintenance Interrupt, whose trigger type occupies another bit in the same field;
  • only the first CPU's Flags field is updated.

This breaks both SMP boot and KVM support on Linux, given that the boot CPU is disabled in the MADT, and the VGIC maintenance interrupt is set to 0x0 on all others.

Fix this, by OR'ing the trigger type into the field, and by iterating over all discovered CPUs.

Copy link
Contributor

@samimujawar samimujawar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this fix.
These changes look good to me.

@ardbiesheuvel
Copy link
Member Author

@mdkinney any clue what is wrong here? Sami approved this, and he is the maintainer of DynamicTablesPkg, and so I would expect the review requirement to be satisfied

(No need for this to make the stable tag IMO, although it is a clear bugfix, so Sami might feel differently)

There are two issues in the GIC FDT parsing code:
- the GICC Flags 'Enabled' bit is overwritten when parsing the VGIC
  Maintenance Interrupt, whose trigger type occupies another bit in the
  same field;
- only the first CPU's Flags field is updated.

This breaks both SMP boot and KVM support on Linux, given that the boot
CPU is disabled in the MADT, and the VGIC maintenance interrupt is set
to 0x0 on all others.

Fix this, by OR'ing the trigger type into the field, and by iterating
over all discovered CPUs.

Signed-off-by: Ard Biesheuvel <[email protected]>
@ardbiesheuvel ardbiesheuvel merged commit a6f1433 into tianocore:master Nov 23, 2024
50 of 123 checks passed
@ardbiesheuvel ardbiesheuvel deleted the kvmtool-madt-fix branch November 23, 2024 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants