From nobody Sat Oct 24 20:21:00 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1791900194; cv=none; d=zohomail.com; s=zohoarc; b=HvhGuUMyyUc5flNWrTGEMxtQSofC31ChPI57EPvo+Bx6ZyXuPRLvTDr8Fa+8OW/4dCSr63/g3c2WUp75teTNkrUauZOqlAvmFFcNSpNwT5mTgeAltuxepPV8y6TkgArmwkKjVCkPSFcwuz+hJBCUOH84tFScvMhi/yKrzMT26Go= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1791900194; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:Subject:Subject:To:To:Message-Id:Cc; bh=tvJ8UWQXbhu/iaJzjuanIcokCujIDVxB3ulXjBc8iGA=; b=lEApSuLYQUGtQBr/PtattPTbJjUOz+DSzPYZe4duQrC5GCKcTTdS+ROhfIGDEAEKyhibX7lOgiSQ38rOZNqGOomL45aDyVs018j0VBrzfX4kJrdbiIxfkookHlWNc2CVwXCdCwQ0NbO9cc93FW7QR6RqpVlgAogH/Q8Xrb9sRKo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [38.145.34.151]) by mx.zohomail.com with SMTPS id 1791900194072330.11766421307266; Tue, 13 Oct 2026 07:03:14 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id B5735418C2; Tue, 13 Oct 2026 10:03:12 -0400 (EDT) Received: from [172.19.199.16] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id 4F6A141AE7; Tue, 13 Oct 2026 10:00:18 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id AA9893F35F; Tue, 13 Oct 2026 10:00:07 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 4811F3F332 for ; Tue, 13 Oct 2026 10:00:05 -0400 (EDT) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-687-6BbhHb2xPRqSTwhZdvrD0Q-1; Tue, 13 Oct 2026 14:00:03 +0000 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3B415185FCF7 for ; Tue, 13 Oct 2026 14:00:02 +0000 (UTC) Received: from hjs (unknown [10.43.3.146]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9E4AC1956041 for ; Tue, 13 Oct 2026 14:00:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1791900004; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tvJ8UWQXbhu/iaJzjuanIcokCujIDVxB3ulXjBc8iGA=; b=OOL94TI6plaU1sXVDd/JUOmdNydeT2+y85IKEq09iMrsscMhcl1DPSc4XR+rnf1WiKIHxz kC1YHJ62mrQ9GdUWMNB9EnTOwE8E21w7uOVzIOhjwoLDqkPH9S1Huc3uGgAGUqsM/QR7Mq eE1jZIvH+nyIP2hzZ0nYSX2nG4ADKN8= X-MC-Unique: 6BbhHb2xPRqSTwhZdvrD0Q-1 X-Mimecast-MFC-AGG-ID: 6BbhHb2xPRqSTwhZdvrD0Q_1791900002 To: devel@lists.libvirt.org Subject: [libvirt PATCH] qemu: save virtiofs capabilities in status XML Date: Tue, 13 Oct 2026 15:59:50 +0200 Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: wNpCYEHNBPTHANmOXginDbIgfb_SfJ7Ez53Hzpg1zaI_1791900002 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 4JFUSVZ454YSVEZ6PIBWY6KHQVNTSDCI X-Message-ID-Hash: 4JFUSVZ454YSVEZ6PIBWY6KHQVNTSDCI X-MailFrom: jtomko@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?J=C3=A1n_Tomko_via_Devel?= Reply-To: =?UTF-8?q?J=C3=A1n=20Tomko?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1791900196851158500 From: J=C3=A1n Tomko Otherwise migration after daemon restart stops working. https://redhat.atlassian.net/browse/RHEL-90387 Signed-off-by: J=C3=A1n Tomko Reviewed-by: Michal Privoznik --- src/conf/domain_conf.c | 9 + tests/qemustatusxml2xmldata/virtiofs-in.xml | 437 +++++++++++++++++++ tests/qemustatusxml2xmldata/virtiofs-out.xml | 1 + tests/qemuxmlactivetest.c | 2 + 4 files changed, 449 insertions(+) create mode 100644 tests/qemustatusxml2xmldata/virtiofs-in.xml create mode 120000 tests/qemustatusxml2xmldata/virtiofs-out.xml diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 94a1f8bd8e..69c2304f28 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -9564,6 +9564,7 @@ virDomainFSDefParseXML(virDomainXMLOption *xmlopt, if (def->fsdriver =3D=3D VIR_DOMAIN_FS_DRIVER_TYPE_VIRTIOFS) { g_autofree char *queue_size =3D virXPathString("string(./driver/@q= ueue)", ctxt); g_autofree char *binary =3D virXPathString("string(./binary/@path)= ", ctxt); + g_autofree char *caps =3D virXPathString("string(./binary/@caps)",= ctxt); g_autofree char *thread_pool_size =3D virXPathString("string(./bin= ary/thread_pool/@size)", ctxt); g_autofree char *openfiles =3D virXPathString("string(./binary/ope= nfiles/@max)", ctxt); xmlNodePtr binary_node =3D virXPathNode("./binary", ctxt); @@ -9600,6 +9601,9 @@ virDomainFSDefParseXML(virDomainXMLOption *xmlopt, if (binary) def->binary =3D virFileSanitizePath(binary); =20 + if (caps) + def->caps =3D virBitmapParseUnlimitedAllowEmpty(caps); + if (virXMLPropTristateSwitch(binary_node, "xattr", VIR_XML_PROP_NONE, &def->xattr) < 0) @@ -25222,6 +25226,11 @@ virDomainFSDefFormat(virBuffer *buf, g_auto(virBuffer) lockAttrBuf =3D VIR_BUFFER_INITIALIZER; virBufferEscapeString(&binaryAttrBuf, " path=3D'%s'", def->binary); =20 + if (flags & VIR_DOMAIN_DEF_FORMAT_STATUS) { + g_autofree char *capsBitmap =3D virBitmapFormat(def->caps); + virBufferAsprintf(&binaryAttrBuf, " caps=3D'%s'", capsBitmap); + } + if (def->xattr !=3D VIR_TRISTATE_SWITCH_ABSENT) { virBufferAsprintf(&binaryAttrBuf, " xattr=3D'%s'", virTristateSwitchTypeToString(def->xattr)); diff --git a/tests/qemustatusxml2xmldata/virtiofs-in.xml b/tests/qemustatus= xml2xmldata/virtiofs-in.xml new file mode 100644 index 0000000000..eeb40428bf --- /dev/null +++ b/tests/qemustatusxml2xmldata/virtiofs-in.xml @@ -0,0 +1,437 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2 + + upstream + dcf47dbd-46d1-4d5b-b442-262a806a333a + 1024000 + 1024000 + + + + 8 + + + + + /machine + + + hvm + + + + + + + + + + + + + + + + + + + + destroy + restart + restart + + + + + + /usr/bin/qemu-system-x86_64 + + + + + +
+ + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + + + +
+ + + +
+ + + +
+ + + + + + + + + + +
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ + + + +
+ + + +
+ + + + + + + + + + + + + +
+ +