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

Build PCI_HYPERV as built-in #11991

Merged
merged 1 commit into from
Jan 29, 2025
Merged

Build PCI_HYPERV as built-in #11991

merged 1 commit into from
Jan 29, 2025

Conversation

rlmenge
Copy link
Contributor

@rlmenge rlmenge commented Jan 18, 2025

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./LICENSES-AND-NOTICES/SPECS/data/licenses.json, ./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md, ./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

Bug fix.

Change PCI_HYPERV to be builtin. This also requires PCI_HYPERV_INTERFACE to be builtin as well. PCI_HYPERV was previously loaded as a module but it results in race conditions when devices are mapped and unmapped. AzureLinux is already starting to access PCIe Devices, when the MMIO mappings from UEFI haven't been fully torn down yet. That causes conflicts, which shows up as missing disks to the customer. If AzureLinux has hyperv pci built into the kernel, then that changes the load ordering of the drivers in the kernel, which has the desired side-effect that UEFI mappings get torn down before the AzureLinux creates net mappings.

For example lsblk for certain SKUs were not seeing all NVMe devices

PCI_HYPERV Kconfig
PCI_HYPERV_INTERFACE Kconfig

Change Log
  • Enable PCI_HYPERV as built-in
Does this affect the toolchain?

YES

Associated issues
Test Methodology

BuddyBuild
-> AKS Image
---> aks perf
---> aks conf - 100% pass
Stage 0-AMD ... Stage 3
-> Lisa image
---> Lisa Tests - 100% pass
Stage 3 ARM
-> Lisa image
--->Lisa Tests -100% pass
Booted AMD

*** Smoke Testing Kernel 5.15.173.1-2.cm2 (est. < 1 min) ***
PASS: Kernel version matches the running kernel version.
PASS: eth0 interface is up.
PASS: iptables service is running.
Boot times:
Startup finished in 987ms (kernel) + 2.059s (initrd) + 4.890s (userspace) = 7.936s 
multi-user.target reached after 4.870s in userspace
Kernel size:S
-rw------- 1 root root 12876032 Jan 18 03:29 /boot/vmlinuz-5.15.173.1-2.cm2

Booted ARM

*** Smoke Testing Kernel 5.15.173.1-2.cm2 (est. < 1 min) ***
PASS: Kernel version matches the running kernel version.
PASS: eth0 interface is up.
PASS: iptables service is running.
Boot times:
Startup finished in 958ms (kernel) + 1.333s (initrd) + 4.667s (userspace) = 6.958s 
multi-user.target reached after 4.437s in userspace
Kernel size:S
-rw------- 1 root root 43842048 Jan 18 03:35 /boot/vmlinuz-5.15.173.1-2.cm2

For x86_64 we were building pci_hyperv as a module. This resulted
in race conditions with how the nvme devices were mapped.
Therefore, as a mitigation, build pci_hyperv in kernel binary.
@rlmenge rlmenge changed the title Build pci_hyperv as built-in Build PCI_HYPERV as built-in Jan 24, 2025
@rlmenge rlmenge marked this pull request as ready for review January 24, 2025 23:19
@rlmenge rlmenge requested a review from a team as a code owner January 24, 2025 23:19
@rlmenge rlmenge merged commit 726a6bc into main Jan 29, 2025
12 checks passed
@rlmenge rlmenge deleted the rlmenge/2.0/kernel/pci_hyperv-pr branch January 29, 2025 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
main PR Destined for main Packaging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants