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

plat/common/x86: Make SIPI Vector related symbols relocations independent from ukreloc #1113

Merged

Conversation

mogasergiu
Copy link
Member

@mogasergiu mogasergiu commented Sep 26, 2023

Prerequisite checklist

  • Read the contribution guidelines regarding submitting new changes to the project;
  • Tested your changes against relevant architectures and platforms;
  • Ran the checkpatch.uk on your commit series before opening this PR;
  • Updated relevant documentation.

Base target

  • Architecture(s): x86_64
  • Platform(s): kvm
  • Application(s): N/A

Additional configuration

Description of changes

Following an offline discussion it was decided to make SIPI vector initialization/relocation entirely independent from whether Unikraft is built with/without ukreloc/PIE. This is done by ensuring start16 related symbols are relocated through their own mechanism, separated from, but similar to, from ukreloc.

@mogasergiu mogasergiu requested review from a team as code owners September 26, 2023 10:25
@razvand razvand requested review from razvanvirtan and removed request for a team September 27, 2023 04:32
@razvand razvand self-assigned this Sep 27, 2023
@razvand razvand added this to the v0.14.1 (Prometheus) milestone Sep 27, 2023
@razvand razvand added plat/kvm Unikraft for KVM kind/quick-fix Issue is a quick fix lang/c Issues or PRs to do with C/C++ arch/x86_64 topic/smp PR or issues related to SMP support. labels Sep 27, 2023
@mogasergiu mogasergiu force-pushed the smoga/smp-no-pie-fix-start16-relocs branch from e34b2da to 9cc1c9c Compare September 29, 2023 14:28
@mogasergiu mogasergiu requested a review from a team as a code owner September 29, 2023 14:28
@mogasergiu mogasergiu requested review from michpappas and mschlumpp and removed request for michpappas September 29, 2023 14:32
@mogasergiu mogasergiu changed the title plat/common/x86: Fix SMP builds that are not built as PIE plat/common/x86: Make SIPI Vector related symbols relocations independent from ukreloc Sep 29, 2023
Since `start16` related symbols have a relocation mechanism similar,
but entirely independent from `ukreloc`, rename all such symbols,
macro's and their uses so that they do not contain the `uk_reloc` or
the `UKRELOC` substrings.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
@mogasergiu mogasergiu force-pushed the smoga/smp-no-pie-fix-start16-relocs branch 2 times, most recently from 4295cd0 to 2748ecf Compare September 29, 2023 14:40
Copy link
Contributor

@razvanvirtan razvanvirtan left a comment

Choose a reason for hiding this comment

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

Thanks a lot @mogasergiu!
All good on my side (just a minor typo in the inline comments).

Reviewed-by: Razvan Virtan virtanrazvan@gmail.com

plat/common/x86/lcpu.c Show resolved Hide resolved
Copy link
Member

@mschlumpp mschlumpp left a comment

Choose a reason for hiding this comment

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

Reviewed-by: Marco Schlumpp marco@unikraft.io

Allow having the same relocation mechanism of the SIPI vector symbols
be used regardless of whether `ukreloc` or `PIE` are enabled or not.

With this commit, SMP initialization has now the same SIPI behavior
regardless of `ukreloc`/`PIE`, thus dropping any conflicts/dependencies.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
@mogasergiu mogasergiu force-pushed the smoga/smp-no-pie-fix-start16-relocs branch from 2748ecf to f6cf01f Compare October 2, 2023 08:59
Copy link
Contributor

@razvand razvand left a comment

Choose a reason for hiding this comment

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

Approved-by: Razvan Deaconescu razvand@unikraft.io

@razvand razvand merged commit d6c96bd into unikraft:staging Oct 3, 2023
9 checks passed
razvand pushed a commit that referenced this pull request Oct 3, 2023
Since `start16` related symbols have a relocation mechanism similar,
but entirely independent from `ukreloc`, rename all such symbols,
macro's and their uses so that they do not contain the `uk_reloc` or
the `UKRELOC` substrings.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1113
razvand pushed a commit that referenced this pull request Oct 3, 2023
Allow having the same relocation mechanism of the SIPI vector symbols
be used regardless of whether `ukreloc` or `PIE` are enabled or not.

With this commit, SMP initialization has now the same SIPI behavior
regardless of `ukreloc`/`PIE`, thus dropping any conflicts/dependencies.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1113
razvand pushed a commit that referenced this pull request Oct 20, 2023
Since `start16` related symbols have a relocation mechanism similar,
but entirely independent from `ukreloc`, rename all such symbols,
macro's and their uses so that they do not contain the `uk_reloc` or
the `UKRELOC` substrings.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1113
razvand pushed a commit that referenced this pull request Oct 20, 2023
Allow having the same relocation mechanism of the SIPI vector symbols
be used regardless of whether `ukreloc` or `PIE` are enabled or not.

With this commit, SMP initialization has now the same SIPI behavior
regardless of `ukreloc`/`PIE`, thus dropping any conflicts/dependencies.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1113
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch/x86_64 kind/quick-fix Issue is a quick fix lang/c Issues or PRs to do with C/C++ plat/kvm Unikraft for KVM topic/smp PR or issues related to SMP support.
Projects
Status: Done!
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants