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

Allow default kernelopts be specified by a kernel package #4839

Closed
marmarek opened this issue Feb 23, 2019 · 0 comments
Closed

Allow default kernelopts be specified by a kernel package #4839

marmarek opened this issue Feb 23, 2019 · 0 comments
Labels
C: core P: major Priority: major. Between "default" and "critical" in severity. release notes This issue should be mentioned in the release notes. T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality.
Milestone

Comments

@marmarek
Copy link
Member

Kernel options are specific to kernel (especially if that's non-Linux kernel), rather than particular qube. While setting custom kernel options should be possible on per-qube basis, the defaults should be provided by the kernel package.
Additionally (at least for Linux) different options are needed if the qube have any PCI device assigned.

Implement support for default-kernelopts-pci.txt and default-kernelopts-nopci.txt files in kernel directory (/var/lib/qubes/vm-kernels/KERNEL_VERSION) to provide those default.

Things to consider:

  • how it should interact with getting default kernelopts for template-based qubes from its template
  • should there be separate files depending on virt_mode property? Like default-kernelopts-pvh-nopci.txt, default-kernelopts-hvm-nopci.txt etc?

This is related to #4468, which shows why kernel options should be specific to a kernel package, not only to a qube.

@marmarek marmarek added T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality. C: core P: major Priority: major. Between "default" and "critical" in severity. release notes This issue should be mentioned in the release notes. labels Feb 23, 2019
@marmarek marmarek added this to the Release 4.1 milestone Feb 23, 2019
marmarek added a commit to marmarek/qubes-core-admin that referenced this issue Feb 23, 2019
If default-kernelopts-pci.txt is present, it will override default
built-in kernelopts for the VMs with PCI device assigned.
Similarly if default-kernelopts-nopci.txt is present, it will override
default kernelopts for VMs without PCI devices.
For template-based VMs, kernelopts of the template takes precedence over
default-kernelopts-nopci.txt but not default-kernelopts-pci.txt.

Fixes QubesOS/qubes-issues#4839
marmarek added a commit to marmarek/qubes-core-admin that referenced this issue Feb 25, 2019
If kernel package ships default-kernelopts-common.txt file, use that
instead of hardcoded Linux-specific options.
For Linux kernel it may include xen_scrub_pages=0 option, but only if
initrd shipped with this kernel re-enable this option later.

QubesOS/qubes-issues#4839
QubesOS/qubes-issues#4736
marmarek added a commit to marmarek/qubes-core-admin that referenced this issue Feb 25, 2019
If kernel package ships default-kernelopts-common.txt file, use that
instead of hardcoded Linux-specific options.
For Linux kernel it may include xen_scrub_pages=0 option, but only if
initrd shipped with this kernel re-enable this option later.

QubesOS/qubes-issues#4839
QubesOS/qubes-issues#4736
marmarek added a commit to marmarek/qubes-core-admin that referenced this issue Feb 27, 2019
If kernel package ships default-kernelopts-common.txt file, use that
instead of hardcoded Linux-specific options.
For Linux kernel it may include xen_scrub_pages=0 option, but only if
initrd shipped with this kernel re-enable this option later.

QubesOS/qubes-issues#4839
QubesOS/qubes-issues#4736
marmarek added a commit to marmarek/qubes-linux-kernel that referenced this issue Mar 15, 2019
…tions

Default kernel options like root= or plymouth.enable are specific to the
kernel package (and initrd bundled with it). Start migrating away from
built-in defaults in core-admin by adding a file in kernel package
containing those options.

Also, if new enough initramfs is included, add xen_scrub_pages=0 which
will speed up the domain start.

QubesOS/qubes-issues#4839
QubesOS/qubes-issues#4736
marmarek added a commit to QubesOS/qubes-linux-kernel that referenced this issue Mar 19, 2019
…tions

Default kernel options like root= or plymouth.enable are specific to the
kernel package (and initrd bundled with it). Start migrating away from
built-in defaults in core-admin by adding a file in kernel package
containing those options.

Also, if new enough initramfs is included, add xen_scrub_pages=0 which
will speed up the domain start.

QubesOS/qubes-issues#4839
QubesOS/qubes-issues#4736

(cherry picked from commit 9cfa9a9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: core P: major Priority: major. Between "default" and "critical" in severity. release notes This issue should be mentioned in the release notes. T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality.
Projects
None yet
Development

No branches or pull requests

1 participant