Skip to content

feat(qemu): disable Xen support#16462

Draft
christopherco wants to merge 1 commit intotomls/base/mainfrom
chrco/remove-xen
Draft

feat(qemu): disable Xen support#16462
christopherco wants to merge 1 commit intotomls/base/mainfrom
chrco/remove-xen

Conversation

@christopherco
Copy link
Copy Markdown
Collaborator

@christopherco christopherco commented Apr 5, 2026

Azure Linux targets Hyper-V/KVM, not Xen. Since our builders have the %fedora macro set, the upstream spec enables Xen on x86_64/aarch64 by default, pulling in xen-devel at build time and libxenstore.so.4 at runtime.

Override have_xen back to 0 via overlay. Verified: build succeeds and no output RPMs carry xen dependencies.

Part of fixing: workitem

Azure Linux targets Hyper-V/KVM, not Xen. Since our builders have the
%fedora macro set, the upstream spec enables Xen on x86_64/aarch64 by
default, pulling in xen-devel at build time and libxenstore.so.4 at
runtime.

Override have_xen back to 0 via overlay. Verified: build succeeds and
no output RPMs carry xen dependencies.
@christopherco christopherco marked this pull request as ready for review April 5, 2026 07:23
Copilot AI review requested due to automatic review settings April 5, 2026 07:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Azure Linux component config for qemu to avoid enabling Xen support inherited from Fedora-specific spec behavior, aligning the build/runtime dependencies with Azure Linux’s Hyper-V/KVM targets.

Changes:

  • Add a dedicated qemu.comp.toml with an overlay that forces %global have_xen 0.
  • Remove the now-customized qemu entry from components-full.toml so it’s sourced via the dedicated comp file.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
base/comps/qemu/qemu.comp.toml Introduces an overlay to disable Xen support in the upstream QEMU spec.
base/comps/components-full.toml Removes the plain qemu entry since QEMU is now defined via a dedicated *.comp.toml.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

[[components.qemu.overlays]]
description = "Disable Xen support - not needed for Azure Linux (Hyper-V/KVM only)"
type = "spec-search-replace"
regex = '%global have_xen 1'
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

The spec-search-replace regex is currently an unanchored literal (%global have_xen 1). To reduce fragility and avoid accidental substring matches if the upstream spec changes formatting (extra spaces, trailing conditionals, etc.), consider anchoring the pattern and allowing flexible whitespace (e.g., matching the whole line).

Suggested change
regex = '%global have_xen 1'
regex = '^\s*%global\s+have_xen\s+1\s*$'

Copilot uses AI. Check for mistakes.
[components.qemu]

# Disable Xen support — not applicable to Azure Linux's Hyper-V/KVM environment.
# The upstream spec enables Xen when %fedora is set (which it is on our builders),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Did you look at whether we should be disabling fedora for this spec? What other features are we getting that we wouldn't if we looked more like RHEL?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I didn't for this one, but it is a good analysis that can be done. I did a similar evaluation on edk2, but ended up going with fedora's version instead of rhel's since there were some valuable parts that the fedora edk2 build (namely 4MB OVMF support and IGVM). I'll do a similar analysis for qemu

@christopherco christopherco marked this pull request as draft April 6, 2026 22:27
@christopherco
Copy link
Copy Markdown
Collaborator Author

Bringing back to draft while I analyze fedora vs rhel qemu builds

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.

3 participants