vmspawn: add --cxl= option and memory hotplug support
Add --cxl=BOOL option to enable CXL (Compute Express Link) support in the virtual machine. CXL is a high-speed interconnect standard that allows CPUs to access memory attached to devices such as accelerators and memory expanders, enabling flexible memory pooling and expansion beyond what is physically installed on the motherboard. When enabled, adds cxl=on to the QEMU machine configuration. Only supported on x86_64 and aarch64 architectures. This is added for testing purposes and for feature parity with mkosi's CXL= setting. Extend --ram= to accept an optional maximum size for memory hotplug, using the syntax --ram=SIZE[:MAXSIZE] (e.g. --ram=2G:8G). When a maximum is specified, the maxmem key is added to the QEMU memory configuration section to enable memory hotplug up to the given limit. Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
committed by
Daan De Meyer
parent
b98d532a6c
commit
6a9888c4c6
@@ -31,7 +31,7 @@ _systemd_vmspawn() {
|
||||
local -A OPTS=(
|
||||
[STANDALONE]='-h --help --version -q --quiet --no-pager -n --network-tap --network-user-mode --user --system -x --ephemeral'
|
||||
[PATH]='-D --directory -i --image --linux --initrd --extra-drive --forward-journal --efi-nvram-template'
|
||||
[BOOL]='--kvm --vsock --tpm --discard-disk --register --pass-ssh-key'
|
||||
[BOOL]='--kvm --cxl --vsock --tpm --discard-disk --register --pass-ssh-key'
|
||||
[SECURE_BOOT]='--secure-boot'
|
||||
[FIRMWARE]='--firmware'
|
||||
[FIRMWARE_FEATURES]='--firmware-features'
|
||||
|
||||
Reference in New Issue
Block a user