Commit Graph

14 Commits (ec4539c6066edf25e52ed8e2d35c4be7ef39f729)

Author SHA1 Message Date
David Hildenbrand f3dcb60619 feat(qemu): include the virtio_mem kernel module
This adds support for virtio-mem devices, which provide a dynamic
amount of memory in a VM. Right now, the driver gets loaded and any
memory gets added to the system when loading the kernel module from disk.

While not strictly required to boot, we want to be able to
1) add virito-mem provided memory to the system early while booting up
2) add virtio-mem provided memory even when booting without a disk
3) add virtio-mem devices without adding actual memory in kdump
   environments such that we can query things like:
 a) is a certain PFN currently plugged in the hypervisor and, therefore,
    should actually be read when creating a system dump. (kexec-tools
    prepares the vmcore header, like on x86-64)
 b) which ranges of a virtio-mem device are currently plugged in the
    hypervisor and, therefore, should be added to the dump. (vmcore header
    gets prepared by the crashkernel, like on s390x)
 Note that loading virtio-mem in kdump environments currently fails with
 -EBUSY -- but there are plans to install proper hooks instead to support
  especially a) in the near future.

1) and 2) are only really effective when memory hotplug is configured to
automatically online all added system RAM in the kernel (and not late,
via udev rules): e.g., via "mhp_default_state=online" on the kernel
cmdline or via CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE in the kernel.

Especially 2) and 3) require the module to be present inside the initial
ramdisk. The primary use case for including it in the initial ramdisk
is 3).

Signed-off-by: David Hildenbrand <david@redhat.com>
2021-03-18 15:04:10 +01:00
Harald Hoyer 9a52c3fdb0 style: shfmt reformat
reproducible with:

```
$ shfmt_version=3.0.1
$ wget "https://github.com/mvdan/sh/releases/download/v${shfmt_version}/shfmt_v${shfmt_version}_linux_amd64" -O shfmt
$ chmod u+x shfmt
$ ./shfmt -w .
```
2021-03-13 20:10:43 +01:00
Daniel Molkentin b6b1bf9202 Consollidate the qemu virtualization detection
Eventually, we could add a full virt detection routine.
This would be useful e.g. to determine inclusion of
ucode for hostonly setups.
2019-07-19 16:26:42 +02:00
Harald Hoyer 21789cbb0a make qemu and qemu-net a default module in non-hostonly mode 2017-10-25 13:00:39 +02:00
David Michael 73db316ef2 qemu: include the qemu_fw_cfg kernel module
This adds support for /sys/firmware/qemu_fw_cfg on QEMU guests
started with the -fw_cfg option.
2016-08-16 13:43:18 -07:00
Harald Hoyer 4135eea634 90qemu: fixed systemd-detect-virt output parsing
redirecting systemd-detect-virt to /dev/null doesn't help with parsing
the output :-/

Also, add "Red Hat" as a vendor.
2015-07-31 09:05:51 +02:00
Harald Hoyer cce34acace qemu: add spapr-vscsi kernel module 2015-07-28 11:55:04 +02:00
Harald Hoyer ebc82d38b7 qemu: add virtio_rng kernel module 2015-01-08 13:19:43 +01:00
Harald Hoyer 5058ae2d29 qemu: install virtio_console kernel module
https://bugzilla.redhat.com/show_bug.cgi?id=1097999
2014-09-12 10:03:59 +02:00
Harald Hoyer 967cc19ab1 remove all vim and emacs code format comments 2014-08-29 13:38:47 +02:00
Harald Hoyer 8bcfd683bd */module-setup.sh: add comments for dracut called functions 2013-10-08 10:37:56 +02:00
Harald Hoyer aa09b74a41 dash compat: use "2>&1" rather than "&>" 2012-09-20 10:26:14 +02:00
Harald Hoyer f1040fc470 qemu*/module-setup.sh: provide alternative for systemd-detect-virt 2012-07-25 16:03:49 +02:00
Harald Hoyer 1488a9b34d Add qemu kernel modules, if we detect a qemu instance
Regardless of the host-only setting, add all know kernel driver for qemu
instances to support changing the virtual hardware.
2012-06-29 12:41:25 +02:00