From nobody Tue Apr 23 08:04:11 2024
Delivered-To: importer@patchew.org
Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17
as permitted sender) client-ip=209.51.188.17;
envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org;
helo=lists.gnu.org;
Authentication-Results: mx.zohomail.com;
dkim=pass;
spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as
permitted sender)
smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org;
dmarc=pass(p=quarantine dis=none) header.from=crudebyte.com
ARC-Seal: i=1; a=rsa-sha256; t=1584727367; cv=none;
d=zohomail.com; s=zohoarc;
b=BR+sMkt9YWIrcCYV/fbPRljugSp3FD9sCoKXOcovy5vLOLmI6GjYj6F1QTEQp3heAbr9GD2KYUzNmcy/TfGuWwKhuDzNWTVmCJ0MmlUgpvWg78g4YcquOBr82hoDKN64Rx45lHbla+QVAaKLxxA0WoK20KsIcuqOe81Z0xCUKmo=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
s=zohoarc;
t=1584727367;
h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To;
bh=B9RoK2aLNCCKJGUIXCo19T7dVfKYtpjQkK39vXd2DP0=;
b=DYwgGPX1S6Tt495GMV0lezRmZ+GlP9q5JKnKMtebRJaFE4lUFIWS06pZxYTuh2nqlwtbnlIptwmJiEmHxnxJMPP3TVnsKoCGytqhVIOmNBDnFdQFlqgb8AoGgnwXrPFE4BTdogATVXw9T2qoa4pGEhMMRA9UY4Cm7Dr5+YwZHkY=
ARC-Authentication-Results: i=1; mx.zohomail.com;
dkim=pass;
spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as
permitted sender)
smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org;
dmarc=pass header.from= (p=quarantine dis=none)
header.from=
Return-Path:
Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by
mx.zohomail.com
with SMTPS id 1584727367025575.8619457695829;
Fri, 20 Mar 2020 11:02:47 -0700 (PDT)
Received: from localhost ([::1]:57300 helo=lists1p.gnu.org)
by lists.gnu.org with esmtp (Exim 4.90_1)
(envelope-from )
id 1jFLyn-00058y-QA
for importer@patchew.org; Fri, 20 Mar 2020 14:02:45 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:39492)
by lists.gnu.org with esmtp (Exim 4.90_1)
(envelope-from
<77bfe734689fb2242218674195e202a6757a1644@lizzy.crudebyte.com>)
id 1jFLxz-0004SZ-PC
for qemu-devel@nongnu.org; Fri, 20 Mar 2020 14:01:56 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from
<77bfe734689fb2242218674195e202a6757a1644@lizzy.crudebyte.com>)
id 1jFLxy-0001ID-Qb
for qemu-devel@nongnu.org; Fri, 20 Mar 2020 14:01:55 -0400
Received: from lizzy.crudebyte.com ([91.194.90.13]:53025)
by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
(Exim 4.71)
(envelope-from
<77bfe734689fb2242218674195e202a6757a1644@lizzy.crudebyte.com>)
id 1jFLxy-0000Ik-KD
for qemu-devel@nongnu.org; Fri, 20 Mar 2020 14:01:54 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=crudebyte.com; s=lizzy; h=Cc:To:Subject:Date:From:References:In-Reply-To:
Message-Id:Content-Type:Content-Transfer-Encoding:MIME-Version:Content-ID:
Content-Description; bh=B9RoK2aLNCCKJGUIXCo19T7dVfKYtpjQkK39vXd2DP0=; b=XpZar
uFq7XuCEK2jWXWhYOjk29Ph4j8Vuad0vq4azYhFq6/ZkcluxTaYDjQc8oyXE/tpSRsVm1Dl4w96Qd
gPAVEFuCF6XrHFgncJ18F7fMJECpn2m+SwUU9gzPvQpn8el4DWRlCn+43hXbUf9b7RLJXUJT89Xb+
VPfN1Oc1gDm3ViCPsQa1vs9Dv41JTCfe9jdOlQzKfAawlFcbF+807aNaTyAupRPURqgpEKjZrt58M
zs4EiXtN3j7DC/G8fdXkVAbsAQ2PB5FVygIsyQKRMaWg0/F6fOdIv3L78PIpZrEMJoMJOmOo5N9v/
qh1J9kx3VwiAAMquY/5tZLI4kqC/Q==;
Message-Id:
<77bfe734689fb2242218674195e202a6757a1644.1584723662.git.qemu_oss@crudebyte.com>
In-Reply-To:
References:
From: Christian Schoenebeck
Date: Fri, 20 Mar 2020 17:46:38 +0100
Subject: [PATCH v2 1/4] docs: virtfs: add section separators
To: libvir-list@redhat.com
Cc: qemu-devel@nongnu.org,
Greg Kurz
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 91.194.90.13
X-BeenThere: qemu-devel@nongnu.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org
Sender: "Qemu-devel"
X-ZohoMail-DKIM: pass (identity @crudebyte.com)
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Signed-off-by: Christian Schoenebeck
Reviewed-by: J=C3=A1n Tomko
---
docs/formatdomain.html.in | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 594146009d..cc2c671c14 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -4084,13 +4084,20 @@
=20
+
Since 5.2.0, the filesystem element
has an optional attribute model with supported values
"virtio-transitional", "virtio-non-transitional", or "virtio".
See Virtio transitional devi=
ces
for more details.
+
+
=20
+
+ The filesystem element may contain the following subele=
ments:
+
+
driver
The optional driver element allows specifying further details
--=20
2.20.1
From nobody Tue Apr 23 08:04:11 2024
Delivered-To: importer@patchew.org
Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17
as permitted sender) client-ip=209.51.188.17;
envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org;
helo=lists.gnu.org;
Authentication-Results: mx.zohomail.com;
dkim=pass;
spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as
permitted sender)
smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org;
dmarc=pass(p=quarantine dis=none) header.from=crudebyte.com
ARC-Seal: i=1; a=rsa-sha256; t=1584727513; cv=none;
d=zohomail.com; s=zohoarc;
b=CQb5RJFyjEiveYMWAhUS27nAFeJXdCaqwtspQs+7y59py1xrffUnpfv14LZGzFyRuhR/BOFmhyBO9tzdX08Kfp3Ap2AxHgGXHJKizO5exFOX7B1fWe8Nl5W815ayATrjTfs6WYF2kw8GEKUCIFqGDY6MNbPZDqx8Wji9NAX6HJU=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
s=zohoarc;
t=1584727513;
h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To;
bh=waLIntpzbDuSwKzCLHhytuC1f3yRX6jYMW8l3WUmV68=;
b=W+Gm2CPzjUl9wSmUttI+gOocXvzDPh0tjUFST8qQz6LdDPVnqSZ3rDl8wkP4dcjcsx0Cba+QAokHsunIImmwhn1Mf/D0mMhCZnSoV87otZtoL92nbTJDUtevjsfnWtv5texBNO9zwx0MuG2uV9IlKGgSAqGyLogyboUJtsPi0+A=
ARC-Authentication-Results: i=1; mx.zohomail.com;
dkim=pass;
spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as
permitted sender)
smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org;
dmarc=pass header.from= (p=quarantine dis=none)
header.from=
Return-Path:
Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by
mx.zohomail.com
with SMTPS id 1584727513406805.4947368684077;
Fri, 20 Mar 2020 11:05:13 -0700 (PDT)
Received: from localhost ([::1]:57346 helo=lists1p.gnu.org)
by lists.gnu.org with esmtp (Exim 4.90_1)
(envelope-from )
id 1jFM1A-0007uW-7S
for importer@patchew.org; Fri, 20 Mar 2020 14:05:12 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:39939)
by lists.gnu.org with esmtp (Exim 4.90_1)
(envelope-from
<765dc71935420b8f517ffb72100e8b3fec8e4c9b@lizzy.crudebyte.com>)
id 1jFLzy-0006bZ-IO
for qemu-devel@nongnu.org; Fri, 20 Mar 2020 14:03:59 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from
<765dc71935420b8f517ffb72100e8b3fec8e4c9b@lizzy.crudebyte.com>)
id 1jFLzx-00048O-6z
for qemu-devel@nongnu.org; Fri, 20 Mar 2020 14:03:58 -0400
Received: from lizzy.crudebyte.com ([91.194.90.13]:35947)
by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
(Exim 4.71)
(envelope-from
<765dc71935420b8f517ffb72100e8b3fec8e4c9b@lizzy.crudebyte.com>)
id 1jFLzx-0002qd-0B
for qemu-devel@nongnu.org; Fri, 20 Mar 2020 14:03:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=crudebyte.com; s=lizzy; h=Cc:To:Subject:Date:From:References:In-Reply-To:
Message-Id:Content-Type:Content-Transfer-Encoding:MIME-Version:Content-ID:
Content-Description; bh=waLIntpzbDuSwKzCLHhytuC1f3yRX6jYMW8l3WUmV68=; b=po4vQ
8SdSuDFGht0NckrRMVXhFLITe49upClW+dFzkyLTvk/34VMic/VBk5B7pe7RAn0/O56n8jSeSOnGB
ubKtRsGOUdDEQ5P0S4OK7J/Guj89J8rj9dw4SWZ9K/KTeIPcJoCVRhm9COJGVnG50uDZIxXIlUUa6
Daz2of6+FF87hFEmKSZqINot09uktUGHEmzRpgt3TI4RbG9K2aN5aQ59BGz4e+1cXAbqvhMmhc6kh
GORpGUDGuj7iUQ9S/JzpxkvIceiK/1war7p9vjnsqNPE8GCrL1tVdGY+AC5GxpssrxzmeXakULMiw
/tE3ynUlP7dgCYRyqX8tbrZPkLx5g==;
Message-Id:
<765dc71935420b8f517ffb72100e8b3fec8e4c9b.1584723662.git.qemu_oss@crudebyte.com>
In-Reply-To:
References:
From: Christian Schoenebeck
Date: Fri, 20 Mar 2020 17:48:53 +0100
Subject: [PATCH v2 2/4] qemu: capabilities: add QEMU_CAPS_VIRTFS_MULTIDEVS
To: libvir-list@redhat.com
Cc: qemu-devel@nongnu.org,
Greg Kurz
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 91.194.90.13
X-BeenThere: qemu-devel@nongnu.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org
Sender: "Qemu-devel"
X-ZohoMail-DKIM: pass (identity @crudebyte.com)
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
The QEMU 9pfs 'multidevs' option exists since QEMU 4.2, so just
set this capability based on that QEMU version.
Signed-off-by: Christian Schoenebeck
---
src/qemu/qemu_capabilities.c | 5 +++++
src/qemu/qemu_capabilities.h | 1 +
tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 1 +
5 files changed, 9 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index a95a60c36a..68b6e166e9 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -567,6 +567,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
"query-named-block-nodes.flat",
"blockdev-snapshot.allow-write-only-overlay",
"blockdev-reopen",
+ "virtfs-multidevs",
);
=20
=20
@@ -4837,6 +4838,10 @@ virQEMUCapsInitQMPVersionCaps(virQEMUCapsPtr qemuCap=
s)
ARCH_IS_PPC64(qemuCaps->arch)) {
virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_PSERIES_MAX_CPU_COMPAT);
}
+
+ /* -virtfs multidevs option is supported since QEMU 4.2 */
+ if (qemuCaps->version >=3D 4002000)
+ virQEMUCapsSet(qemuCaps, QEMU_CAPS_VIRTFS_MULTIDEVS);
}
=20
=20
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index f0961e273c..a6025312be 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -548,6 +548,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for =
syntax-check */
QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT, /* query-named-block-nodes=
supports the 'flat' option */
QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY, /* blockdev-snapshot has=
the 'allow-write-only-overlay' feature */
QEMU_CAPS_BLOCKDEV_REOPEN, /* 'blockdev-reopen' qmp command is support=
ed */
+ QEMU_CAPS_VIRTFS_MULTIDEVS, /* -virtfs multidevs supported by virtio-9=
p */
=20
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml b/tests/qemuc=
apabilitiesdata/caps_4.2.0.x86_64.xml
index 83e804ea36..d8b0de46cd 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
@@ -223,6 +223,7 @@
+ 4002000043100242
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml b/tests/qemu=
capabilitiesdata/caps_5.0.0.aarch64.xml
index e52c60607d..3a695fbe79 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
@@ -181,6 +181,7 @@
+ 4002050061700241
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml b/tests/qemuc=
apabilitiesdata/caps_5.0.0.x86_64.xml
index d773f7e356..95fa0813dd 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
@@ -226,6 +226,7 @@
+ 4002050043100241
--=20
2.20.1
From nobody Tue Apr 23 08:04:11 2024
Delivered-To: importer@patchew.org
Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17
as permitted sender) client-ip=209.51.188.17;
envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org;
helo=lists.gnu.org;
Authentication-Results: mx.zohomail.com;
dkim=pass;
spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as
permitted sender)
smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org;
dmarc=pass(p=quarantine dis=none) header.from=crudebyte.com
ARC-Seal: i=1; a=rsa-sha256; t=1584727244; cv=none;
d=zohomail.com; s=zohoarc;
b=JPUkd3cQdMT2XJXzBLLarJp86GKQcwRCpDefPKrQQEYJsgw6eSCd7nPvuVK05U/2Fr63OvNopxPb8kjcIrF2ykDY/KFHvBdCVenovrEiLxLkkwkTLgnFrFl5E3MG1J8PcJH+xbGbw158ZaHztU2TU9Mxi0Xt9FX0b+EDaCiCb9E=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
s=zohoarc;
t=1584727244;
h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To;
bh=aSFPumI060vrsGGcam3KjHjMgS6gIvm9ZtHfi26NJs8=;
b=IIPWgbuO2lZju0OaOanxvV0nOmvzTriOVI57JYR5zB6sZmOZIFNRpF8VBbeFliPEf/2CuD4D6bqYOUP71M1SGQhdUs8xL8D6AVq4cglhFSlFedPMRBJMbWBWY0W3zV/oxV8XpKe7PboErPIrzQlHMfidcx2Z2wD34V5GH5zZuWI=
ARC-Authentication-Results: i=1; mx.zohomail.com;
dkim=pass;
spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as
permitted sender)
smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org;
dmarc=pass header.from= (p=quarantine dis=none)
header.from=
Return-Path:
Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by
mx.zohomail.com
with SMTPS id 1584727244418886.9118004517527;
Fri, 20 Mar 2020 11:00:44 -0700 (PDT)
Received: from localhost ([::1]:57254 helo=lists1p.gnu.org)
by lists.gnu.org with esmtp (Exim 4.90_1)
(envelope-from )
id 1jFLwk-0003F9-4H
for importer@patchew.org; Fri, 20 Mar 2020 14:00:38 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:38958)
by lists.gnu.org with esmtp (Exim 4.90_1)
(envelope-from
<680df3de98cf66c7637fec5274761b535b9f4918@lizzy.crudebyte.com>)
id 1jFLw1-0002n5-Mi
for qemu-devel@nongnu.org; Fri, 20 Mar 2020 13:59:55 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from
<680df3de98cf66c7637fec5274761b535b9f4918@lizzy.crudebyte.com>)
id 1jFLvz-0007Z2-Q8
for qemu-devel@nongnu.org; Fri, 20 Mar 2020 13:59:53 -0400
Received: from lizzy.crudebyte.com ([91.194.90.13]:53895)
by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
(Exim 4.71)
(envelope-from
<680df3de98cf66c7637fec5274761b535b9f4918@lizzy.crudebyte.com>)
id 1jFLvz-0007FB-AW
for qemu-devel@nongnu.org; Fri, 20 Mar 2020 13:59:51 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=crudebyte.com; s=lizzy; h=Cc:To:Subject:Date:From:References:In-Reply-To:
Message-Id:Content-Type:Content-Transfer-Encoding:MIME-Version:Content-ID:
Content-Description; bh=aSFPumI060vrsGGcam3KjHjMgS6gIvm9ZtHfi26NJs8=; b=cQXO7
vK6ab9eDWETUGmfOuQKuFBGkqN5twrZXWMNV+DxbaaLMESY0zdXzEgJDSdV4TX1JqUJ03AyxL8EZm
1b87zJXMqYe39W5+bpBEtBN6TJclv/ues21sEVyFMjEyJmKNFLJT9G8bTd9Nspsq8daYEzyRW5ii6
4VQA0ywfuOtawV/jRG8vpRq9LIhJNtB+pmkbCDK6yWLoC7Ozan/uh3U8uuYfWGzE7jZuDjPk2ytzZ
HHWN6Rgg6AByIbkaP2cEAhDuO0a9cNL9JLeY8tZFRsAHUhvRM2Rh/oTdNGPRqD/YLxLuD33hwpvGb
PYep29VbE+46TIyeG0uZNPnstiw0w==;
Message-Id:
<680df3de98cf66c7637fec5274761b535b9f4918.1584723662.git.qemu_oss@crudebyte.com>
In-Reply-To:
References:
From: Christian Schoenebeck
Date: Fri, 20 Mar 2020 17:51:35 +0100
Subject: [PATCH v2 3/4] conf: add 'multidevs' option
To: libvir-list@redhat.com
Cc: qemu-devel@nongnu.org,
Greg Kurz
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 91.194.90.13
X-BeenThere: qemu-devel@nongnu.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org
Sender: "Qemu-devel"
X-ZohoMail-DKIM: pass (identity @crudebyte.com)
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Introduce new 'multidevs' option for filesystem.
This option prevents misbehaviours on guest if a qemu 9pfs export
contains multiple devices, due to the potential file ID collisions
this otherwise may cause.
Signed-off-by: Christian Schoenebeck
---
docs/formatdomain.html.in | 40 ++++++++++++++++++++++++++++++++++-
docs/schemas/domaincommon.rng | 10 +++++++++
src/conf/domain_conf.c | 29 +++++++++++++++++++++++++
src/conf/domain_conf.h | 13 ++++++++++++
4 files changed, 91 insertions(+), 1 deletion(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index cc2c671c14..13c506988b 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -3967,7 +3967,7 @@
<source name=3D'my-vm-template'/>
<target dir=3D'/'/>
</filesystem>
- <filesystem type=3D'mount' accessmode=3D'passthrough'>
+ <filesystem type=3D'mount' accessmode=3D'passthrough' multidevs=3D're=
map'>
<driver type=3D'path' wrpolicy=3D'immediate'/>
<source dir=3D'/export/to/guest'/>
<target dir=3D'/import/from/host'/>
@@ -4092,6 +4092,44 @@
for more details.
=20
+
+ The filesystem element has an optional attribute multidevs
+ which specifies how to deal with a filesystem export containing more=
than
+ one device, in order to avoid file ID collisions on guest when using=
9pfs
+ (since 6.2.0, requires QEMU 4.2).
+ This attribute is not available for virtiofs. The possible values ar=
e:
+
+
+
+
default
+
+ Use QEMU's default setting (which currently is warn).
+
+
remap
+
+ This setting allows guest to access multiple devices per export wi=
thout
+ encountering misbehaviours. Inode numbers from host are automatica=
lly
+ remapped on guest to actively prevent file ID collisions if guest
+ accesses one export containing multiple devices.
+
+
forbid
+
+ Only allow to access one device per export by guest. Attempts to a=
ccess
+ additional devices on the same export will cause the individual
+ filesystem access by guest to fail with an error and being logged =
(once)
+ as error on host side.
+
+
warn
+
+ This setting resembles the behaviour of 9pfs prior to QEMU 4.2, th=
at is
+ no action is performed to prevent any potential file ID collisions=
if an
+ export contains multiple devices, with the only exception: a warni=
ng is
+ logged (once) on host side now. This setting may lead to misbehavi=
ours
+ on guest side if more than one device is exported per export, due =
to the
+ potential file ID collisions this may cause on guest side in that =
case.
+
+
+
=20
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 6805420451..9b37740e30 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -2676,6 +2676,16 @@
+
+
+
+ default
+ remap
+ forbid
+ warn
+
+
+
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 71535f53f5..6a9a7dd0bb 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -501,6 +501,14 @@ VIR_ENUM_IMPL(virDomainFSModel,
"virtio-non-transitional",
);
=20
+VIR_ENUM_IMPL(virDomainFSMultidevs,
+ VIR_DOMAIN_FS_MULTIDEVS_LAST,
+ "default",
+ "remap",
+ "forbid",
+ "warn",
+);
+
VIR_ENUM_IMPL(virDomainFSCacheMode,
VIR_DOMAIN_FS_CACHE_MODE_LAST,
"default",
@@ -11376,6 +11384,7 @@ virDomainFSDefParseXML(virDomainXMLOptionPtr xmlopt,
g_autofree char *usage =3D NULL;
g_autofree char *units =3D NULL;
g_autofree char *model =3D NULL;
+ g_autofree char *multidevs =3D NULL;
=20
ctxt->node =3D node;
=20
@@ -11414,6 +11423,17 @@ virDomainFSDefParseXML(virDomainXMLOptionPtr xmlop=
t,
}
}
=20
+ multidevs =3D virXMLPropString(node, "multidevs");
+ if (multidevs) {
+ if ((def->multidevs =3D virDomainFSMultidevsTypeFromString(multide=
vs)) < 0) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("unknown multidevs '%s'"), multidevs);
+ goto error;
+ }
+ } else {
+ def->multidevs =3D VIR_DOMAIN_FS_MULTIDEVS_DEFAULT;
+ }
+
if (virDomainParseScaledValue("./space_hard_limit[1]",
NULL, ctxt, &def->space_hard_limit,
1, ULLONG_MAX, false) < 0)
@@ -25397,6 +25417,7 @@ virDomainFSDefFormat(virBufferPtr buf,
const char *accessmode =3D virDomainFSAccessModeTypeToString(def->acce=
ssmode);
const char *fsdriver =3D virDomainFSDriverTypeToString(def->fsdriver);
const char *wrpolicy =3D virDomainFSWrpolicyTypeToString(def->wrpolicy=
);
+ const char *multidevs =3D virDomainFSMultidevsTypeToString(def->multid=
evs);
const char *src =3D def->src->path;
g_auto(virBuffer) driverAttrBuf =3D VIR_BUFFER_INITIALIZER;
g_auto(virBuffer) driverBuf =3D VIR_BUFFER_INIT_CHILD(buf);
@@ -25415,6 +25436,12 @@ virDomainFSDefFormat(virBufferPtr buf,
return -1;
}
=20
+ if (!multidevs) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("unexpected multidevs %d"), def->multidevs);
+ return -1;
+ }
+
virBufferAsprintf(buf,
"model));
}
+ if (def->multidevs)
+ virBufferAsprintf(buf, " multidevs=3D'%s'", multidevs);
virBufferAddLit(buf, ">\n");
=20
virBufferAdjustIndent(buf, 2);
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 91b776c28a..23b7924781 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -796,6 +796,18 @@ typedef enum {
VIR_DOMAIN_FS_WRPOLICY_LAST
} virDomainFSWrpolicy;
=20
+/* How to handle exports containing multiple devices. */
+typedef enum {
+ VIR_DOMAIN_FS_MULTIDEVS_DEFAULT =3D 0, /* Use QEMU's default setting */
+ VIR_DOMAIN_FS_MULTIDEVS_REMAP, /* Remap inodes from host to guest */
+ VIR_DOMAIN_FS_MULTIDEVS_FORBID, /* Prohibit more than one device */
+ VIR_DOMAIN_FS_MULTIDEVS_WARN, /* Just log a warning if multiple device=
s */
+
+ VIR_DOMAIN_FS_MULTIDEVS_LAST
+} virDomainFSMultidevs;
+
+VIR_ENUM_DECL(virDomainFSMultidevs);
+
typedef enum {
VIR_DOMAIN_FS_MODEL_DEFAULT =3D 0,
VIR_DOMAIN_FS_MODEL_VIRTIO,
@@ -820,6 +832,7 @@ struct _virDomainFSDef {
int wrpolicy; /* enum virDomainFSWrpolicy */
int format; /* virStorageFileFormat */
int model; /* virDomainFSModel */
+ int multidevs; /* virDomainFSMultidevs */
unsigned long long usage; /* in bytes */
virStorageSourcePtr src;
char *dst;
--=20
2.20.1
From nobody Tue Apr 23 08:04:11 2024
Delivered-To: importer@patchew.org
Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17
as permitted sender) client-ip=209.51.188.17;
envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org;
helo=lists.gnu.org;
Authentication-Results: mx.zohomail.com;
dkim=pass;
spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as
permitted sender)
smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org;
dmarc=pass(p=quarantine dis=none) header.from=crudebyte.com
ARC-Seal: i=1; a=rsa-sha256; t=1584727453; cv=none;
d=zohomail.com; s=zohoarc;
b=Ft1eZ6lQ267cdBlOunTULsmEo3YEldiSKOF1q8INhSa31dGr3mllO/p+ZbqPnuQhb9d82TcB5gnlrPqE3flG55j+cs+T0wjlO8XTEdiLR0m38Gwi53HrlKC7iq+lOskB8ElqlIxDOLyWmsiGO6ZrpS0mAyrmicf7JwRkqmR13SM=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
s=zohoarc;
t=1584727453;
h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To;
bh=KPesT1KlQk2GePUADf96n6O82LMG+9/pKpM7fc0jnRU=;
b=DBpG3K0z+UPwTSq1jQfor4Of5+JYNnnkV+GWFRlOFzo6LnBrZLli1Zm9VpUn+Qtdh7GwpvPAQV6dlGMxSY8mpwXIWHWpzAcqlyeNgHsV4gBo7l1wxkgsFf6C0jWuwNBDKc9yoM0GkveYoO2zyk8jZlrOUsUlJ8D7YDrvhipfP2M=
ARC-Authentication-Results: i=1; mx.zohomail.com;
dkim=pass;
spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as
permitted sender)
smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org;
dmarc=pass header.from= (p=quarantine dis=none)
header.from=
Return-Path:
Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by
mx.zohomail.com
with SMTPS id 1584727453582837.8093479792936;
Fri, 20 Mar 2020 11:04:13 -0700 (PDT)
Received: from localhost ([::1]:57322 helo=lists1p.gnu.org)
by lists.gnu.org with esmtp (Exim 4.90_1)
(envelope-from )
id 1jFM0C-0006Uk-05
for importer@patchew.org; Fri, 20 Mar 2020 14:04:12 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:39709)
by lists.gnu.org with esmtp (Exim 4.90_1)
(envelope-from
)
id 1jFLyz-0005VG-1i
for qemu-devel@nongnu.org; Fri, 20 Mar 2020 14:02:57 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from
)
id 1jFLyx-0002qU-W2
for qemu-devel@nongnu.org; Fri, 20 Mar 2020 14:02:56 -0400
Received: from lizzy.crudebyte.com ([91.194.90.13]:38081)
by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
(Exim 4.71)
(envelope-from
)
id 1jFLyx-0001IN-Nr
for qemu-devel@nongnu.org; Fri, 20 Mar 2020 14:02:55 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=crudebyte.com; s=lizzy; h=Cc:To:Subject:Date:From:References:In-Reply-To:
Message-Id:Content-Type:Content-Transfer-Encoding:MIME-Version:Content-ID:
Content-Description; bh=KPesT1KlQk2GePUADf96n6O82LMG+9/pKpM7fc0jnRU=; b=YDS0A
nm83IqfBM4pYlm5HvgC8ljcE5CegmWfqlSPR5sKPCZKUNPgaNX8omsCGbZCrt+okHTQffOSmq6dZj
LUZkOi7BKTYCXOyD+wZNlOnujgY+MB0AyKFRPvLnEVxaVMPEwdXD1YAu888TxmccSurxcu6en3h3z
MmnY/TIoSFXYqGb0IcKg+33puUi9pp9DDZxSk1uTvNC+mWNvJClQgxAF7W1MHny7/KRLS7GdVXkM5
pGKgBZNTwlTSQDfvO5a3exAqJG+dXbBpdwkXluzNqmN1dPhm9YIL7CgQuXyXYRzzwdwvv1LrBdLtH
JhrU8vCplG4jYljU/uGx9JoUNRR+w==;
Message-Id:
In-Reply-To:
References:
From: Christian Schoenebeck
Date: Fri, 20 Mar 2020 17:54:32 +0100
Subject: [PATCH v2 4/4] qemu: add support for 'multidevs' option
To: libvir-list@redhat.com
Cc: qemu-devel@nongnu.org,
Greg Kurz
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 91.194.90.13
X-BeenThere: qemu-devel@nongnu.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org
Sender: "Qemu-devel"
X-ZohoMail-DKIM: pass (identity @crudebyte.com)
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
This option prevents misbehaviours on guest if a qemu 9pfs export
contains multiple devices, due to the potential file ID collisions
this otherwise may cause.
Signed-off-by: Christian Schoenebeck
---
src/qemu/qemu_command.c | 7 +++++++
src/qemu/qemu_domain.c | 12 ++++++++++++
2 files changed, 19 insertions(+)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 9790c92cf8..7020e5448c 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -2632,6 +2632,13 @@ qemuBuildFSStr(virDomainFSDefPtr fs)
} else if (fs->accessmode =3D=3D VIR_DOMAIN_FS_ACCESSMODE_SQUASH) {
virBufferAddLit(&opt, ",security_model=3Dnone");
}
+ if (fs->multidevs =3D=3D VIR_DOMAIN_FS_MULTIDEVS_REMAP) {
+ virBufferAddLit(&opt, ",multidevs=3Dremap");
+ } else if (fs->multidevs =3D=3D VIR_DOMAIN_FS_MULTIDEVS_FORBID) {
+ virBufferAddLit(&opt, ",multidevs=3Dforbid");
+ } else if (fs->multidevs =3D=3D VIR_DOMAIN_FS_MULTIDEVS_WARN) {
+ virBufferAddLit(&opt, ",multidevs=3Dwarn");
+ }
} else if (fs->fsdriver =3D=3D VIR_DOMAIN_FS_DRIVER_TYPE_HANDLE) {
/* removed since qemu 4.0.0 see v3.1.0-29-g93aee84f57 */
virBufferAddLit(&opt, "handle");
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index edc8ba2ddb..c54c64fadb 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -8529,6 +8529,13 @@ qemuDomainDeviceDefValidateFS(virDomainFSDefPtr fs,
_("only supports mount filesystem type"));
return -1;
}
+ if (fs->multidevs !=3D VIR_DOMAIN_FS_MODEL_DEFAULT &&
+ !virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTFS_MULTIDEVS))
+ {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("multidevs is not supported with this QEMU binary=
"));
+ return -1;
+ }
=20
switch ((virDomainFSDriverType) fs->fsdriver) {
case VIR_DOMAIN_FS_DRIVER_TYPE_DEFAULT:
@@ -8581,6 +8588,11 @@ qemuDomainDeviceDefValidateFS(virDomainFSDefPtr fs,
_("virtiofs is not supported with this QEMU bin=
ary"));
return -1;
}
+ if (fs->multidevs !=3D VIR_DOMAIN_FS_MULTIDEVS_DEFAULT) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("virtiofs does not support multidevs"));
+ return -1;
+ }
if (qemuDomainDefValidateVirtioFSSharedMemory(def) < 0)
return -1;
break;
--=20
2.20.1