Make it more obvious that we care about passing FDs on the commandline before startup of qemu, which is used to avoid startup monitor polling. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_capabilities.c | 4 ++-- src/qemu/qemu_capabilities.h | 2 +- src/qemu/qemu_command.c | 2 +- src/qemu/qemu_process.c | 6 +++--- tests/qemuxml2argvtest.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 18d82bc5f3..eb2e2b10c0 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -491,7 +491,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "blockdev-del", /* QEMU_CAPS_BLOCKDEV_DEL */ "vmgenid", /* QEMU_CAPS_DEVICE_VMGENID */ "vhost-vsock", /* QEMU_CAPS_DEVICE_VHOST_VSOCK */ - "chardev-fd-pass", /* QEMU_CAPS_CHARDEV_FD_PASS */ + "chardev-fd-pass", /* QEMU_CAPS_CHARDEV_FD_PASS_COMMANDLINE */ /* 305 */ "tpm-emulator", /* QEMU_CAPS_DEVICE_TPM_EMULATOR */ @@ -3232,7 +3232,7 @@ static struct virQEMUCapsCommandLineProps virQEMUCapsCommandLine[] = { { "boot-opts", "strict", QEMU_CAPS_BOOT_STRICT }, { "boot-opts", "reboot-timeout", QEMU_CAPS_REBOOT_TIMEOUT }, { "boot-opts", "splash-time", QEMU_CAPS_SPLASH_TIMEOUT }, - { "chardev", "fd", QEMU_CAPS_CHARDEV_FD_PASS }, + { "chardev", "fd", QEMU_CAPS_CHARDEV_FD_PASS_COMMANDLINE }, { "drive", "discard", QEMU_CAPS_DRIVE_DISCARD }, { "drive", "detect-zeroes", QEMU_CAPS_DRIVE_DETECT_ZEROES }, { "drive", "throttling.bps-total-max", QEMU_CAPS_DRIVE_IOTUNE_MAX}, diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 2b1bb57a49..673e26d502 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -471,7 +471,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ QEMU_CAPS_BLOCKDEV_DEL, /* blockdev-del is supported */ QEMU_CAPS_DEVICE_VMGENID, /* -device vmgenid */ QEMU_CAPS_DEVICE_VHOST_VSOCK, /* -device vhost-vsock-* */ - QEMU_CAPS_CHARDEV_FD_PASS, /* Passing pre-opened FDs for chardevs */ + QEMU_CAPS_CHARDEV_FD_PASS_COMMANDLINE, /* Passing pre-opened FDs for chardevs on commandline */ /* 305 */ QEMU_CAPS_DEVICE_TPM_EMULATOR, /* -tpmdev emulator */ diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index ecfed19432..9f3eb22b60 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4957,7 +4957,7 @@ qemuBuildChrChardevStr(virLogManager *logManager, virBufferAsprintf(&buf, "socket,id=%s", charAlias); if (dev->data.nix.listen && (cdevflags & QEMU_BUILD_CHARDEV_UNIX_FD_PASS) && - virQEMUCapsGet(qemuCaps, QEMU_CAPS_CHARDEV_FD_PASS)) { + virQEMUCapsGet(qemuCaps, QEMU_CAPS_CHARDEV_FD_PASS_COMMANDLINE)) { int fd; if (qemuSecuritySetSocketLabel(secManager, (virDomainDef *)def) < 0) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 4264191a9a..0bd3cbafd6 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -2341,7 +2341,7 @@ qemuProcessWaitForMonitor(virQEMUDriver *driver, bool retry = true; if (priv->qemuCaps && - virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_CHARDEV_FD_PASS)) + virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_CHARDEV_FD_PASS_COMMANDLINE)) retry = false; VIR_DEBUG("Connect monitor to vm=%p name='%s' retry=%d", @@ -5553,7 +5553,7 @@ qemuProcessPrepareQEMUCaps(virDomainObj *vm, return -1; if (processStartFlags & VIR_QEMU_PROCESS_START_STANDALONE) - virQEMUCapsClear(priv->qemuCaps, QEMU_CAPS_CHARDEV_FD_PASS); + virQEMUCapsClear(priv->qemuCaps, QEMU_CAPS_CHARDEV_FD_PASS_COMMANDLINE); /* Update qemu capabilities according to lists passed in via namespace */ if (qemuProcessStartUpdateCustomCaps(vm) < 0) @@ -8513,7 +8513,7 @@ qemuProcessReconnect(void *opaque) if (qemuHostdevUpdateActiveDomainDevices(driver, obj->def) < 0) goto error; - if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_CHARDEV_FD_PASS)) + if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_CHARDEV_FD_PASS_COMMANDLINE)) retry = false; if (qemuDomainObjStartWorker(obj) < 0) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index ef90f663c1..f7109fcbd3 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1617,7 +1617,7 @@ mymain(void) DO_TEST("misc-no-reboot", NONE); DO_TEST("misc-uuid", NONE); DO_TEST_PARSE_ERROR("vhost_queues-invalid", NONE); - DO_TEST("net-vhostuser", QEMU_CAPS_CHARDEV_FD_PASS); + DO_TEST("net-vhostuser", QEMU_CAPS_CHARDEV_FD_PASS_COMMANDLINE); DO_TEST_CAPS_LATEST("net-vhostuser"); DO_TEST("net-vhostuser-multiq", NONE); DO_TEST_FAILURE("net-vhostuser-fail", NONE); -- 2.31.1