From nobody Thu Mar 28 11:52:43 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=1602162420; cv=none; d=zohomail.com; s=zohoarc; b=Ainc80SKtfZoy8KpgkyYLLo57GBxLUhVu2zE+jTAcIdJ/8C5YtfLiwm1fFE/5qVrXv8/kH+N0A/GlpQ0eYsRoD3VPjOWa+53wKEc/zypapFyBcPsFBVciZ0ufo0SgIoaqfDRyWqiC1JiUHELbpNrTUqCeLEJsd1WRMs/HGCs/Q0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602162420; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=SynZbdFtgvsudOun0R5mCsgCB82kCxZOz87bWUGQYQY=; b=IQTV1eDQVLPh/abG2cDoz+VXz5ci3BP5flVN9EDkeQ3Kzxl4Sl/VXw8bkeMRBX3fOSAptT1pGJKGeuItFAJUFKw7Uml0Dg2vyu98NsfT1VYG4OIcs+tzfJLlh2wmGa0JV7/zaqOo8/SOKyE72xA+zs8F1rHm7vkpr85b+P8AK4U= 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 160216242045134.266193277795765; Thu, 8 Oct 2020 06:07:00 -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-433-YDTjzC1-NHmrxbb49XOkhQ-1; Thu, 08 Oct 2020 09:06:56 -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 228876408B; Thu, 8 Oct 2020 13:06: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 D639455768; Thu, 8 Oct 2020 13:06:47 +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 28A258C7C0; Thu, 8 Oct 2020 13:06:43 +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 098D6fq5007466 for ; Thu, 8 Oct 2020 09:06:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9F2802166BDD; Thu, 8 Oct 2020 13:06:41 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 967882166BA3 for ; Thu, 8 Oct 2020 13:06:39 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (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 3FB3D801184 for ; Thu, 8 Oct 2020 13:06:39 +0000 (UTC) Received: from mail-lf1-f66.google.com (mail-lf1-f66.google.com [209.85.167.66]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-526-4Zol6QfkPfuY-bU2B7LSCQ-1; Thu, 08 Oct 2020 09:06:33 -0400 Received: by mail-lf1-f66.google.com with SMTP id b1so2999618lfp.11 for ; Thu, 08 Oct 2020 06:06:33 -0700 (PDT) Received: from kloomba.my.domain ([31.29.246.176]) by smtp.gmail.com with ESMTPSA id m2sm852228lfl.249.2020.10.08.06.06.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Oct 2020 06:06:30 -0700 (PDT) X-MC-Unique: YDTjzC1-NHmrxbb49XOkhQ-1 X-MC-Unique: 4Zol6QfkPfuY-bU2B7LSCQ-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:mime-version :content-transfer-encoding; bh=SynZbdFtgvsudOun0R5mCsgCB82kCxZOz87bWUGQYQY=; b=ng4kv5WwLxcEZ1Tr4wdeCiGmaG+1K2grwSjchAyyQLHuG2Eq+9MMkDaToaA7S2Z+0C /P5e0pNpJNFkNvKtGRPUTCGtR2+C2pT/Q8/gNPXkGPIlHoRVfZxU2v1jtqXIbKDxUWUY 7kmjuHJ/OuUsO1O/6f+A1CKNfO7pLXCQuib4adrNkUYVn2yuYWLn5WFfwKqgqbpWTH0Q rN39B7geemDjzjVAgPdwifkhB+N6Q+i+C4pGuOck24tEkeugE6p/VC3flcpTln/QYScc uRcfn1NHHg518aujKXLED7tyZse+o7vZLpq9bOArbXntX0WygmlxS+yxhuj5Sfh6iDNb ERoQ== X-Gm-Message-State: AOAM531fkU/T2zfWY186YP97Yh3pt6JeoKACWZq9xnqqOopxKQj/jWfR mmucm7aDB8/nmqw6Bmv48fg33lPKpkcMOJdO X-Google-Smtp-Source: ABdhPJzlbuQRQZONWX7RVCuHxNLjcCIEbAF+Wk12AWe3IIowDenRmIH85hvIgIpYJTQDsQODro2kRA== X-Received: by 2002:a19:4b44:: with SMTP id y65mr2622554lfa.189.1602162391673; Thu, 08 Oct 2020 06:06:31 -0700 (PDT) From: Roman Bogorodskiy To: libvir-list@redhat.com Subject: [PATCH] bhyve: implement virtio-9p support Date: Thu, 8 Oct 2020 17:06:16 +0400 Message-Id: <20201008130616.92236-1-bogorodskiy@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: Roman Bogorodskiy 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 Content-Type: text/plain; charset="utf-8" Recently virtio-9p support was added to bhyve. On the host side it looks this way: bhyve .... -s 25:0,virtio-9p,sharename=3D/path/to/shared/dir It could also have ",ro" suffix to make share read-only. In the Linux guest, this share is mounted with: mount -t 9p sharename /mnt/sharename In the guest user will see the same permissions and ownership information for this directory as on the host. No uid/gid remapping is supported, so those could resolve to wrong user or group names. The same applies to the other side: chowning/chmodding in the guest will set specified ownership and permissions on the host. In libvirt domain XML it's modeled using the 'filesystem' element: Optional 'readonly' sub-element enables read-only mode. Signed-off-by: Roman Bogorodskiy Reviewed-by: Michal Privoznik --- src/bhyve/bhyve_capabilities.c | 14 ++++ src/bhyve/bhyve_capabilities.h | 1 + src/bhyve/bhyve_command.c | 72 +++++++++++++++++++ src/bhyve/bhyve_device.c | 10 +++ src/libvirt_private.syms | 1 + .../bhyvexml2argv-fs-9p-readonly.args | 10 +++ .../bhyvexml2argv-fs-9p-readonly.ldargs | 3 + .../bhyvexml2argv-fs-9p-readonly.xml | 28 ++++++++ ...exml2argv-fs-9p-unsupported-accessmode.xml | 27 +++++++ ...bhyvexml2argv-fs-9p-unsupported-driver.xml | 28 ++++++++ .../bhyvexml2argv-fs-9p.args | 10 +++ .../bhyvexml2argv-fs-9p.ldargs | 3 + .../bhyvexml2argvdata/bhyvexml2argv-fs-9p.xml | 27 +++++++ tests/bhyvexml2argvtest.c | 9 ++- .../bhyvexml2xmlout-fs-9p.xml | 38 ++++++++++ tests/bhyvexml2xmltest.c | 1 + 16 files changed, 281 insertions(+), 1 deletion(-) create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.ar= gs create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.ld= args create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.xml create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-unsupported= -accessmode.xml create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-unsupported= -driver.xml create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.args create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.ldargs create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.xml create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-fs-9p.xml diff --git a/src/bhyve/bhyve_capabilities.c b/src/bhyve/bhyve_capabilities.c index 96cfe8357a..8a9acf52b0 100644 --- a/src/bhyve/bhyve_capabilities.c +++ b/src/bhyve/bhyve_capabilities.c @@ -344,6 +344,17 @@ bhyveProbeCapsVNCPassword(unsigned int *caps, char *bi= nary) } =20 =20 +static int +bhyveProbeCapsVirtio9p(unsigned int *caps, char *binary) +{ + return bhyveProbeCapsDeviceHelper(caps, binary, + "-s", + "0,virtio-9p", + "pci slot 0:0: unknown device \"hda\= "", + BHYVE_CAP_VIRTIO_9P); +} + + int virBhyveProbeCaps(unsigned int *caps) { @@ -378,6 +389,9 @@ virBhyveProbeCaps(unsigned int *caps) if ((ret =3D bhyveProbeCapsVNCPassword(caps, binary))) goto out; =20 + if ((ret =3D bhyveProbeCapsVirtio9p(caps, binary))) + goto out; + out: VIR_FREE(binary); return ret; diff --git a/src/bhyve/bhyve_capabilities.h b/src/bhyve/bhyve_capabilities.h index b2a16b0189..1b25c000b5 100644 --- a/src/bhyve/bhyve_capabilities.h +++ b/src/bhyve/bhyve_capabilities.h @@ -51,6 +51,7 @@ typedef enum { BHYVE_CAP_CPUTOPOLOGY =3D 1 << 6, BHYVE_CAP_SOUND_HDA =3D 1 << 7, BHYVE_CAP_VNC_PASSWORD =3D 1 << 8, + BHYVE_CAP_VIRTIO_9P =3D 1 << 9, } virBhyveCapsFlags; =20 int virBhyveProbeGrubCaps(virBhyveGrubCapsFlags *caps); diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c index 7526f10fb1..7606840f45 100644 --- a/src/bhyve/bhyve_command.c +++ b/src/bhyve/bhyve_command.c @@ -547,6 +547,73 @@ bhyveBuildSoundArgStr(const virDomainDef *def G_GNUC_U= NUSED, return 0; } =20 +static int +bhyveBuildFSArgStr(const virDomainDef *def G_GNUC_UNUSED, + virDomainFSDefPtr fs, + virCommandPtr cmd) +{ + g_auto(virBuffer) params =3D VIR_BUFFER_INITIALIZER; + + switch ((virDomainFSType) fs->type) { + case VIR_DOMAIN_FS_TYPE_MOUNT: + break; + case VIR_DOMAIN_FS_TYPE_BLOCK: + case VIR_DOMAIN_FS_TYPE_FILE: + case VIR_DOMAIN_FS_TYPE_TEMPLATE: + case VIR_DOMAIN_FS_TYPE_RAM: + case VIR_DOMAIN_FS_TYPE_BIND: + case VIR_DOMAIN_FS_TYPE_VOLUME: + case VIR_DOMAIN_FS_TYPE_LAST: + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unsupported filesystem type '%s'"), + virDomainFSTypeToString(fs->type)); + return -1; + } + + switch (fs->fsdriver) { + case VIR_DOMAIN_FS_DRIVER_TYPE_DEFAULT: + /* The only supported driver by bhyve currently */ + break; + case VIR_DOMAIN_FS_DRIVER_TYPE_VIRTIOFS: + case VIR_DOMAIN_FS_DRIVER_TYPE_PATH: + case VIR_DOMAIN_FS_DRIVER_TYPE_HANDLE: + case VIR_DOMAIN_FS_DRIVER_TYPE_LOOP: + case VIR_DOMAIN_FS_DRIVER_TYPE_NBD: + case VIR_DOMAIN_FS_DRIVER_TYPE_PLOOP: + case VIR_DOMAIN_FS_DRIVER_TYPE_LAST: + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unsupported filesystem driver '%s'"), + virDomainFSDriverTypeToString(fs->fsdriver)); + return -1; + } + + switch (fs->accessmode) { + case VIR_DOMAIN_FS_ACCESSMODE_PASSTHROUGH: + /* This is the only supported mode for now, does not need specific= configuration */ + break; + case VIR_DOMAIN_FS_ACCESSMODE_MAPPED: + case VIR_DOMAIN_FS_ACCESSMODE_SQUASH: + case VIR_DOMAIN_FS_ACCESSMODE_LAST: + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unsupported filesystem accessmode '%s'"), + virDomainFSAccessModeTypeToString(fs->accessmode)); + return -1; + } + + if (fs->readonly) + virBufferAddLit(¶ms, ",ro"); + + virCommandAddArg(cmd, "-s"); + virCommandAddArgFormat(cmd, "%d:%d,virtio-9p,%s=3D%s%s", + fs->info.addr.pci.slot, + fs->info.addr.pci.function, + fs->src->path, + fs->dst, + virBufferCurrentContent(¶ms)); + + return 0; +} + virCommandPtr virBhyveProcessBuildBhyveCmd(bhyveConnPtr driver, virDomainDefPtr def, bool dryRun) @@ -699,6 +766,11 @@ virBhyveProcessBuildBhyveCmd(bhyveConnPtr driver, virD= omainDefPtr def, goto error; } =20 + for (i =3D 0; i < def->nfss; i++) { + if (bhyveBuildFSArgStr(def, def->fss[i], cmd) < 0) + goto error; + } + if (bhyveBuildConsoleArgStr(def, cmd) < 0) goto error; =20 diff --git a/src/bhyve/bhyve_device.c b/src/bhyve/bhyve_device.c index e2e1efd97e..f8c7522d26 100644 --- a/src/bhyve/bhyve_device.c +++ b/src/bhyve/bhyve_device.c @@ -175,6 +175,16 @@ bhyveAssignDevicePCISlots(virDomainDefPtr def, return -1; } =20 + for (i =3D 0; i < def->nfss; i++) { + if (!virDeviceInfoPCIAddressIsWanted(&def->fss[i]->info)) + continue; + if (virDomainPCIAddressReserveNextAddr(addrs, + &def->fss[i]->info, + VIR_PCI_CONNECT_TYPE_PCI_DE= VICE, + -1) < 0) + return -1; + } + return 0; } =20 diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 7cf8bea962..ae82172b90 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -402,6 +402,7 @@ virDomainDiskSourceFormat; virDomainDiskTranslateSourcePool; virDomainFeatureTypeFromString; virDomainFeatureTypeToString; +virDomainFSAccessModeTypeToString; virDomainFSCacheModeTypeToString; virDomainFSDefFree; virDomainFSDefNew; diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.args b/te= sts/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.args new file mode 100644 index 0000000000..193895574d --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.args @@ -0,0 +1,10 @@ +/usr/sbin/bhyve \ +-c 1 \ +-m 214 \ +-u \ +-H \ +-P \ +-s 0:0,hostbridge \ +-s 2:0,ahci,hd:/tmp/freebsd.img \ +-s 3:0,virtio-net,faketapdev,mac=3D52:54:00:b9:94:02 \ +-s 4:0,virtio-9p,/shared/dir=3Dshared_dir,ro bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.ldargs b/= tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.ldargs new file mode 100644 index 0000000000..32538b558e --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.ldargs @@ -0,0 +1,3 @@ +/usr/sbin/bhyveload \ +-m 214 \ +-d /tmp/freebsd.img bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.xml b/tes= ts/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.xml new file mode 100644 index 0000000000..6341236654 --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.xml @@ -0,0 +1,28 @@ + + bhyve + df3be7e7-a104-11e3-aeb0-50e5492bd3dc + 219136 + 1 + + hvm + + + + + + +
+ + + + + +
+ + + + + + + + diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-unsupported-access= mode.xml b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-unsupported-accessmo= de.xml new file mode 100644 index 0000000000..f7d8ce5712 --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-unsupported-accessmode.xml @@ -0,0 +1,27 @@ + + bhyve + df3be7e7-a104-11e3-aeb0-50e5492bd3dc + 219136 + 1 + + hvm + + + + + + +
+ + + + + +
+ + + + + + + diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-unsupported-driver= .xml b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-unsupported-driver.xml new file mode 100644 index 0000000000..3072e6a687 --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-unsupported-driver.xml @@ -0,0 +1,28 @@ + + bhyve + df3be7e7-a104-11e3-aeb0-50e5492bd3dc + 219136 + 1 + + hvm + + + + + + +
+ + + + + +
+ + + + + + + + diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.args b/tests/bhyve= xml2argvdata/bhyvexml2argv-fs-9p.args new file mode 100644 index 0000000000..0d27954432 --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.args @@ -0,0 +1,10 @@ +/usr/sbin/bhyve \ +-c 1 \ +-m 214 \ +-u \ +-H \ +-P \ +-s 0:0,hostbridge \ +-s 2:0,ahci,hd:/tmp/freebsd.img \ +-s 3:0,virtio-net,faketapdev,mac=3D52:54:00:b9:94:02 \ +-s 4:0,virtio-9p,/shared/dir=3Dshared_dir bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.ldargs b/tests/bhy= vexml2argvdata/bhyvexml2argv-fs-9p.ldargs new file mode 100644 index 0000000000..32538b558e --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.ldargs @@ -0,0 +1,3 @@ +/usr/sbin/bhyveload \ +-m 214 \ +-d /tmp/freebsd.img bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.xml b/tests/bhyvex= ml2argvdata/bhyvexml2argv-fs-9p.xml new file mode 100644 index 0000000000..22b8edc69f --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.xml @@ -0,0 +1,27 @@ + + bhyve + df3be7e7-a104-11e3-aeb0-50e5492bd3dc + 219136 + 1 + + hvm + + + + + + +
+ + + + + +
+ + + + + + + diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c index def2acc15c..be816e554f 100644 --- a/tests/bhyvexml2argvtest.c +++ b/tests/bhyvexml2argvtest.c @@ -167,7 +167,7 @@ mymain(void) BHYVE_CAP_NET_E1000 | BHYVE_CAP_LPC_BOOTROM | \ BHYVE_CAP_FBUF | BHYVE_CAP_XHCI | \ BHYVE_CAP_CPUTOPOLOGY | BHYVE_CAP_SOUND_HDA | \ - BHYVE_CAP_VNC_PASSWORD; + BHYVE_CAP_VNC_PASSWORD | BHYVE_CAP_VIRTIO_9P; =20 DO_TEST("base"); DO_TEST("wired"); @@ -208,6 +208,13 @@ mymain(void) DO_TEST("sound"); DO_TEST("isa-controller"); DO_TEST_FAILURE("isa-multiple-controllers"); + DO_TEST("fs-9p"); + DO_TEST("fs-9p-readonly"); + DO_TEST_FAILURE("fs-9p-unsupported-type"); + DO_TEST_FAILURE("fs-9p-unsupported-driver"); + DO_TEST_FAILURE("fs-9p-unsupported-accessmode"); + driver.bhyvecaps &=3D ~BHYVE_CAP_VIRTIO_9P; + DO_TEST_FAILURE("fs-9p"); =20 /* Address allocation tests */ DO_TEST("addr-single-sata-disk"); diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-fs-9p.xml b/tests/bh= yvexml2xmloutdata/bhyvexml2xmlout-fs-9p.xml new file mode 100644 index 0000000000..db3faf29ef --- /dev/null +++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-fs-9p.xml @@ -0,0 +1,38 @@ + + bhyve + df3be7e7-a104-11e3-aeb0-50e5492bd3dc + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + + + + +
+ + + +
+ + + + +
+ + + + + +
+ + + diff --git a/tests/bhyvexml2xmltest.c b/tests/bhyvexml2xmltest.c index 8808d5a8fa..eb9b108704 100644 --- a/tests/bhyvexml2xmltest.c +++ b/tests/bhyvexml2xmltest.c @@ -112,6 +112,7 @@ mymain(void) DO_TEST_DIFFERENT("msrs"); DO_TEST_DIFFERENT("sound"); DO_TEST_DIFFERENT("isa-controller"); + DO_TEST_DIFFERENT("fs-9p"); =20 /* Address allocation tests */ DO_TEST_DIFFERENT("addr-single-sata-disk"); --=20 2.28.0