From nobody Mon Feb 9 01:06:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1620839644; cv=none; d=zohomail.com; s=zohoarc; b=AjlKkfo3SSj/6fqc3UeIEZYxTZzE/tjif+usueeV85DatsNH7p+8g009PvfZowbPv4E8F3CjNytXIJgVjknBVc7yx+6wUjJ8Kg8UggF+pjtrKxi1dfgkS+msR9J5kKBmpnBecLvJ40e9Xuy7U8B7k+dJypvocN/MYHpI/BvL6Pw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620839644; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=NY0LOxjQks6h12L2zRIkR7lucNPXg9MO9zg9+bTJKE8=; b=YkcCvlszMwwB77/qWVW5p4SJlQrNUYYkWtCv4U+GvbRZXUjVLe5HFDYh3rBQiKElpsjkPyBX+8oFW3i6GKcfTEiudt6xy3CxbnQWZreyHKb+NSZB2/A+0Rft1g4pi4BpS83RtsSauhXpjQyL++xo6hcAwSKO4PMjLmR5VTT+YwQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1620839644865471.9698887816546; Wed, 12 May 2021 10:14:04 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-234-8ykKjv_nMP2Qlk3AKayJug-1; Wed, 12 May 2021 13:13:36 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E79F29F92F; Wed, 12 May 2021 17:13:31 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C77E95B6A3; Wed, 12 May 2021 17:13:31 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 954EE1800BB0; Wed, 12 May 2021 17:13:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 14CHDF10023887 for ; Wed, 12 May 2021 13:13:15 -0400 Received: by smtp.corp.redhat.com (Postfix) id 807DE100164C; Wed, 12 May 2021 17:13:15 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.40.195.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id E73F310016FC for ; Wed, 12 May 2021 17:13:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620839643; h=from:from:sender:sender: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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=NY0LOxjQks6h12L2zRIkR7lucNPXg9MO9zg9+bTJKE8=; b=Y+lIBTTCzJADGLm5KLlGjHjcSou2n2LIyeW+rls5b7TAyj2BWjgy8RqfTtxMR46jURR9IS eS8jumAAZAynhAddCNu0SSEl+1IBl2Ry+G7dAtFP4HrXQYWMEvNBoEJO/X1B+3neLb2bS+ SPz0QrbkR+sbOplJ8wTH6wIj6RZFSk4= X-MC-Unique: 8ykKjv_nMP2Qlk3AKayJug-1 From: Kristina Hanicova To: libvir-list@redhat.com Subject: [PATCH 1/2] conf: domcaps: Report device Date: Wed, 12 May 2021 19:12:55 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Kristina Hanicova --- docs/formatdomaincaps.html.in | 28 ++++++++++++++++++++++++++++ docs/schemas/domaincaps.rng | 10 ++++++++++ src/conf/domain_capabilities.c | 13 +++++++++++++ src/conf/domain_capabilities.h | 8 ++++++++ 4 files changed, 59 insertions(+) diff --git a/docs/formatdomaincaps.html.in b/docs/formatdomaincaps.html.in index 2d417b6953..62f1940e6a 100644 --- a/docs/formatdomaincaps.html.in +++ b/docs/formatdomaincaps.html.in @@ -518,6 +518,34 @@ =20 =20 +

Filesystem device

+

Filesystem device capabilities are exposed under the + filesystem element. For instance:

+ +
+<domainCapabilities>
+  ...
+  <devices>
+    <filesystem supported=3D'yes'>
+      <enum name=3D'driverType'>
+        <value>default</value>
+        <value>path</value>
+        <value>handle</value>
+        <value>virtiofs</value>
+      </enum>
+    </filesystem>
+    ...
+  </devices>
+</domainCapabilities>
+
+ +
+
driverType
+
Options for the type attribute of the + <filesystem><driver> element.
+
+ +

Features

=20

One more set of XML elements describe the supported features and diff --git a/docs/schemas/domaincaps.rng b/docs/schemas/domaincaps.rng index 83d93ee494..fc668e0c78 100644 --- a/docs/schemas/domaincaps.rng +++ b/docs/schemas/domaincaps.rng @@ -182,6 +182,9 @@ + + + =20 @@ -220,6 +223,13 @@ =20 + + + + + + + diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index d0586362ae..cb90ae0176 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -524,6 +524,18 @@ virDomainCapsDeviceRNGFormat(virBuffer *buf, } =20 =20 +static void +virDomainCapsDeviceFilesystemFormat(virBuffer *buf, + const virDomainCapsDeviceFilesystem *f= ilesystem) +{ + FORMAT_PROLOGUE(filesystem); + + ENUM_PROCESS(filesystem, driverType, virDomainFSDriverTypeToString); + + FORMAT_EPILOGUE(filesystem); +} + + /** * virDomainCapsFeatureGICFormat: * @buf: target buffer @@ -628,6 +640,7 @@ virDomainCapsFormat(const virDomainCaps *caps) virDomainCapsDeviceVideoFormat(&buf, &caps->video); virDomainCapsDeviceHostdevFormat(&buf, &caps->hostdev); virDomainCapsDeviceRNGFormat(&buf, &caps->rng); + virDomainCapsDeviceFilesystemFormat(&buf, &caps->filesystem); =20 virBufferAdjustIndent(&buf, -2); virBufferAddLit(&buf, "\n"); diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h index 04be34765b..69e90893cc 100644 --- a/src/conf/domain_capabilities.h +++ b/src/conf/domain_capabilities.h @@ -113,6 +113,13 @@ struct _virDomainCapsDeviceRNG { virDomainCapsEnum backendModel; /* virDomainRNGBackend */ }; =20 +STATIC_ASSERT_ENUM(VIR_DOMAIN_FS_DRIVER_TYPE_LAST); +typedef struct _virDomainCapsDeviceFilesystem virDomainCapsDeviceFilesyste= m; +struct _virDomainCapsDeviceFilesystem { + virTristateBool supported; + virDomainCapsEnum driverType; /* virDomainFSDriverType */ +}; + STATIC_ASSERT_ENUM(VIR_GIC_VERSION_LAST); typedef struct _virDomainCapsFeatureGIC virDomainCapsFeatureGIC; struct _virDomainCapsFeatureGIC { @@ -194,6 +201,7 @@ struct _virDomainCaps { virDomainCapsDeviceVideo video; virDomainCapsDeviceHostdev hostdev; virDomainCapsDeviceRNG rng; + virDomainCapsDeviceFilesystem filesystem; /* add new domain devices here */ =20 virDomainCapsFeatureGIC gic; --=20 2.31.1