From nobody Sat May 4 23:35:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1601636159; cv=none; d=zohomail.com; s=zohoarc; b=lSuLnYZdZi7QRchbVvRVjApvjbF/59/S38xvGnpnRe905DruT4HaNl1IiALRv15hXizBnhU/R//n5mA7Q6h6IYio80VHVXMcgrkh5Ok6StsNQT5jhSUZAh6mbu+pnik55oGCKtNZtp1qlVVTUGUoyF3L383wn97T49BiGjyebHA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601636159; h=Content-Type:Content-Transfer-Encoding:Cc: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=2gIlC9h65HvrkZM62GEXN3zZRTCuL0oQTDPjuPksnE4=; b=ktMbOma6DC+skzk+EQg62RYm2GrOtUn8EhErcbVu3lHosg0EYFH53VEYesab56H1WDbQTvbaCiJAmCkZ7Y/NSHJ+JPGCySy8mwN9uRISeF1e2DHyMtQsbav9wDQxtoTg89NsKt11YZqC9SzXo99WB7eTsairBydMGLGElS2SjdE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1601636159401976.037040607974; Fri, 2 Oct 2020 03:55:59 -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-164-tm3hKFh7NYqZo4WfETDtMw-1; Fri, 02 Oct 2020 06:55:55 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AA6ED1054F90; Fri, 2 Oct 2020 10:55:46 +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 866D41002397; Fri, 2 Oct 2020 10:55:46 +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 4B9901826D2F; Fri, 2 Oct 2020 10:55:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 092AtbVh030963 for ; Fri, 2 Oct 2020 06:55:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3DC31110E97; Fri, 2 Oct 2020 10:55:37 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 36E24110EA2 for ; Fri, 2 Oct 2020 10:55:35 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 19AD1101A53F for ; Fri, 2 Oct 2020 10:55:35 +0000 (UTC) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-33-OEGbFF0SP6qb_PkQH2a8cA-1; Fri, 02 Oct 2020 06:55:32 -0400 Received: by mail-wr1-f67.google.com with SMTP id t10so1325033wrv.1 for ; Fri, 02 Oct 2020 03:55:31 -0700 (PDT) Received: from localhost.localdomain (cpc75556-harg6-2-0-cust35.7-1.cable.virginm.net. [86.3.36.36]) by smtp.gmail.com with ESMTPSA id c14sm1363083wrm.64.2020.10.02.03.55.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Oct 2020 03:55:29 -0700 (PDT) X-MC-Unique: tm3hKFh7NYqZo4WfETDtMw-1 X-MC-Unique: OEGbFF0SP6qb_PkQH2a8cA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2gIlC9h65HvrkZM62GEXN3zZRTCuL0oQTDPjuPksnE4=; b=LGw5voRKdhm/ZKq9hveb4Z5CpNh97E6mr5Lc4sLIwdN3jAmo2g5cbcri0vMpPL6+7S 0e3wfAHm34I80xSaPfIVheO3jK72Ui/vpqJbwl40bPbYQ2HBBpl1fYpztbhFbvKxCKj+ IkWQ/2YYs8m4QDKSQ5lZ3/zRYiNPwirNHGFpYANDF5owtrXw9Y4HltQKxh5wq4hUvuKM 0QMs894lzSLgPb4W8pIkbY6HVs6HhNtJ+2MnS05uY9G9VU2MrZooqLbGRXBi5dsOLT8s gRmYrsY2P4UVOh3MWlrcF69dNkThYr2vGwbesuDR4NisyHDlADuCowQFnrpqIKYj+uK6 nzwg== X-Gm-Message-State: AOAM5339R+4lImjYM/b+brqzIa4LmuUsG+IP3VD7m4yQVJa1CvVwvaTE Fq70iTd91PZqbL22QD9oOPiBoywqdWczBg== X-Google-Smtp-Source: ABdhPJxOYrsaV5XHaICTNskFyNDkK21WOCbhJbts4k0NaJ6d/Unyvg29VbrU634jtGRhrlCFwmvhPA== X-Received: by 2002:adf:ef4f:: with SMTP id c15mr2502737wrp.390.1601636129749; Fri, 02 Oct 2020 03:55:29 -0700 (PDT) From: Brian Turek To: libvir-list@redhat.com Subject: [PATCH 1/4] qemu: capabilities: add QEMU_CAPS_FSDEV_CREATEMODE Date: Fri, 2 Oct 2020 11:55:01 +0100 Message-Id: <20201002105504.82121-2-brian.turek@gmail.com> In-Reply-To: <20201002105504.82121-1-brian.turek@gmail.com> References: <20201002105504.82121-1-brian.turek@gmail.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Brian Turek 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.84 on 10.5.11.22 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 Content-Type: text/plain; charset="utf-8" The QEMU 9pfs 'fmode' and 'dmode' options exists since QEMU 2.10. Probe QEMU's command line set to check whether these options are really available, and if yes, enable this new QEMU_CAPS_FSDEV_CREATEMODE capability on libvirt side. Signed-off-by: Brian Turek --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml | 1 + tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml | 1 + tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml | 1 + tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml | 1 + tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml | 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.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 + tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml | 1 + 36 files changed, 37 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 5dcfcd574d..b8217a7d2c 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -600,6 +600,7 @@ VIR_ENUM_IMPL(virQEMUCaps, =20 /* 380 */ "usb-host.hostdevice", + "fsdev.createmode", ); =20 =20 @@ -3334,6 +3335,7 @@ static struct virQEMUCapsCommandLineProps virQEMUCaps= CommandLine[] =3D { { "smp-opts", "dies", QEMU_CAPS_SMP_DIES }, { "fsdev", "multidevs", QEMU_CAPS_FSDEV_MULTIDEVS }, { "fw_cfg", "file", QEMU_CAPS_FW_CFG }, + { "fsdev", "fmode", QEMU_CAPS_FSDEV_CREATEMODE }, /* Could have also c= hecked fsdev->dmode */ }; =20 static int diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 98d70cfa0e..73d286db6d 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -580,6 +580,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ =20 /* 380 */ QEMU_CAPS_USB_HOST_HOSTDEVICE, /* -device usb-host.hostdevice */ + QEMU_CAPS_FSDEV_CREATEMODE, /* fsdev.createmode */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml b/tests/qem= ucapabilitiesdata/caps_2.10.0.aarch64.xml index b0fcbc4218..77af6b0d7a 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml @@ -145,6 +145,7 @@ + 2010000 0 61700287 diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml b/tests/qemuc= apabilitiesdata/caps_2.10.0.ppc64.xml index edf01d2e2f..5fce7540f9 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml @@ -145,6 +145,7 @@ + 2010000 0 42900287 diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml b/tests/qemuc= apabilitiesdata/caps_2.10.0.s390x.xml index 98a3c0eec2..7b0153e272 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml @@ -111,6 +111,7 @@ + 2010000 0 39100287 diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml b/tests/qemu= capabilitiesdata/caps_2.10.0.x86_64.xml index 98b1a94349..7f45a473cb 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml @@ -189,6 +189,7 @@ + 2010000 0 43100287 diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml b/tests/qemuc= apabilitiesdata/caps_2.11.0.s390x.xml index 0391f4b81e..4b8ba3e557 100644 --- a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml @@ -119,6 +119,7 @@ + 2011000 0 39100288 diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml b/tests/qemu= capabilitiesdata/caps_2.11.0.x86_64.xml index 9eaafb4ba6..b11d98a64f 100644 --- a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml @@ -196,6 +196,7 @@ + 2011000 0 43100288 diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml b/tests/qem= ucapabilitiesdata/caps_2.12.0.aarch64.xml index a5d6dc3bef..224defd91d 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml @@ -162,6 +162,7 @@ + 2012000 0 61700289 diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml b/tests/qemuc= apabilitiesdata/caps_2.12.0.ppc64.xml index d1ed9f6e28..c967c3f142 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml @@ -163,6 +163,7 @@ + 2011090 0 42900289 diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml b/tests/qemuc= apabilitiesdata/caps_2.12.0.s390x.xml index cef6ebb9ad..f9e843e125 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml @@ -131,6 +131,7 @@ + 2012000 0 39100289 diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml b/tests/qemu= capabilitiesdata/caps_2.12.0.x86_64.xml index 6d48699e3e..7ec4c376e0 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml @@ -206,6 +206,7 @@ + 2011090 0 43100289 diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_3.0.0.ppc64.xml index e4a560bac5..e57def86bf 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml @@ -165,6 +165,7 @@ + 2012050 0 42900239 diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml b/tests/qemu= capabilitiesdata/caps_3.0.0.riscv32.xml index 71f9b0c37f..b7a79a95d6 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml @@ -101,6 +101,7 @@ + 3000000 0 0 diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml b/tests/qemu= capabilitiesdata/caps_3.0.0.riscv64.xml index 279078d541..66682cb112 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml @@ -101,6 +101,7 @@ + 3000000 0 0 diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_3.0.0.s390x.xml index f1ed34c612..994e49040b 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml @@ -134,6 +134,7 @@ + 3000000 0 39100239 diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_3.0.0.x86_64.xml index ae1836b28f..c5b56d3917 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml @@ -212,6 +212,7 @@ + 3000000 0 43100239 diff --git a/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_3.1.0.ppc64.xml index 0dc0393c22..a51b3b2164 100644 --- a/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml @@ -170,6 +170,7 @@ + 3000091 0 42900240 diff --git a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_3.1.0.x86_64.xml index d4ff21fdac..5f4afa9129 100644 --- a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml @@ -215,6 +215,7 @@ + 3000092 0 43100240 diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_4.0.0.aarch64.xml index 404a39af03..c642f232b5 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml @@ -176,6 +176,7 @@ + 4000000 0 61700240 diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_4.0.0.ppc64.xml index cb0232173c..0581d0a9e8 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml @@ -184,6 +184,7 @@ + 4000000 0 42900240 diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml b/tests/qemu= capabilitiesdata/caps_4.0.0.riscv32.xml index 11475306f9..cfd6325c8a 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml @@ -177,6 +177,7 @@ + 4000000 0 0 diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml b/tests/qemu= capabilitiesdata/caps_4.0.0.riscv64.xml index 608590a35b..937b48ccfb 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml @@ -177,6 +177,7 @@ + 4000000 0 0 diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_4.0.0.s390x.xml index f4d20169e0..ca253ba1de 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml @@ -142,6 +142,7 @@ + 4000000 0 39100240 diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_4.0.0.x86_64.xml index e3f83372c2..ae81d12df3 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml @@ -221,6 +221,7 @@ + 4000000 0 43100240 diff --git a/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_4.1.0.x86_64.xml index c32d8ea5d8..b2d0c0b824 100644 --- a/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml @@ -227,6 +227,7 @@ + 4001000 0 43100241 diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_4.2.0.aarch64.xml index 11a964ed39..ffb4fbd552 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml @@ -189,6 +189,7 @@ + 4001050 0 61700242 diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_4.2.0.ppc64.xml index 60aef01f7b..129272d985 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml @@ -190,6 +190,7 @@ + 4001050 0 42900242 diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_4.2.0.s390x.xml index 76e2747b65..fe9a5aa835 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml @@ -153,6 +153,7 @@ + 4002000 0 39100242 diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_4.2.0.x86_64.xml index fd63a0ee02..00900f5477 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml @@ -236,6 +236,7 @@ + 4002000 0 43100242 diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_5.0.0.aarch64.xml index 928af2a01c..da8d1de258 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml @@ -199,6 +199,7 @@ + 5000000 0 61700241 diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_5.0.0.ppc64.xml index e8668a25a9..731676c06d 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml @@ -208,6 +208,7 @@ + 5000000 0 42900241 diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml b/tests/qemu= capabilitiesdata/caps_5.0.0.riscv64.xml index 85a8a46dac..34e6b11fe4 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml @@ -195,6 +195,7 @@ + 5000000 0 0 diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.0.0.x86_64.xml index 546b9b0422..3dbfaa95c2 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml @@ -243,6 +243,7 @@ + 5000000 0 43100241 diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.1.0.x86_64.xml index 987beb965e..da64009d67 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml @@ -243,6 +243,7 @@ + 5001000 0 43100242 diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.2.0.x86_64.xml index 3ee678ef8f..a91bfd432b 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml @@ -243,6 +243,7 @@ + 5001050 0 43100243 --=20 2.25.1 From nobody Sat May 4 23:35:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1601636154; cv=none; d=zohomail.com; s=zohoarc; b=NeZJfSknNThW0/SSN8qm36mVDoORWCCalw72V/8eTNmRuygtg4Tx/1cQ3ejW24kgTx43j7veJoZNdFSQDn1ojRp6XEbSPj8vsYk0mZ8nxxz4rTAdLOigIo9XCTJoz3Alo15vYEQdXtMRkotlJAGhsHDIwYn6z6UEzYAvA8jlPkY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601636154; h=Content-Type:Content-Transfer-Encoding:Cc: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=7dYsx0RU/KOZYllD+LDRU7XRLM8u2foYc3OqGUfOlDQ=; b=iJPSseH5nEgXhT36862xwBPDm5zWlZJw+PS9eRf3sDJf3HXD18HKRwoMouREKW7IivVtu16ifOVrm2zx80Og4soGr35EEqkTyHWNle+WO2Q0s4Rw5MycusdxXPQMOGaM1Q1WckkANrzwlNW9obl1D4B2B3M6knY0NEEP868tUBk= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1601636154100463.65115887618595; Fri, 2 Oct 2020 03:55:54 -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-405-OMdMC_aXOkOTD_KjU4eFxA-1; Fri, 02 Oct 2020 06:55:50 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 60619191E2BE; Fri, 2 Oct 2020 10:55:41 +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 354F419C66; Fri, 2 Oct 2020 10:55:41 +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 A617F1826D2D; Fri, 2 Oct 2020 10:55:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 092AtcMi030969 for ; Fri, 2 Oct 2020 06:55:38 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2048E202348A; Fri, 2 Oct 2020 10:55:38 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1B1B8200AF70 for ; Fri, 2 Oct 2020 10:55:38 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 01D87101A540 for ; Fri, 2 Oct 2020 10:55:38 +0000 (UTC) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-49-dVt9S3VHPuyN0LCfN9KABA-1; Fri, 02 Oct 2020 06:55:34 -0400 Received: by mail-wr1-f66.google.com with SMTP id k15so1298406wrn.10 for ; Fri, 02 Oct 2020 03:55:34 -0700 (PDT) Received: from localhost.localdomain (cpc75556-harg6-2-0-cust35.7-1.cable.virginm.net. [86.3.36.36]) by smtp.gmail.com with ESMTPSA id c14sm1363083wrm.64.2020.10.02.03.55.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Oct 2020 03:55:32 -0700 (PDT) X-MC-Unique: OMdMC_aXOkOTD_KjU4eFxA-1 X-MC-Unique: dVt9S3VHPuyN0LCfN9KABA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7dYsx0RU/KOZYllD+LDRU7XRLM8u2foYc3OqGUfOlDQ=; b=M87pi+eRADCnO5k1494BUIv4C5zHRT7R9+ZMyJ1SWoDK2M86AzD4ZLMEtsTlwb9vT/ MrGXqvOQojCqBA0M1KMvg/8yqaHZv8XnoSpM8TnttRxoo2/zTbYNZ4M8Xk7uJ0j88j1j ktqm2eF3iXZ4FIDJ7II+64qNIT6pHibPYHcFo61iQFn/dC30B2sVczl37qhUISzF05h4 a6BPoBtuIOlvQQYmnIF/PcWC5NN6x9tx56G6cqn5dOKHck4njh1KTBSC5obxhfq11p0p umk60XOITm/k7DemdUG14QiUEQuILBmw8wWmUvHLV1RBhOQX6ZnM4uGOSy6sjAEgWdYN k3Hw== X-Gm-Message-State: AOAM531ijw6bntmhr0yLYlvAy0noAr8hyK/fZhwgYIxUGvAxocXECMs1 nc+wJ8I4I/K8okP6meEdLKkfsWAdueVTEA== X-Google-Smtp-Source: ABdhPJxM+2b7v1UmwYNk0AQrLp4P4ze3zd9KEzgQandqPhsifIpTUpFqBCfmUAH5DLl0VSFBRBhmmQ== X-Received: by 2002:adf:ef03:: with SMTP id e3mr2265910wro.146.1601636133153; Fri, 02 Oct 2020 03:55:33 -0700 (PDT) From: Brian Turek To: libvir-list@redhat.com Subject: [PATCH 2/4] qemu: add support for 'fmode' and 'dmode' options Date: Fri, 2 Oct 2020 11:55:02 +0100 Message-Id: <20201002105504.82121-3-brian.turek@gmail.com> In-Reply-To: <20201002105504.82121-1-brian.turek@gmail.com> References: <20201002105504.82121-1-brian.turek@gmail.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: Brian Turek 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.84 on 10.5.11.23 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 Content-Type: text/plain; charset="utf-8" Expose QEMU's 9pfs 'fmode' and 'dmode' options via attributes on the 'filesystem' node in the domain XML. These options control the creation mode of files and directories, respectively, when using accessmode=3Dmapped. QEMU defaults to creating files with mode 600 and directories with mode 700. Signed-off-by: Brian Turek --- src/conf/domain_conf.c | 27 ++++++++ src/conf/domain_conf.h | 2 + src/qemu/qemu_command.c | 6 ++ src/qemu/qemu_validate.c | 18 ++++++ .../virtio-9p-createmode.x86_64-latest.args | 45 ++++++++++++++ .../qemuxml2argvdata/virtio-9p-createmode.xml | 58 ++++++++++++++++++ .../virtio-9p-createmode.x86_64-latest.xml | 61 +++++++++++++++++++ tests/qemuxml2xmltest.c | 1 + 8 files changed, 218 insertions(+) create mode 100644 tests/qemuxml2argvdata/virtio-9p-createmode.x86_64-late= st.args create mode 100644 tests/qemuxml2argvdata/virtio-9p-createmode.xml create mode 100644 tests/qemuxml2xmloutdata/virtio-9p-createmode.x86_64-la= test.xml diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b80d7c7c6c..b1f3eb71a9 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -11500,6 +11500,8 @@ virDomainFSDefParseXML(virDomainXMLOptionPtr xmlopt, g_autofree char *units =3D NULL; g_autofree char *model =3D NULL; g_autofree char *multidevs =3D NULL; + g_autofree char *fmode =3D NULL; + g_autofree char *dmode =3D NULL; =20 ctxt->node =3D node; =20 @@ -11528,6 +11530,24 @@ virDomainFSDefParseXML(virDomainXMLOptionPtr xmlop= t, def->accessmode =3D VIR_DOMAIN_FS_ACCESSMODE_PASSTHROUGH; } =20 + fmode =3D virXMLPropString(node, "fmode"); + if (fmode) { + if (virStrToLong_uip(fmode, NULL, 8, &def->fmode) < 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("invalid fmode: '%s'"), fmode); + goto error; + } + } + + dmode =3D virXMLPropString(node, "dmode"); + if (dmode) { + if (virStrToLong_uip(dmode, NULL, 8, &def->dmode) < 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("invalid dmode: '%s'"), dmode); + goto error; + } + } + model =3D virXMLPropString(node, "model"); if (model) { if ((def->model =3D virDomainFSModelTypeFromString(model)) < 0 || @@ -26226,6 +26246,13 @@ virDomainFSDefFormat(virBufferPtr buf, } if (def->multidevs) virBufferAsprintf(buf, " multidevs=3D'%s'", multidevs); + + if (def->fmode) + virBufferAsprintf(buf, " fmode=3D'%03o'", def->fmode); + + if (def->dmode) + virBufferAsprintf(buf, " dmode=3D'%03o'", def->dmode); + virBufferAddLit(buf, ">\n"); =20 virBufferAdjustIndent(buf, 2); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 9a44315519..0f09f723a9 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -849,6 +849,8 @@ struct _virDomainFSDef { int wrpolicy; /* enum virDomainFSWrpolicy */ int format; /* virStorageFileFormat */ int model; /* virDomainFSModel */ + unsigned int fmode; + unsigned int dmode; int multidevs; /* virDomainFSMultidevs */ unsigned long long usage; /* in bytes */ virStorageSourcePtr src; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index e9ba81d82f..b16e0279f2 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2275,6 +2275,12 @@ qemuBuildFSStr(virDomainFSDefPtr fs) } else if (fs->multidevs =3D=3D VIR_DOMAIN_FS_MULTIDEVS_WARN) { virBufferAddLit(&opt, ",multidevs=3Dwarn"); } + if (fs->fmode) { + virBufferAsprintf(&opt, ",fmode=3D%03o", fs->fmode); + } + if (fs->dmode) { + virBufferAsprintf(&opt, ",dmode=3D%03o", fs->dmode); + } } 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_validate.c b/src/qemu/qemu_validate.c index a212605579..4757c55e13 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3530,6 +3530,19 @@ qemuValidateDomainDeviceDefFS(virDomainFSDefPtr fs, return -1; } =20 + if ((fs->fmode !=3D 0) || (fs->dmode !=3D 0)) { + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_FSDEV_CREATEMODE)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("fmode and dmode are not supported with this QEM= U binary")); + return -1; + } + if (fs->accessmode !=3D VIR_DOMAIN_FS_ACCESSMODE_MAPPED) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("fmode and dmode must be used with accessmode= =3Dmapped")); + return -1; + } + } + switch ((virDomainFSDriverType) fs->fsdriver) { case VIR_DOMAIN_FS_DRIVER_TYPE_DEFAULT: case VIR_DOMAIN_FS_DRIVER_TYPE_PATH: @@ -3591,6 +3604,11 @@ qemuValidateDomainDeviceDefFS(virDomainFSDefPtr fs, _("virtiofs does not support multidevs")); return -1; } + if ((fs->fmode !=3D 0) || (fs->dmode !=3D 0)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("virtiofs does not support fmode and dmode")); + return -1; + } if (qemuValidateDomainDefVirtioFSSharedMemory(def) < 0) return -1; break; diff --git a/tests/qemuxml2argvdata/virtio-9p-createmode.x86_64-latest.args= b/tests/qemuxml2argvdata/virtio-9p-createmode.x86_64-latest.args new file mode 100644 index 0000000000..5285968ea3 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-9p-createmode.x86_64-latest.args @@ -0,0 +1,45 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-QEMUGuest1 \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-x86_64 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine pc,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-cpu qemu64 \ +-m 214 \ +-overcommit mem-lock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-no-acpi \ +-boot strict=3Don \ +-device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 \ +-fsdev local,security_model=3Dmapped,fmode=3D644,id=3Dfsdev-fs0,path=3D/ex= port/fs0 \ +-device virtio-9p-pci,id=3Dfs0,fsdev=3Dfsdev-fs0,mount_tag=3Dfs0,bus=3Dpci= .0,addr=3D0x2 \ +-fsdev local,security_model=3Dmapped,dmode=3D755,id=3Dfsdev-fs1,path=3D/ex= port/fs1 \ +-device virtio-9p-pci,id=3Dfs1,fsdev=3Dfsdev-fs1,mount_tag=3Dfs1,bus=3Dpci= .0,addr=3D0x3 \ +-fsdev local,security_model=3Dmapped,fmode=3D644,dmode=3D755,id=3Dfsdev-fs= 2,\ +path=3D/export/fs2 \ +-device virtio-9p-pci,id=3Dfs2,fsdev=3Dfsdev-fs2,mount_tag=3Dfs2,bus=3Dpci= .0,addr=3D0x4 \ +-chardev pty,id=3Dcharserial0 \ +-fsdev local,security_model=3Dmapped,id=3Dfsdev-fs3,path=3D/export/fs2 \ +-device virtio-9p-pci,id=3Dfs3,fsdev=3Dfsdev-fs3,mount_tag=3Dfs3,bus=3Dpci= .0,addr=3D0x5 \ +-device isa-serial,chardev=3Dcharserial0,id=3Dserial0 \ +-device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0xc \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/virtio-9p-createmode.xml b/tests/qemuxm= l2argvdata/virtio-9p-createmode.xml new file mode 100644 index 0000000000..bca9db02ad --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-9p-createmode.xml @@ -0,0 +1,58 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + +
+ + +
+ + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + +
+ + + diff --git a/tests/qemuxml2xmloutdata/virtio-9p-createmode.x86_64-latest.xm= l b/tests/qemuxml2xmloutdata/virtio-9p-createmode.x86_64-latest.xml new file mode 100644 index 0000000000..a119c0a9a6 --- /dev/null +++ b/tests/qemuxml2xmloutdata/virtio-9p-createmode.x86_64-latest.xml @@ -0,0 +1,61 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + qemu64 + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + +
+ + +
+ + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + +
+ + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 2bf8dd5b14..17cbed97f9 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1496,6 +1496,7 @@ mymain(void) DO_TEST_CAPS_ARCH_LATEST("x86_64-default-cpu-tcg-q35-4.2", "x86_64"); =20 DO_TEST_CAPS_LATEST("virtio-9p-multidevs"); + DO_TEST_CAPS_LATEST("virtio-9p-createmode"); DO_TEST("downscript", NONE); =20 cleanup: --=20 2.25.1 From nobody Sat May 4 23:35:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1601636166; cv=none; d=zohomail.com; s=zohoarc; b=H1KOORjtq/DigxrbOxZw2eabccm4huz68ovDQhtIppqf5ImS4xXhQlhTZ3GCf4ojkrVrIhlO4ZOTAwM0Ra7yTQxiUx+SLTW7ozyIhLMZisI+0/G898/h+1QHe5ANLHiZ7iOSn8tMjg4ix9ETgN93iAOY7YUFeToPj/ghWJUCGws= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601636166; h=Content-Type:Content-Transfer-Encoding:Cc: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=5on3mUF36H7U80niIHAGFha34mRvFjFSPBbjG1m5XaA=; b=Mb0JCryjEsV0g3EepiNnUmGvX7oUItMzF6zXjj9lbA4RaQvXb+pQrgMan1wJ//GL799EMKbRG3XnzZtNN/Mfaes5s/nKADm47FXKnY0SE2ZLqL7vrNO+S/JBJp0YJ2qmHI4HhYZIl9QnjO5yl+153BE7Axnthivzg2kgGFxrR4A= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1601636166728792.7663871663065; Fri, 2 Oct 2020 03:56:06 -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-108-0Jke3fKiOzWhmIKyxAqb8w-1; Fri, 02 Oct 2020 06:55:59 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8496C8030A2; Fri, 2 Oct 2020 10:55:49 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3706710023A7; Fri, 2 Oct 2020 10:55:49 +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 0644844A5E; Fri, 2 Oct 2020 10:55:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 092AtfLn030992 for ; Fri, 2 Oct 2020 06:55:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8B9BE2156A3D; Fri, 2 Oct 2020 10:55:41 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8799C2157F5E for ; Fri, 2 Oct 2020 10:55:39 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2A9B618AE948 for ; Fri, 2 Oct 2020 10:55:39 +0000 (UTC) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-1-uWhfUyIiMue9A9kGdUYOhQ-1; Fri, 02 Oct 2020 06:55:37 -0400 Received: by mail-wm1-f67.google.com with SMTP id w2so1204843wmi.1 for ; Fri, 02 Oct 2020 03:55:36 -0700 (PDT) Received: from localhost.localdomain (cpc75556-harg6-2-0-cust35.7-1.cable.virginm.net. [86.3.36.36]) by smtp.gmail.com with ESMTPSA id c14sm1363083wrm.64.2020.10.02.03.55.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Oct 2020 03:55:35 -0700 (PDT) X-MC-Unique: 0Jke3fKiOzWhmIKyxAqb8w-1 X-MC-Unique: uWhfUyIiMue9A9kGdUYOhQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5on3mUF36H7U80niIHAGFha34mRvFjFSPBbjG1m5XaA=; b=VoTkDULK8zxyOse6ZYph9bSSLTsnWrQ4ECNzurygZZm/t3Bx5ycUqLpbqWkEuuOC2g +Zw+1M2wFMzkmMPhc6xnP5wWEOFm9UaQssOHn5usjKp+Xk41Zmj0r0KeW+NFbqR3dBDp UxdMAtSqbREhU7z9vD3vqsOoOuNqNugX1x/0qYpfhopfI/0EbXMSdpCn51UDrHldtfX2 1wK1zLE1XcxJI7SFh+SIqdZnKNkmP6ZIbbwALWXg+0kdrnoBONzYDjfoQ4K6z5ya1RPH ch0HyLwGNF4x0b1rftjASrr6AZpmcXK2udtxi3W6W6CS0K3J/q3SXAdoma2wrcA2plfF 4AIg== X-Gm-Message-State: AOAM530E2dbjw+C98HH60rIU7B3IqkRdx22kko6L9yljzNjD5IZRgnDY gJl4eGjJCLHddxftd/nzOx5fy+gIxWHl6w== X-Google-Smtp-Source: ABdhPJxYyCuQ6tEIYyggjYhp0OTda1R+MsX/ppoNWv/FcJQ5QYEMUeLMDCk9PILtklq4RAV6sjSByg== X-Received: by 2002:a1c:f311:: with SMTP id q17mr2379855wmq.168.1601636135744; Fri, 02 Oct 2020 03:55:35 -0700 (PDT) From: Brian Turek To: libvir-list@redhat.com Subject: [PATCH 3/4] qemu: add schema 'fmode' and 'dmode' options Date: Fri, 2 Oct 2020 11:55:03 +0100 Message-Id: <20201002105504.82121-4-brian.turek@gmail.com> In-Reply-To: <20201002105504.82121-1-brian.turek@gmail.com> References: <20201002105504.82121-1-brian.turek@gmail.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: Brian Turek 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.84 on 10.5.11.22 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 Content-Type: text/plain; charset="utf-8" Adds schema to validate the 'fmode' and 'dmode' attributes on a 'fileystem' node. Checks to ensure that the values are 1-3 octal digits long. Signed-off-by: Brian Turek --- docs/schemas/domaincommon.rng | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 4b7e460148..78b9f0c750 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -26,6 +26,12 @@ =20 + + + [0-7]{1,3} + + + @@ -2736,6 +2742,16 @@ + + + + + + + + + + --=20 2.25.1 From nobody Sat May 4 23:35:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1601636159; cv=none; d=zohomail.com; s=zohoarc; b=gYYjDcEi8wwUkyKjtR9mcvpRW0++sPTdvLEfCOKs6qds73mz4lns6Bz2hwh04Qlvrin+qNXrSt8F+nZa/wZL3+Uh0iSoh6OvcK9qQT7qFsuP/KKzv89F+g9c0PflRrgPxO5zieZjm3rGqz9hiakVVOYiuHV64hZNOGL+8ORgL9c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601636159; h=Content-Type:Content-Transfer-Encoding:Cc: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=sxHiCB9wU14M+4s0NRRjZoW0MaBjFWZta3O06Mm8Wb4=; b=EFm76TC4emuFxkq4Tvi3x3nEZeQYjROYrg9qTJcGkr6VtOVkzjI5VrgKdw6YT3prKwM2Utns09GoyTJxPzx1KsyHknNCVsYIPgGrzi6wNyCtH6Hg8BVRhvvtuqYcj0cVEfBgR88bb7MOKJvHIx4opC4aQUKMw25GTEZzH7V8ieM= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1601636159280322.7856711387045; Fri, 2 Oct 2020 03:55:59 -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-401-sZSzvRnZM2mFH5E5xwxo2A-1; Fri, 02 Oct 2020 06:55:55 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CE034803F59; Fri, 2 Oct 2020 10:55:46 +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 A6F7019C66; Fri, 2 Oct 2020 10:55:46 +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 704701826D30; Fri, 2 Oct 2020 10:55:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 092AtfpE030987 for ; Fri, 2 Oct 2020 06:55:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id 00E0B110EA3; Fri, 2 Oct 2020 10:55:41 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EDBFF110E97 for ; Fri, 2 Oct 2020 10:55:40 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DAABE858298 for ; Fri, 2 Oct 2020 10:55:40 +0000 (UTC) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-30-zisIAkVNPRGE0xg1guHWhg-1; Fri, 02 Oct 2020 06:55:38 -0400 Received: by mail-wr1-f65.google.com with SMTP id o5so1283646wrn.13 for ; Fri, 02 Oct 2020 03:55:38 -0700 (PDT) Received: from localhost.localdomain (cpc75556-harg6-2-0-cust35.7-1.cable.virginm.net. [86.3.36.36]) by smtp.gmail.com with ESMTPSA id c14sm1363083wrm.64.2020.10.02.03.55.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Oct 2020 03:55:36 -0700 (PDT) X-MC-Unique: sZSzvRnZM2mFH5E5xwxo2A-1 X-MC-Unique: zisIAkVNPRGE0xg1guHWhg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sxHiCB9wU14M+4s0NRRjZoW0MaBjFWZta3O06Mm8Wb4=; b=RieeW3Dx/vBlS1P73tR5OVTeOtEdLcpMHStKjJP4tCYM/J32fznnKa3G3Ak8LbEHKG 50jJ36U6SLVIV+vfx1senYeuMjQE+8TWRkkajN6LATeVlgAUE61jWU10G3UN60TKGnTP 0Yxu+211mv83j/z7XaSb2vlHRgUc9GlTHXI/ZQZX3COt6ir8nHGjhUq4yeq97JwqcIbY YVlJIe/wFfSqmRf8fIJiVYDdilt9v832LgXTmI3vJYCuUFJ2pioSixDdFpISt8VUBZKQ S5fWUQaU/SadISbI5mssxQ+7WmV4yHr/qtVitJRHD7ajG6gGHd3to3PgPvtupgrXsX37 MhDg== X-Gm-Message-State: AOAM530C3xc/gzolbEMLcsna3v7aCmR/FHDxT0DCn7vr2AvI7Y3jKMTX 2OMyfEfysGXVgQOogdjxO2hFZml3eGt2og== X-Google-Smtp-Source: ABdhPJylLH3gL4LSacS8cBP698UuKRcU5Fk2yWDj0rkjGsXHeL5JWmOmSJlTxhy+cADXrhXj5H5R0A== X-Received: by 2002:adf:f3c6:: with SMTP id g6mr2556065wrp.340.1601636137220; Fri, 02 Oct 2020 03:55:37 -0700 (PDT) From: Brian Turek To: libvir-list@redhat.com Subject: [PATCH 4/4] qemu: add docs for 'fmode' and 'dmode' options Date: Fri, 2 Oct 2020 11:55:04 +0100 Message-Id: <20201002105504.82121-5-brian.turek@gmail.com> In-Reply-To: <20201002105504.82121-1-brian.turek@gmail.com> References: <20201002105504.82121-1-brian.turek@gmail.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Brian Turek 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.84 on 10.5.11.23 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 Content-Type: text/plain; charset="utf-8" Adds documentation for QEMU 9pfs 'fmode' and 'dmode' options. Signed-off-by: Brian Turek --- docs/formatdomain.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index f3cf9e1fb3..88d836da08 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -3062,6 +3062,12 @@ A directory on the host that can be accessed directl= y from the guest. + + + + + + @@ -3141,6 +3147,12 @@ A directory on the host that can be accessed directl= y from the guest. "virtio-non-transitional", or "virtio". See `Virtio transitional devices <#elementsVirtioTransitional>`__ for more details. =20 + The filesystem element has optional attributes ``fmode`` and ``dmode``. + These two attributes control the creation mode for files and directories + when used with the ``mapped`` value for ``accessmode`` (:since:`since 6= .9.0, + requires QEMU 2.10` ). If not specified, QEMU creates files with mode + ``600`` and directories with mode ``700``. + 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 ( --=20 2.25.1