Skip to content

xen: 4.15 -> {4.16,4.17,4.18,4.19}#324693

Merged
Mindavi merged 5 commits intoNixOS:masterfrom
SigmaSquadron:xen-4.18
Aug 1, 2024
Merged

xen: 4.15 -> {4.16,4.17,4.18,4.19}#324693
Mindavi merged 5 commits intoNixOS:masterfrom
SigmaSquadron:xen-4.18

Conversation

@SigmaSquadron
Copy link
Copy Markdown
Contributor

@SigmaSquadron SigmaSquadron commented Jul 4, 2024

Description of changes

Required by #324911.

  • Updates Xen to 4.16.6, 4.17.4, 4.18.2 and 4.19.0 on nixpkgs/master.
  • Marks a couple of packages as broken, as they are outdated, and their older versions do not seem to support Xen 4.19.

Things done

  • Built on platform(s)
    • x86_64-linux
  • Built with sandboxing enabled.
    • sandbox = true
  • Tested, as applicable:
    • pkg-config test passes successfully.
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD".
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Closes #320335, closes #26899.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation This PR adds or changes documentation 8.has: changelog This PR adds or changes release notes 8.has: module (update) This PR changes an existing module in `nixos/` 6.topic: ocaml OCaml is a general-purpose, high-level, multi-paradigm programming language. 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` labels Jul 4, 2024
@NixOSInfra NixOSInfra added the 12.first-time contribution This PR is the author's first one; please be gentle! label Jul 4, 2024
@SigmaSquadron

This comment was marked as outdated.

@SigmaSquadron SigmaSquadron force-pushed the xen-4.18 branch 2 times, most recently from 8dbcbe0 to 80dcdc6 Compare July 5, 2024 00:34
@SigmaSquadron SigmaSquadron marked this pull request as ready for review July 5, 2024 00:34
@ofborg ofborg bot added 8.has: clean-up This PR removes packages or removes other cruft 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Jul 5, 2024
@SigmaSquadron
Copy link
Copy Markdown
Contributor Author

Fixed the unpatched binaries.

Keep in mind XKCD 1513 as you review.

@SigmaSquadron

This comment was marked as outdated.

@ulrikstrid
Copy link
Copy Markdown
Member

Would you be willing to cherry-pick the maintainers and ocamlPackages.xenstore commits to a separate PR and add me as reviewer?

Then we can try to merge bits and pieces of this so that only the gnarly stuff that I'm not comfortable with is left 😄

@github-actions github-actions bot removed the 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS label Jul 5, 2024
@SigmaSquadron SigmaSquadron changed the title xen: 4.15 -> {4.16,4.17,4.18} xen: 4.15 -> {4.16,4.17,4.18,4.19} Jul 30, 2024
@SigmaSquadron
Copy link
Copy Markdown
Contributor Author

This will currently fail to build due to #331107.

@Kreyren
Copy link
Copy Markdown
Contributor

Kreyren commented Jul 30, 2024

This will currently fail to build due to #331107. -- @SigmaSquadron (#324693 (comment))

Is there anything else that blocks review for merge?

@SigmaSquadron
Copy link
Copy Markdown
Contributor Author

SigmaSquadron commented Jul 30, 2024

Is there anything else that blocks review for merge?

So far, nobody who reviewed feels comfortable enough with Xen to approve this PR, so the fact this has no approvals is a possible blocker.

@Kreyren
Copy link
Copy Markdown
Contributor

Kreyren commented Jul 30, 2024

So far, nobody who reviewed feels comfortable enough with Xen to approve this PR, so the fact this has no approvals is a possible blocker. -- @SigmaSquadron (#324693 (comment))

I meant implementation-wise like is there anything you still feel like needs to be handled or once the referenced issue is solved do you feel like it's ready for merge?

@SigmaSquadron
Copy link
Copy Markdown
Contributor Author

Yes, I do believe this is ready to merge, but we have an issue where there is an abundance of reviewers who are knowledgeable about Nix, and an abundance of reviewers that are knowledgeable about Xen, but basically no active reviewers who are knowledgeable about both.

@Kreyren
Copy link
Copy Markdown
Contributor

Kreyren commented Jul 30, 2024

Yes, I do believe this is ready to merge, but we have an issue where there is an abundance of reviewers who are knowledgeable about Nix, and an abundance of reviewers that are knowledgeable about Xen, but basically no active reviewers who are knowledgeable about both. -- @SigmaSquadron (#324693 (comment))

I don't think that is an issue, rather the blocking issue seems to be security considering the nature of Xen (also some people like andy above seem to be working on infra adjustments), but that (to me at least) seems like is sufficiently managed for NixOS standards.
That said i would prefer ~3 days of delay so that people who are concerned with Xen security can test it more, but my main concern now is just the 4,19 release that will stay in unstable anyway so that seems like good management to me.

Copy link
Copy Markdown
Contributor

@radhus radhus left a comment

Choose a reason for hiding this comment

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

Great work! Don't know if my approval mean much - but I think this overall makes Xen way more easily maintainable now!

As there aren't any automated dom0 tests, if the code looks fine from both a Xen and Nixpkgs perspective, and you're able to manually test dom0 with some domU's, shouldn't we just consider merging and let any issues be fixed in upcoming PRs, given that you're the maintainer going forward? 🤗

@Kreyren
Copy link
Copy Markdown
Contributor

Kreyren commented Jul 30, 2024

@andyhhp Considering your reply in #324693 (comment) are you planing to co-maintain this package to address thomas's concern to make the package more reliable?

Optionally i am willing to help with maintenance if none's against it as NiXium's projected to use Xen on majority of it's systems.

EDIT: sorry i though you meant cleaning NixOS's CIs, feel free to ignore my question then.

@Kreyren
Copy link
Copy Markdown
Contributor

Kreyren commented Jul 30, 2024

As there aren't any automated dom0 tests, if the code looks fine from both a Xen and Nixpkgs perspective, and you're able to manually test dom0 with some domU's, shouldn't we just consider merging and let any issues be fixed in upcoming PRs -- @radhus (#324693 (review))

Yea, the lack of automated tests is kinda a problem too for a production environment, but in terms of management it's probably better to merge in the current state and add them later as this is already getting kinda complex to review and i am not sure what should we be checking in the nixos context beyond the obvious once.

@SigmaSquadron
Copy link
Copy Markdown
Contributor Author

Yea, the lack of automated tests is kinda a problem too for a production environment, but in terms of management it's probably better to merge in the current state and add them later

In my opinion, it's next to impossible to add more tests, at least without rewriting the Nixpkgs test infrastructure. Xen requires a bare-metal host to be a dom0 in, which isn't the case with NixOS tests, much less package tests

@andyhhp
Copy link
Copy Markdown

andyhhp commented Jul 30, 2024

@andyhhp Considering your reply in #324693 (comment) are you planing to co-maintain this package to address thomas's concern to make the package more reliable?

Sorry, I'm an upstream Xen developer, and can advise on that side of things, but I don't have time (or indeed the expertise) to advise on the NixOS side of things.

@Kreyren
Copy link
Copy Markdown
Contributor

Kreyren commented Jul 30, 2024

Yea, the lack of automated tests is kinda a problem too for a production environment, but in terms of management it's probably better to merge in the current state and add them later

In my opinion, it's next to impossible to add more tests, at least without rewriting the Nixpkgs test infrastructure. Xen requires a bare-metal host to be a dom0 in, which isn't the case with NixOS tests, much less package tests -- @SigmaSquadron (#324693 (comment))

That sounds like an over-reaction, the infra should have the tools needed, but it needs to b researched to figure out how to implement them else RFC

Sorry, I'm an upstream Xen developer, and can advise on that side of things, but I don't have time (or indeed the expertise) to advise on the NixOS side of things. -- @andyhhp (#324693 (comment))

My apologies i confused you with nix developer and realized my mistake shortly after.

@SigmaSquadron
Copy link
Copy Markdown
Contributor Author

That sounds like an over-reaction, the infra should have the tools needed, but it needs to b researched to figure out how to implement them else RFC

Xen requires a bare-metal host to run. It's not a question of tooling, it's a question of not running tests inside containers/VMs, which isn't supported by Nixpkgs, and would require a tremendous amount of resources to effectively implement.

@SigmaSquadron
Copy link
Copy Markdown
Contributor Author

  • Dropped the dependency that wasn't compiling. I doubt anyone would actually use it.
  • Dropped unused dependencies per an upstream review.
  • Now passes nixpkgs-hammering xen -e missing-patch-comment -e explicit-phases.

Hopefully the final nixpkgs-review.

Result of nixpkgs-review pr 324693 run on x86_64-linux 1

2 packages marked as broken and skipped:
  • libvmi
  • qubes-core-vchan-xen
45 packages built:
  • qemu_xen (qemu_xen_4_19)
  • qemu_xen.debug (qemu_xen_4_19.debug)
  • qemu_xen.ga (qemu_xen_4_19.ga)
  • qemu_xen_4_16
  • qemu_xen_4_16.debug
  • qemu_xen_4_16.ga
  • qemu_xen_4_17
  • qemu_xen_4_17.debug
  • qemu_xen_4_17.ga
  • qemu_xen_4_18
  • qemu_xen_4_18.debug
  • qemu_xen_4_18.ga
  • xen
  • xen-guest-agent
  • xen-slim
  • xen-slim.boot
  • xen-slim.dev
  • xen-slim.man
  • xen.boot
  • xen.dev
  • xen.man
  • xenPackages.xen_4_16
  • xenPackages.xen_4_16-slim
  • xenPackages.xen_4_16-slim.boot
  • xenPackages.xen_4_16-slim.dev
  • xenPackages.xen_4_16-slim.man
  • xenPackages.xen_4_16.boot
  • xenPackages.xen_4_16.dev
  • xenPackages.xen_4_16.man
  • xenPackages.xen_4_17
  • xenPackages.xen_4_17-slim
  • xenPackages.xen_4_17-slim.boot
  • xenPackages.xen_4_17-slim.dev
  • xenPackages.xen_4_17-slim.man
  • xenPackages.xen_4_17.boot
  • xenPackages.xen_4_17.dev
  • xenPackages.xen_4_17.man
  • xenPackages.xen_4_18
  • xenPackages.xen_4_18-slim
  • xenPackages.xen_4_18-slim.boot
  • xenPackages.xen_4_18-slim.dev
  • xenPackages.xen_4_18-slim.man
  • xenPackages.xen_4_18.boot
  • xenPackages.xen_4_18.dev
  • xenPackages.xen_4_18.man

Copy link
Copy Markdown
Contributor

@Kreyren Kreyren left a comment

Choose a reason for hiding this comment

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

As discussed in nixos devel chat and with nixos security team representative for the approach to get this implemented and maintained.

Refer to the linked discussion for usage notes in production/mission critical environment.

There are too many changes to list between these versions,
but here's what's important for Nixpkgs:

- Enabled xen.efi building, allowing the nixos/xen module to
  support EFI booting.

- Renamed xen-light to xen-slim, and removed the old xen-slim
  package, as qemu-traditional has been removed per an upstream
  recommendation.

- xen-slim (formerly xen-light) no longer builds iPXE.

- You can now use the OVMF from Xen's repos.

- Further generalised generic.nix. Maintaining three versions
  at once is finally doable.

- Removed as many recursions as possible.

- Split the package output.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
The update script is interactive, not automated, and is meant to run
with human intervention in order to verify Xen's code signature. It
produces default.nix files for all security-supported branches.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
xen-light was dropped in favour of xen and xen-slim

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
Reviewed-by: Matei Dibu <contact@mateidibu.dev>
In function 'libvchan__check_domain_alive':
  error: unknown type name 'xc_dominfo_t'; did you mean 'xc_meminfo_t'?
  error: implicit declaration of function 'xc_domain_getinfo'; did you mean 'xc_domain_getvnuma'? [-Werror=implicit-function-declaration]
  error: request for member 'domid' in something not a structure or union
  error: request for member 'dying' in something not a structure or union

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
Reviewed-by: Joachim Ernst <mail-maintainer@0x4A6F.dev>
In file included from ./driver/xen/xen_private.h:42,
  error: unknown type name 'xc_dominfo_t'; did you mean 'xc_meminfo_t'?

PR NixOS#328873 reverts this commit and updates LibVMI.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
@emilazy
Copy link
Copy Markdown
Member

emilazy commented Aug 1, 2024

Congrats on this huge achievement!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: xen-project Issues and PRs related to the Xen Project Hypervisor. 8.has: clean-up This PR removes packages or removes other cruft 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 12.approvals: 3+ This PR was reviewed and approved by three or more persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. 12.first-time contribution This PR is the author's first one; please be gentle!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update request: xen 4.15.1 → 4.18.1 xen: use system ipxe instead of internal one