[PATCH 4/5] qemu_command: Generate cmd line for UEFI shim

Michal Privoznik posted 5 patches 6 days, 4 hours ago
[PATCH 4/5] qemu_command: Generate cmd line for UEFI shim
Posted by Michal Privoznik 6 days, 4 hours ago
Trivial.

Resolves: https://issues.redhat.com/browse/RHEL-68043
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 src/qemu/qemu_command.c                                         | 2 ++
 .../launch-security-sev-direct.x86_64-latest.args               | 1 +
 2 files changed, 3 insertions(+)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 0ad73af335..c3d1d8dd70 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -6026,6 +6026,8 @@ qemuBuildBootCommandLine(virCommand *cmd,
         virCommandAddArgList(cmd, "-initrd", def->os.initrd, NULL);
     if (def->os.cmdline)
         virCommandAddArgList(cmd, "-append", def->os.cmdline, NULL);
+    if (def->os.shim)
+        virCommandAddArgList(cmd, "-shim", def->os.shim, NULL);
     if (def->os.dtb)
         virCommandAddArgList(cmd, "-dtb", def->os.dtb, NULL);
     if (def->os.slic_table) {
diff --git a/tests/qemuxmlconfdata/launch-security-sev-direct.x86_64-latest.args b/tests/qemuxmlconfdata/launch-security-sev-direct.x86_64-latest.args
index 09df8a7cb6..33f820f5ad 100644
--- a/tests/qemuxmlconfdata/launch-security-sev-direct.x86_64-latest.args
+++ b/tests/qemuxmlconfdata/launch-security-sev-direct.x86_64-latest.args
@@ -29,6 +29,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 -kernel /vmlinuz \
 -initrd /initrd \
 -append runme \
+-shim /shim \
 -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","read-only":false}' \
 -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-storage","id":"ide0-0-0","bootindex":1}' \
-- 
2.45.3