Re: [libvirt PATCH] qemu: qemuDomainSetLaunchSecurityState: do not lookup qemuCaps in cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On a Monday in 2022, Peter Krempa wrote:
On Mon, Jan 31, 2022 at 13:40:34 +0100, Ján Tomko wrote:
Any active domain has a copy in the privateData, filled in
qemuProcessInit.

Move the qemu capability check below the activeness check and remove
the extra lookup.

What's worse is that you can get caps for a different emulator binary
since the code didn't even bother passing the path to the lookup
function.


Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 src/qemu/qemu_driver.c | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>


Thanks, I will squash this in before pushing:

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 57f286b343..698f57f00e 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -20044,7 +20044,7 @@ qemuDomainSetLaunchSecurityState(virDomainPtr domain,
     if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SEV_INJECT_LAUNCH_SECRET)) {
         virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
                        _("QEMU does not support setting a launch secret"));
-        goto cleanup;
+        goto endjob;
     }

     qemuDomainObjEnterMonitor(driver, vm);

Jano

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux