From nobody Sat Apr 20 07:01:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 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=1572610533; cv=none; d=zoho.com; s=zohoarc; b=GPuy/WZOkBiYJ7ps6fuRgsA9pnCNjMxsLfrWNkGX/5bsFTXLPDci1j9eZPho1aOHKnJiHZWHGOQKHyPK6Ytn/IafKsm3s2dgDTT6kyrqZzwTz7XWCyuKV9K0Ohtxdc9Zn5OMNLerxlUFAL3hJ05YJ0dtY8kuSuzXHNmCC6n6+fc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572610533; 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=C38BR6aluQk8pwXC+q71rEn2dCRmdAKHTbX+E94NDlI=; b=S2hs5J4zc9i/UeXG8qpX5gsNPLF8gubmjXYuP+NfxgCORAp2VXNZhwXFoFMYDeNRkfUXJ2WoEyxCglDwUtzrSL3faHWvSYtQM8UfNTgM5INifnIXY7TfaZd6ilwhiEst/f0OTbVRiI00wQYw6wFJrzhh64+ssvG3grrLe5c7R1Q= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 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-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1572610533594408.69577651761927; Fri, 1 Nov 2019 05:15:33 -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-37-oL0t1ZS8PsupDf4_NIrDtQ-1; Fri, 01 Nov 2019 08:15:28 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 07EA4800A1A; Fri, 1 Nov 2019 12:15:24 +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 6E1C0600D1; Fri, 1 Nov 2019 12:15:23 +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 DBF8A18034EA; Fri, 1 Nov 2019 12:15:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xA1CFJo2005415 for ; Fri, 1 Nov 2019 08:15:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id E7A775D9D6; Fri, 1 Nov 2019 12:15:19 +0000 (UTC) Received: from lpt.redhat.com (ovpn-200-34.brq.redhat.com [10.40.200.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 431045D9CD for ; Fri, 1 Nov 2019 12:15:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572610532; 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=C38BR6aluQk8pwXC+q71rEn2dCRmdAKHTbX+E94NDlI=; b=Ldf/8+3IDifsqO1Lj57h5v+QMJUL92vz2Ebju9SSvLq6V03EFDy0w0oKSvYgCzytODOmKy /9PCAHaEF6iXkGio6vg4n1KgQIK5aVs9PdQ482U3TMNgr8G1gBFRp+9z6DEEzTsF513shd ZQITclDERB52KzcIM+IfoOKC+3ZAY80= From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Fri, 1 Nov 2019 13:15:59 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/9] qemu: address: take fsdriver type into account 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.11 X-MC-Unique: oL0t1ZS8PsupDf4_NIrDtQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" --- src/qemu/qemu_domain_address.c | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 82db62e988..ea5327d475 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -676,18 +676,30 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDev= iceDefPtr dev, break; =20 case VIR_DOMAIN_DEVICE_FS: - /* the only type of filesystem so far is virtio-9p-pci */ - switch ((virDomainFSModel) dev->data.fs->model) { - case VIR_DOMAIN_FS_MODEL_VIRTIO_TRANSITIONAL: - /* Transitional devices only work in conventional PCI slots */ - return pciFlags; - case VIR_DOMAIN_FS_MODEL_VIRTIO: - case VIR_DOMAIN_FS_MODEL_VIRTIO_NON_TRANSITIONAL: - case VIR_DOMAIN_FS_MODEL_DEFAULT: - return virtioFlags; - case VIR_DOMAIN_FS_MODEL_LAST: - break; + switch ((virDomainFSDriverType) dev->data.fs->fsdriver) { + case VIR_DOMAIN_FS_DRIVER_TYPE_DEFAULT: + case VIR_DOMAIN_FS_DRIVER_TYPE_PATH: + case VIR_DOMAIN_FS_DRIVER_TYPE_HANDLE: + /* these drivers are handled by virtio-9p-pci */ + switch ((virDomainFSModel) dev->data.fs->model) { + case VIR_DOMAIN_FS_MODEL_VIRTIO_TRANSITIONAL: + /* Transitional devices only work in conventional PCI slot= s */ + return pciFlags; + case VIR_DOMAIN_FS_MODEL_VIRTIO: + case VIR_DOMAIN_FS_MODEL_VIRTIO_NON_TRANSITIONAL: + case VIR_DOMAIN_FS_MODEL_DEFAULT: + return virtioFlags; + case VIR_DOMAIN_FS_MODEL_LAST: + break; + } + + 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: + return 0; } + return 0; =20 case VIR_DOMAIN_DEVICE_NET: { --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 20 07:01:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 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=1572610532; cv=none; d=zoho.com; s=zohoarc; b=V8nhlcYq907yXIw/8gFQJNTje4tpxkU9jZq9IPMhfnrUiWmAyUXS+7cySsWBxA643JJALio9RG3SR8pSWX67I7R+6l26Cthczw3zIIJ1jEqHnXdgUWIzRbvYzhZMOi4cFn70ztDfYtOccb6hjfCymoQ12u/FziGspFJjLtqEXws= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572610532; 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=iOXcqSrErltsw1K+5qfo0jCYztn0zC+Y75M/96V4c2A=; b=D4VqVeXyjKdhWICTWAJSAv+Hk2/O1MMRfimU+TXQpTtKfF2AdDYNOnhbL/4Yu8aADdI+7fCJdYlMIH3HDq+/rJ6dIwHxy4fTJ+guK9Gs1WncX/RmG8YlQPTX7U/+E9iWSss9c1D/K9jAUL4P1x5iY/mJPS9Hdzy4FDF/mI73kHk= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 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-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1572610532437715.515851707353; Fri, 1 Nov 2019 05:15:32 -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-206-jadFMEa2N9GtN2xj-ZG7yA-1; Fri, 01 Nov 2019 08:15:29 -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 08AE51800D67; Fri, 1 Nov 2019 12:15:24 +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 AE6291001281; Fri, 1 Nov 2019 12:15:23 +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 BBD474BB65; Fri, 1 Nov 2019 12:15:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xA1CFL5Y005425 for ; Fri, 1 Nov 2019 08:15:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id 672D05D9D6; Fri, 1 Nov 2019 12:15:21 +0000 (UTC) Received: from lpt.redhat.com (ovpn-200-34.brq.redhat.com [10.40.200.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7B3385D9CD for ; Fri, 1 Nov 2019 12:15:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572610531; 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=iOXcqSrErltsw1K+5qfo0jCYztn0zC+Y75M/96V4c2A=; b=GnKDsFpwqFZy3lomiea8/Jz+LqnAAn8Yp6Ks3tJ1ADp/NL1lUg5DRDfx4GzDT2kgjH6emC DmwVBNUVkxRqc13KXzW559gGhfL4sKGwkTPpeJZ2U3x7RD2I/BetLcr6zz8SoyhsmWGWbG pYKlgvUe1sSye7V4+a0Oe1sLR8MHhOU= From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Fri, 1 Nov 2019 13:16:00 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/9] qemu: cmdline: take fsdriver into account 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 X-MC-Unique: jadFMEa2N9GtN2xj-ZG7yA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index be9839cc64..cbe601099f 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2689,8 +2689,20 @@ qemuBuildFilesystemCommandLine(virCommandPtr cmd, size_t i; =20 for (i =3D 0; i < def->nfss; i++) { - if (qemuBuildFSDevCommandLine(cmd, def->fss[i], def, qemuCaps) < 0) - return -1; + switch ((virDomainFSDriverType) def->fss[i]->fsdriver) { + case VIR_DOMAIN_FS_DRIVER_TYPE_DEFAULT: + case VIR_DOMAIN_FS_DRIVER_TYPE_PATH: + case VIR_DOMAIN_FS_DRIVER_TYPE_HANDLE: + /* these drivers are handled by virtio-9p-pci */ + if (qemuBuildFSDevCommandLine(cmd, def->fss[i], def, qemuCaps)= < 0) + return -1; + break; + 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: + break; + } } =20 return 0; --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 20 07:01:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 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=1572610550; cv=none; d=zoho.com; s=zohoarc; b=dwOFaSaSv9jNgUdkXF0b5/RLTlp6A7QqzyxyUWiPXDbThVGBCk0Uy1Cw+RJdq985aIvlO5er0Gqve6WPVIDaZ+qCKJD7+UPoUEpwhqcpGKGLbVKJAFjDiu7H4UTBA8aAtfsDqfOayhpHCgWB1JPDsB3/Y8bL/bR/06f6BPH4gCI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572610550; 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=wdB1ivKNIOPWagYLWR3V00wPL5ACKWVvNKN+XZ3FeVE=; b=PkFAFsvzE3aI5Y50g/gofw4jqNCwjGMQGPdAnDaJVNAJCd3JSUovzFY3mhICWVNEtLYLy/wLsNct2TFt0ucvCPE8YatkLcc9vdmVZupIP5xLEDrAVFQel9iINpoC8gZ+ctgqAEUH0+xLNVi1b6J1Z9Qkjx7FwxSh/bOX/0OX3V0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 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-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1572610550578561.5489649277519; Fri, 1 Nov 2019 05:15:50 -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-276-8tLzBM-3PtOB0THul1YmiQ-1; Fri, 01 Nov 2019 08:15:45 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BE54C1800D67; Fri, 1 Nov 2019 12:15:40 +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 9277F5C299; Fri, 1 Nov 2019 12:15:40 +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 39B0A3FA23; Fri, 1 Nov 2019 12:15:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xA1CFMeu005430 for ; Fri, 1 Nov 2019 08:15:22 -0400 Received: by smtp.corp.redhat.com (Postfix) id D74595D9D6; Fri, 1 Nov 2019 12:15:22 +0000 (UTC) Received: from lpt.redhat.com (ovpn-200-34.brq.redhat.com [10.40.200.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 010E15D9CD for ; Fri, 1 Nov 2019 12:15:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572610549; 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=wdB1ivKNIOPWagYLWR3V00wPL5ACKWVvNKN+XZ3FeVE=; b=CKH4bDGBI0FfeZQaLZRYb+aUTMjpdXR0DzcszYFAo5Qb4cGhg+ba+RcTrt4uYSSntuGO68 meTyPvuTZIICard8LZ+HRNsCrRAjsXs5D1rlzh7fFBYG1XdJpRmwUNmh2A44g41vZE3Pt8 TkDdJQi8dEOCI9f8PmavBl96GHZkCrI= From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Fri, 1 Nov 2019 13:16:01 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/9] qemu: add QEMU_CAPS_VHOST_USER_FS 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.16 X-MC-Unique: 8tLzBM-3PtOB0THul1YmiQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Introduced by QEMU commit TBD --- src/qemu/qemu_capabilities.c | 4 ++++ src/qemu/qemu_capabilities.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 9bb3c96448..29ee0d089f 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -547,6 +547,9 @@ VIR_ENUM_IMPL(virQEMUCaps, "query-cpu-model-comparison", "ramfb", "machine.pseries.cap-ccf-assist", + + /* 345 */ + "vhost-user-fs", ); =20 =20 @@ -1141,6 +1144,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[= ] =3D { { "vhost-user-gpu", QEMU_CAPS_DEVICE_VHOST_USER_GPU }, { "vhost-user-vga", QEMU_CAPS_DEVICE_VHOST_USER_VGA }, { "ramfb", QEMU_CAPS_DEVICE_RAMFB }, + { "vhost-user-fs-device", QEMU_CAPS_DEVICE_VHOST_USER_FS }, }; =20 static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioBalloon[]= =3D { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 10f0ce2654..33ac7e60b6 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -529,6 +529,9 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_DEVICE_RAMFB, /* -device ramfb */ QEMU_CAPS_MACHINE_PSERIES_CAP_CCF_ASSIST, /* -machine pseries.cap-ccf-= assist */ =20 + /* 345 */ + QEMU_CAPS_DEVICE_VHOST_USER_FS, /* -device vhost-user-fs */ + QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; =20 --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 20 07:01:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 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=1572610555; cv=none; d=zoho.com; s=zohoarc; b=LvmfaJEOZz303hDduk+UYv8YCKWQtJSHbcCbb4/GRz2pMds5x6pKmyxACKf69w7Ro1P89sNHh8HNd9S4CFPFYcODK0Ao6BwSwpkg/cNnJLp6QxBcWPTMnBmcmd36PJu8uzesSyWi+5lqIuFTMyzPlKUDE0ySUuRtyh1b5tHrT5o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572610555; 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=1Nwk0Mdu5HQxkHY2H2bbNZQmaJ+cKV9rjs4DzrWLkGM=; b=XdJdbCO1Q//MHiijT5HNtby6EvV3gqvHxkhcZCSD6S/xaTuki8c/Jn8qYm0jq3ElTwv3MPC4Ew2Avodf9aVDBFPZeljsXeAD7cByOukMoy5xmgDxT2HnaIZ5k4hKBE0J7N2intRvZkFQtIKBnCW/n0JtqT30TBsJEs9zzq6mzNw= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 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-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 157261055500741.39316227086181; Fri, 1 Nov 2019 05:15:55 -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-376-XgtwemTvNnqoU9ysHh0veg-1; Fri, 01 Nov 2019 08:15:49 -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 A5BE98064DC; Fri, 1 Nov 2019 12:15:44 +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 3BBD11001DD7; Fri, 1 Nov 2019 12:15:44 +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 029D018034ED; Fri, 1 Nov 2019 12:15:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xA1CFOAI005443 for ; Fri, 1 Nov 2019 08:15:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id 543D55D9CD; Fri, 1 Nov 2019 12:15:24 +0000 (UTC) Received: from lpt.redhat.com (ovpn-200-34.brq.redhat.com [10.40.200.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 69C585D9D6 for ; Fri, 1 Nov 2019 12:15:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572610554; 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=1Nwk0Mdu5HQxkHY2H2bbNZQmaJ+cKV9rjs4DzrWLkGM=; b=CszlctReNAbYYPLVN+ELmeY1TTAf6/5cKfvgKWfiFI5wXL9h5f0xQxlqpYAMEwMXhQ6Pho TehhjNduB78wi0V1k48lEuXe/nUWXntHUdVpirhP3/P4CQRbhlQYBkrrQK4cuCI5zwJHAz o+OzqE026JSksESW0BMc1FvEsjpJPCs= From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Fri, 1 Nov 2019 13:16:02 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 4/9] wip: tests: add xml2xml tests for virtio-fs 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 X-MC-Unique: XgtwemTvNnqoU9ysHh0veg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" [to be squashed in with the actual XML addition] --- .../vhost-user-fs-fd-memory.xml | 32 +++++++++ .../vhost-user-fs-hugepages.xml | 67 +++++++++++++++++++ .../vhost-user-fs-fd-memory.x86_64-latest.xml | 1 + .../vhost-user-fs-hugepages.x86_64-latest.xml | 1 + tests/qemuxml2xmltest.c | 3 + 5 files changed, 104 insertions(+) create mode 100644 tests/qemuxml2argvdata/vhost-user-fs-fd-memory.xml create mode 100644 tests/qemuxml2argvdata/vhost-user-fs-hugepages.xml create mode 120000 tests/qemuxml2xmloutdata/vhost-user-fs-fd-memory.x86_64= -latest.xml create mode 120000 tests/qemuxml2xmloutdata/vhost-user-fs-hugepages.x86_64= -latest.xml diff --git a/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.xml b/tests/qem= uxml2argvdata/vhost-user-fs-fd-memory.xml new file mode 100644 index 0000000000..284ee329b3 --- /dev/null +++ b/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.xml @@ -0,0 +1,32 @@ + + guest + 126f2720-6f8e-45ab-a886-ec9277079a67 + 14680064 + 14680064 + + + + + 2 + + hvm + + + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + + + + diff --git a/tests/qemuxml2argvdata/vhost-user-fs-hugepages.xml b/tests/qem= uxml2argvdata/vhost-user-fs-hugepages.xml new file mode 100644 index 0000000000..0633394028 --- /dev/null +++ b/tests/qemuxml2argvdata/vhost-user-fs-hugepages.xml @@ -0,0 +1,67 @@ + + guest + 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 + 4194304 + 4194304 + + + + + + + 2 + + hvm + + + + + + + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + +
+ + + +
+ + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + + + diff --git a/tests/qemuxml2xmloutdata/vhost-user-fs-fd-memory.x86_64-latest= .xml b/tests/qemuxml2xmloutdata/vhost-user-fs-fd-memory.x86_64-latest.xml new file mode 120000 index 0000000000..fbc552ef94 --- /dev/null +++ b/tests/qemuxml2xmloutdata/vhost-user-fs-fd-memory.x86_64-latest.xml @@ -0,0 +1 @@ +../qemuxml2argvdata/vhost-user-fs-fd-memory.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/vhost-user-fs-hugepages.x86_64-latest= .xml b/tests/qemuxml2xmloutdata/vhost-user-fs-hugepages.x86_64-latest.xml new file mode 120000 index 0000000000..0c0f05b254 --- /dev/null +++ b/tests/qemuxml2xmloutdata/vhost-user-fs-hugepages.x86_64-latest.xml @@ -0,0 +1 @@ +../qemuxml2argvdata/vhost-user-fs-hugepages.xml \ No newline at end of file diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 89c9494e6c..fa999e0094 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1315,6 +1315,9 @@ mymain(void) DO_TEST("vhost-vsock-ccw-auto", QEMU_CAPS_DEVICE_VHOST_VSOCK, QEMU_CAPS_CCW); =20 + DO_TEST_CAPS_LATEST("vhost-user-fs-fd-memory"); + DO_TEST_CAPS_LATEST("vhost-user-fs-hugepages"); + DO_TEST("riscv64-virt", QEMU_CAPS_DEVICE_VIRTIO_MMIO); DO_TEST("riscv64-virt-pci", --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 20 07:01:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 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=1572610548; cv=none; d=zoho.com; s=zohoarc; b=C7V04VPCRHqANdnmkJX3rk0pA9NYO4AhuQa673U+w5fZLLki/bp1imE4p42RlY62/bmx1p+v44avsmSMlodm2RdQo5h2E7jeS6J/TgT7Ycm36aHV7WroJk/wxx+k9xfUZU2+8RN0cYTovpZbSV/Bhx4YI8SVkTubgTfPb0v9c0s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572610548; 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=G5/XrRM1iZy4C9JgTgu8BFonicFkcoVYXhAupWDRZZo=; b=fePJGVRfz+S+LFepRN34zczLUZxymNGOdhmnznKMpi/cAMH+UiqNq+kO/jsyPIHeiNUERhlv1z3hzZflW7RrqYKcZ4uN2jqdHCIZyxhCYdORYcnG7tIypXkZXMCfXm4JlqEZDTgbpYzvZezpGy6Pl1SmxXJKXWRWfPyoNZyBYCY= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 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-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1572610548841807.1018355319229; Fri, 1 Nov 2019 05:15:48 -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-169-aTxzrPn_MsKWMRFeUalOXg-1; Fri, 01 Nov 2019 08:15:45 -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 F1B901005502; Fri, 1 Nov 2019 12:15:40 +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 9BE8E166B8; Fri, 1 Nov 2019 12:15:40 +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 426233FA24; Fri, 1 Nov 2019 12:15:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xA1CFPvL005456 for ; Fri, 1 Nov 2019 08:15:25 -0400 Received: by smtp.corp.redhat.com (Postfix) id C865F5D9CD; Fri, 1 Nov 2019 12:15:25 +0000 (UTC) Received: from lpt.redhat.com (ovpn-200-34.brq.redhat.com [10.40.200.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id E3E7C5D9E2 for ; Fri, 1 Nov 2019 12:15:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572610547; 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=G5/XrRM1iZy4C9JgTgu8BFonicFkcoVYXhAupWDRZZo=; b=O9sVXNYdXhbBJUsPdEA+55Ko9tJfE1iNLsHhbA0hyq4r+ZMgl0B/4khmgjWHZrno/ajgUo QqQaw3cQQ4GmamBrmj4DyGdIrUDOmDxrLoblbrB26ukKDVv0bP1vok0IgbVRvJprPH9Y8L PSBKdiqQgNurSxz/4CILOpwU5dM+0+Q= From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Fri, 1 Nov 2019 13:16:03 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 5/9] wip: add XML -> ARGV tests for virtio-fs 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 X-MC-Unique: aTxzrPn_MsKWMRFeUalOXg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" To be squashed in with the actual command line addition. --- ...vhost-user-fs-fd-memory.x86_64-latest.args | 35 ++++++++++++++++ ...vhost-user-fs-hugepages.x86_64-latest.args | 42 +++++++++++++++++++ tests/qemuxml2argvtest.c | 3 ++ 3 files changed, 80 insertions(+) create mode 100644 tests/qemuxml2argvdata/vhost-user-fs-fd-memory.x86_64-l= atest.args create mode 100644 tests/qemuxml2argvdata/vhost-user-fs-hugepages.x86_64-l= atest.args diff --git a/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.x86_64-latest.a= rgs b/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.x86_64-latest.args new file mode 100644 index 0000000000..39c7dbf6d8 --- /dev/null +++ b/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.x86_64-latest.args @@ -0,0 +1,35 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-guest \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-guest/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-guest/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-guest/.config \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-x86_64 \ +-name guest=3Dguest,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-guest/master-key.aes \ +-machine pc,accel=3Dkvm,usb=3Doff,dump-guest-core=3Doff \ +-m 14336 \ +-overcommit mem-lock=3Doff \ +-smp 2,sockets=3D2,cores=3D1,threads=3D1 \ +-object memory-backend-file,id=3Dram-node0,\ +mem-path=3D/var/lib/libvirt/qemu/ram/libvirt/qemu/-1-guest/ram-node0,share= =3Dyes,\ +size=3D15032385536 \ +-numa node,nodeid=3D0,cpus=3D0-1,memdev=3Dram-node0 \ +-uuid 126f2720-6f8e-45ab-a886-ec9277079a67 \ +-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 \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/vhost-user-fs-hugepages.x86_64-latest.a= rgs b/tests/qemuxml2argvdata/vhost-user-fs-hugepages.x86_64-latest.args new file mode 100644 index 0000000000..aa6a60d70d --- /dev/null +++ b/tests/qemuxml2argvdata/vhost-user-fs-hugepages.x86_64-latest.args @@ -0,0 +1,42 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-guest \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-guest/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-guest/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-guest/.config \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-x86_64 \ +-name guest=3Dguest,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-guest/master-key.aes \ +-machine q35,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-m 2048 \ +-overcommit mem-lock=3Doff \ +-smp 2,sockets=3D2,cores=3D1,threads=3D1 \ +-object memory-backend-file,id=3Dram-node0,prealloc=3Dyes,\ +mem-path=3D/dev/hugepages2M/libvirt/qemu/-1-guest,share=3Dyes,size=3D21474= 83648 \ +-numa node,nodeid=3D0,cpus=3D0-1,memdev=3Dram-node0 \ +-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ +-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 \ +-boot strict=3Don \ +-device pcie-root-port,port=3D0x8,chassis=3D1,id=3Dpci.1,bus=3Dpcie.0,mult= ifunction=3Don,\ +addr=3D0x1 \ +-device pcie-root-port,port=3D0x9,chassis=3D2,id=3Dpci.2,bus=3Dpcie.0,addr= =3D0x1.0x1 \ +-device pcie-root-port,port=3D0xa,chassis=3D3,id=3Dpci.3,bus=3Dpcie.0,addr= =3D0x1.0x2 \ +-device pcie-root-port,port=3D0xb,chassis=3D4,id=3Dpci.4,bus=3Dpcie.0,addr= =3D0x1.0x3 \ +-drive file=3D/var/lib/libvirt/images/guest.qcow2,format=3Dqcow2,if=3Dnone= ,\ +id=3Ddrive-virtio-disk0 \ +-device virtio-blk-pci,scsi=3Doff,bus=3Dpci.4,addr=3D0x0,drive=3Ddrive-vir= tio-disk0,\ +id=3Dvirtio-disk0,bootindex=3D1 \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index fd330df3e0..24df0a48e7 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2982,6 +2982,9 @@ mymain(void) =20 DO_TEST_CAPS_VER("launch-security-sev", "2.12.0"); =20 + DO_TEST_CAPS_LATEST("vhost-user-fs-fd-memory"); + DO_TEST_CAPS_LATEST("vhost-user-fs-hugepages"); + DO_TEST("riscv64-virt", QEMU_CAPS_DEVICE_VIRTIO_MMIO); DO_TEST("riscv64-virt-pci", --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 20 07:01:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 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=1572610553; cv=none; d=zoho.com; s=zohoarc; b=NxMfhIpfliwC6dez7fkxuDc3cPtkKgkBcvx9vzgp0u2vGVuuN5sgEyaREIY5nvtXk2ykHYnJaTB/H3GpK5Vi/MSt6bH1ZTZDWggAdnk9HKnnrwJZqhmOTdHo6i/73p9RJdHrI4rdjwj+Sv1DP3/6c5NucXcJ/Iycu3Jatx6FgyE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572610553; 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=BlMOOj+pdEInferaU8FFYKzSDeyCxH25fENiVSoU5TI=; b=jw/rgVfI8Z67zDwCBL5XT6gfsDB5ZqP1F0ZgY7cIpAWgGZ9UtLBYVioR8gr1wZ+kjcTF1qHUEeR2oYbQaAFZGyYyxLmU7uacZuIyyOmkg+Sw32kQfmQaiAwPj4IbJC8cmEqJdoQH1cNVPjemiDayGl8N7RnGSRCvHjn+bfZWGLs= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 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-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1572610553935957.4977505210097; Fri, 1 Nov 2019 05:15:53 -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-147-1BB0ir5iP8anAj6tWHsR9A-1; Fri, 01 Nov 2019 08:15:49 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 64937800A1E; Fri, 1 Nov 2019 12:15:44 +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 3E4E15DA32; Fri, 1 Nov 2019 12:15:44 +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 03B8518034EE; Fri, 1 Nov 2019 12:15:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xA1CFRgQ005472 for ; Fri, 1 Nov 2019 08:15:27 -0400 Received: by smtp.corp.redhat.com (Postfix) id 313755D9D6; Fri, 1 Nov 2019 12:15:27 +0000 (UTC) Received: from lpt.redhat.com (ovpn-200-34.brq.redhat.com [10.40.200.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 697E45D9CD for ; Fri, 1 Nov 2019 12:15:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572610553; 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=BlMOOj+pdEInferaU8FFYKzSDeyCxH25fENiVSoU5TI=; b=Mfbum7grqSd1C3uzyEwT06Ljtdi8NSkui5jc4JCnOeveBJt1QqS55EKcH6OECwecd1TmoX OQH0e7qA+ZZmXc5j8Te6J1VTllxnpbSkJCE6LNjCO5sk+GhtPspQmUtKDFRcd3QKYrUFk3 rrjG20zOHTanfOIYttvzJcnOSxRzMvI= From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Fri, 1 Nov 2019 13:16:04 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 6/9] conf: qemu: add virtio-fs fsdriver type 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.14 X-MC-Unique: 1BB0ir5iP8anAj6tWHsR9A-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Introduce a new 'virtio-fs' driver type for filesystem.
Signed-off-by: J=C3=A1n Tomko --- docs/schemas/domaincommon.rng | 1 + src/conf/domain_conf.c | 1 + src/conf/domain_conf.h | 1 + src/qemu/qemu_command.c | 3 +++ src/qemu/qemu_domain.c | 4 ++++ src/qemu/qemu_domain_address.c | 3 +++ tests/qemuxml2argvdata/vhost-user-fs-fd-memory.xml | 6 ++++++ 7 files changed, 19 insertions(+) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index e06f892da3..f6479c95a7 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -2567,6 +2567,7 @@ loop nbd ploop + virtio-fs diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d5aba7336f..2694e4bb68 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -476,6 +476,7 @@ VIR_ENUM_IMPL(virDomainFSDriver, "loop", "nbd", "ploop", + "virtio-fs", ); =20 VIR_ENUM_IMPL(virDomainFSAccessMode, diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index c69d1b7ef5..54a7e7c52f 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -770,6 +770,7 @@ typedef enum { VIR_DOMAIN_FS_DRIVER_TYPE_LOOP, VIR_DOMAIN_FS_DRIVER_TYPE_NBD, VIR_DOMAIN_FS_DRIVER_TYPE_PLOOP, + VIR_DOMAIN_FS_DRIVER_TYPE_VIRTIO_FS, =20 VIR_DOMAIN_FS_DRIVER_TYPE_LAST } virDomainFSDriverType; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index cbe601099f..985fcdd215 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2697,6 +2697,9 @@ qemuBuildFilesystemCommandLine(virCommandPtr cmd, if (qemuBuildFSDevCommandLine(cmd, def->fss[i], def, qemuCaps)= < 0) return -1; break; + case VIR_DOMAIN_FS_DRIVER_TYPE_VIRTIO_FS: + /* TODO: vhost-user-fs-pci */ + return 0; case VIR_DOMAIN_FS_DRIVER_TYPE_LOOP: case VIR_DOMAIN_FS_DRIVER_TYPE_NBD: case VIR_DOMAIN_FS_DRIVER_TYPE_PLOOP: diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 667cc89072..334039005c 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -7110,6 +7110,10 @@ qemuDomainDeviceDefValidateFS(virDomainFSDefPtr fs, _("Filesystem driver type not supported")); return -1; =20 + case VIR_DOMAIN_FS_DRIVER_TYPE_VIRTIO_FS: + /* TODO: vhost-user-fs-pci */ + return -0; + case VIR_DOMAIN_FS_DRIVER_TYPE_LAST: default: virReportEnumRangeError(virDomainFSDriverType, fs->fsdriver); diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index ea5327d475..482373991c 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -692,6 +692,9 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDevic= eDefPtr dev, case VIR_DOMAIN_FS_MODEL_LAST: break; } + case VIR_DOMAIN_FS_DRIVER_TYPE_VIRTIO_FS: + /* vhost-user-fs-pci */ + return virtioFlags; =20 case VIR_DOMAIN_FS_DRIVER_TYPE_LOOP: case VIR_DOMAIN_FS_DRIVER_TYPE_NBD: diff --git a/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.xml b/tests/qem= uxml2argvdata/vhost-user-fs-fd-memory.xml index 284ee329b3..ecd5b33a28 100644 --- a/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.xml +++ b/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.xml @@ -25,6 +25,12 @@ /usr/bin/qemu-system-x86_64 + + + + +
+ --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 20 07:01:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.120 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=1572610560; cv=none; d=zoho.com; s=zohoarc; b=ipLzltB1yP372/tSTs6u0/4aYjECC1QeTJJcZEQyxe5wMHT39bPphL6VzoTIf7snRlmYKtwMczjnmeBUTw355rxFNUPrwSg/vj7ochXLg5qAvZ6mDYw9R0K2dyAgMTSmmDIokzPU8A9ycGhaBktrCDyWEQfiRAkOeg516BYdoFY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572610560; 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=Bt9MykWBPzvQhwg95V3emyfSP0itFhJ/zhi5KShDUEo=; b=nfHHb6TVQnQwjyuxOKOg2sJan0YVcD9K9ykgtymyXiMnUBn+zaUGDhHyjtUy1dygdk/ue9nUqDrch75TSP2y1VgkNmfG2l+oBzN7zkOikXIegHb4F4UV8LksCueQoOTcpI2n0nHk2I01Bc2alNlGpUJ6XkorNjtXjg6oHpJ9ios= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1572610560035954.9561545360112; Fri, 1 Nov 2019 05:16: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-104-hxBmCZvHPlSOlND9w9BW7g-1; Fri, 01 Nov 2019 08:15:56 -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 B2215107ACC9; Fri, 1 Nov 2019 12:15:49 +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 902201FE04; Fri, 1 Nov 2019 12:15: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 5434818034FB; Fri, 1 Nov 2019 12:15:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xA1CFSaQ005479 for ; Fri, 1 Nov 2019 08:15:28 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4AA285D9D6; Fri, 1 Nov 2019 12:15:28 +0000 (UTC) Received: from lpt.redhat.com (ovpn-200-34.brq.redhat.com [10.40.200.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 989505D9CD for ; Fri, 1 Nov 2019 12:15:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572610559; 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=Bt9MykWBPzvQhwg95V3emyfSP0itFhJ/zhi5KShDUEo=; b=D99lz2eeAVGGVzdM7M8ABWm71r2/k4M1RfiIt8+ur4BIC+A9quHzS5PSV4ArHXsJ6fln75 SUV6Dt39B4l+JLHqoq0xKBHMg1Hd3dmRHnZ75FBcbAvb2lO7LmlVQbyWUcbxDJKbm5VvvR juvWstD7m+YFvxZh6su7t/bFfimNEWQ= From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Fri, 1 Nov 2019 13:16:05 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 7/9] qemu: pass private data to qemuBuildFilesystemCommandLine 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 X-MC-Unique: hxBmCZvHPlSOlND9w9BW7g-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" This will be used by a future patch. Signed-off-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 985fcdd215..d953e3626a 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2684,7 +2684,8 @@ qemuBuildFSDevCommandLine(virCommandPtr cmd, static int qemuBuildFilesystemCommandLine(virCommandPtr cmd, const virDomainDef *def, - virQEMUCapsPtr qemuCaps) + virQEMUCapsPtr qemuCaps, + qemuDomainObjPrivatePtr priv G_GNUC_UNUSED) { size_t i; =20 @@ -10309,7 +10310,7 @@ qemuBuildCommandLine(virQEMUDriverPtr driver, if (qemuBuildDisksCommandLine(cmd, def, qemuCaps) < 0) return NULL; =20 - if (qemuBuildFilesystemCommandLine(cmd, def, qemuCaps) < 0) + if (qemuBuildFilesystemCommandLine(cmd, def, qemuCaps, priv) < 0) return NULL; =20 if (qemuBuildNetCommandLine(driver, vm, logManager, secManager, cmd, --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 20 07:01:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 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=1572610554; cv=none; d=zoho.com; s=zohoarc; b=iCWA/gX6NMnlAyQRNuFpe1pfDXEz+VIHU5sLF7W67gFUw62hLkhPPXRAahJqq53gw1aiceeYcQ89DWryWddLUP6s3vlGf6kktAz8KxAggdA82AC5cHZR0VrR/0FxXvGAgUxJDg03qy5yQIJS4ll+njrMRw+aRpDiolJEecMpC4U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572610554; 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=dM1Em7sSyaWOdRRkram9SzkfiQlxr+sD9wLKYY6IILU=; b=Xl83EPBmEyVkEWPK9le/WN7C5TSnd4YlqG4B5VhctipHWZLoB4LV3I8JXfMX6dFIj3eSdbi1nb+K6GKLZ6VDlbXHenXufkHRSfixMvAX5A4kRxBfg0tzWN3VA52E4ahSOQUHJAGy1A/rxbWRngUpJtm3NIackylluM9T0+n+lJ8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 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-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 15726105541781014.0908127905402; Fri, 1 Nov 2019 05:15: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-185-fz5D6e2bMVed1sXunU811g-1; Fri, 01 Nov 2019 08:15: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 A2BB71804973; Fri, 1 Nov 2019 12:15:45 +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 7FAB726190; Fri, 1 Nov 2019 12:15:45 +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 3F40418034F0; Fri, 1 Nov 2019 12:15:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xA1CFTWN005488 for ; Fri, 1 Nov 2019 08:15:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8B2DB5D9D6; Fri, 1 Nov 2019 12:15:29 +0000 (UTC) Received: from lpt.redhat.com (ovpn-200-34.brq.redhat.com [10.40.200.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id BF5115D9CD for ; Fri, 1 Nov 2019 12:15:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572610553; 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=dM1Em7sSyaWOdRRkram9SzkfiQlxr+sD9wLKYY6IILU=; b=d0jAqM+xd1PZ0Xvn0zfGoML+SrMfFNFTB2SYmXjAI9Fc4QmdAQwKhkzBHZeFk0zZ9pt1ir eumU27xygeqYPBKpbAPelkR7nCKOO9PrfqK+YdRxwzlJ+UX0SYizQ0CjaHqJFzpnr1lOHZ H9ysLRTYJigc6Z3Vp4P4hO6AgcxU7CA= From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Fri, 1 Nov 2019 13:16:06 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 8/9] wip: start virtiofsd 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 X-MC-Unique: fz5D6e2bMVed1sXunU811g-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Start virtiofsd for each device using it. Pre-create the socket for communication with QEMU and pass it to virtiofsd. Note that virtiofsd needs to run as root. --- src/conf/domain_conf.h | 1 + src/qemu/qemu_extdevice.c | 191 ++++++++++++++++++++++++++++++++++++++ tests/qemuxml2argvtest.c | 6 ++ 3 files changed, 198 insertions(+) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 54a7e7c52f..78f88a0c2f 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -817,6 +817,7 @@ struct _virDomainFSDef { unsigned long long space_soft_limit; /* in bytes */ bool symlinksResolved; virDomainVirtioOptionsPtr virtio; + char *vhost_user_fs_path; /* TODO put this in private data */ }; =20 =20 diff --git a/src/qemu/qemu_extdevice.c b/src/qemu/qemu_extdevice.c index 463f76c21a..cb44ca325f 100644 --- a/src/qemu/qemu_extdevice.c +++ b/src/qemu/qemu_extdevice.c @@ -20,6 +20,7 @@ =20 #include =20 +#include "qemu_command.h" #include "qemu_extdevice.h" #include "qemu_vhost_user_gpu.h" #include "qemu_domain.h" @@ -149,6 +150,178 @@ qemuExtDevicesCleanupHost(virQEMUDriverPtr driver, qemuExtTPMCleanupHost(def); } =20 +static char * +qemuExtVirtioFSCreatePidFilename(virQEMUDriverConfigPtr cfg, + const virDomainDef *def, + const char *alias) +{ + g_autofree char *shortName =3D NULL; + g_autofree char *name =3D NULL; + + if (!(shortName =3D virDomainDefGetShortName(def)) || + virAsprintf(&name, "%s-%s-virtiofsd", shortName, alias) < 0) + return NULL; + + return virPidFileBuildPath(cfg->stateDir, name); +} + + +static char * +qemuExtVirtioFSCreateSocketFilename(virQEMUDriverConfigPtr cfg, + const virDomainDef *def, + const char *alias) +{ + g_autofree char *shortName =3D NULL; + g_autofree char *name =3D NULL; + + if (!(shortName =3D virDomainDefGetShortName(def)) || + virAsprintf(&name, "%s-%s-virtiofsd", shortName, alias) < 0) + return NULL; + + return virFileBuildPath(cfg->stateDir, name, ".sock"); +} + + +static int +qemuExtVirtioFSdStart(virQEMUDriverPtr driver, + virDomainObjPtr vm, + virDomainFSDefPtr fs) +{ + g_autoptr(virQEMUDriverConfig) cfg =3D virQEMUDriverGetConfig(driver); + g_autoptr(virCommand) cmd =3D NULL; + g_autofree char *pidfile =3D NULL; + char errbuf[1024] =3D { 0 }; + virDomainChrSourceDefPtr chrdev =3D virDomainChrSourceDefNew(NULL); + pid_t pid =3D (pid_t) -1; + VIR_AUTOCLOSE errfd =3D -1; + VIR_AUTOCLOSE fd =3D -1; + int exitstatus =3D 0; + int cmdret =3D 0; + int ret =3D -1; + int rc; + + chrdev->type =3D VIR_DOMAIN_CHR_TYPE_UNIX; + chrdev->data.nix.listen =3D true; + + if (!(pidfile =3D qemuExtVirtioFSCreatePidFilename(cfg, vm->def, fs->i= nfo.alias))) + goto cleanup; + + if (!(chrdev->data.nix.path =3D qemuExtVirtioFSCreateSocketFilename(cf= g, vm->def, fs->info.alias))) + goto cleanup; + + if (qemuSecuritySetDaemonSocketLabel(driver->securityManager, vm->def)= < 0) + goto cleanup; + fd =3D qemuOpenChrChardevUNIXSocket(chrdev); + if (fd < 0) + goto cleanup; + if (qemuSecurityClearSocketLabel(driver->securityManager, vm->def) < 0) + goto cleanup; + + /* TODO: do not call this here */ + virDomainChrDef chr =3D { .source =3D chrdev }; + if (qemuSecuritySetChardevLabel(driver, vm, &chr) < 0) + goto cleanup; + + /* TODO: configure path */ + if (!(cmd =3D virCommandNew("/usr/libexec/virtiofsd"))) + goto cleanup; + + virCommandSetPidFile(cmd, pidfile); + virCommandSetErrorFD(cmd, &errfd); + virCommandDaemonize(cmd); + + virCommandAddArg(cmd, "--syslog"); + virCommandAddArgFormat(cmd, "--fd=3D%d", fd); + virCommandPassFD(cmd, fd, VIR_COMMAND_PASS_FD_CLOSE_PARENT); + fd =3D -1; + + virCommandAddArg(cmd, "-o"); + /* TODO: validate path? */ + virCommandAddArgFormat(cmd, "source=3D%s", fs->src->path); + virCommandAddArg(cmd, "-d"); + + if (qemuExtDeviceLogCommand(driver, vm, cmd, "virtiofsd") < 0) + goto cleanup; + + cmdret =3D virCommandRun(cmd, &exitstatus); + + if (cmdret < 0 || exitstatus !=3D 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Could not start 'virtiofsd'. exitstatus: %d"), e= xitstatus); + goto error; + } + + rc =3D virPidFileReadPath(pidfile, &pid); + if (rc < 0) { + virReportSystemError(-rc, + _("Unable to read virtiofsd pidfile '%s'"), + pidfile); + goto error; + } + + if (virProcessKill(pid, 0) !=3D 0) { + if (saferead(errfd, errbuf, sizeof(errbuf) - 1) < 0) { + virReportSystemError(errno, "%s", + _("virtiofsd died unexpectedly")); + } else { + virReportError(VIR_ERR_OPERATION_FAILED, + _("virtiofsd died and reported: %s"), errbuf); + } + goto error; + } + + fs->vhost_user_fs_path =3D g_steal_pointer(&chrdev->data.nix.path); + ret =3D 0; + + cleanup: + if (chrdev->data.nix.path) + unlink(chrdev->data.nix.path); + virObjectUnref(chrdev); + return ret; + + error: + if (pid !=3D -1) + virProcessKillPainfully(pid, true); + if (pidfile) + unlink(pidfile); + goto cleanup; +} + + +static void +qemuExtVirtioFSdStop(virQEMUDriverPtr driver, + virDomainObjPtr vm, + virDomainFSDefPtr fs) +{ + g_autoptr(virQEMUDriverConfig) cfg =3D virQEMUDriverGetConfig(driver); + g_autofree char *pidfile =3D NULL; + virErrorPtr orig_err; + pid_t pid =3D -1; + int rc; + + virErrorPreserveLast(&orig_err); + + if (!(pidfile =3D qemuExtVirtioFSCreatePidFilename(cfg, vm->def, fs->i= nfo.alias))) + goto cleanup; + + rc =3D virPidFileReadPathIfAlive(pidfile, &pid, NULL); + if (rc >=3D 0 && pid !=3D (pid_t) -1) + virProcessKillPainfully(pid, true); + + if (unlink(pidfile) < 0 && + errno !=3D ENOENT) { + virReportSystemError(errno, + _("Unable to remove stale pidfile %s"), + pidfile); + } + + if (fs->vhost_user_fs_path) + unlink(fs->vhost_user_fs_path); + + cleanup: + virErrorRestore(&orig_err); +} + =20 int qemuExtDevicesStart(virQEMUDriverPtr driver, @@ -184,6 +357,17 @@ qemuExtDevicesStart(virQEMUDriverPtr driver, return -1; } =20 + for (i =3D 0; i < def->nfss; i++) { + /* FIXME: use private data */ + virDomainFSDefPtr fs =3D def->fss[i]; + + if (fs->fsdriver =3D=3D VIR_DOMAIN_FS_DRIVER_TYPE_VIRTIO_FS) { + if (qemuExtVirtioFSdStart(driver, vm, fs) < 0) + return -1; + } + } + + return ret; } =20 @@ -215,6 +399,13 @@ qemuExtDevicesStop(virQEMUDriverPtr driver, if (slirp) qemuSlirpStop(slirp, vm, driver, net, false); } + + for (i =3D 0; i < def->nfss; i++) { + virDomainFSDefPtr fs =3D def->fss[i]; + + if (fs->fsdriver =3D=3D VIR_DOMAIN_FS_DRIVER_TYPE_VIRTIO_FS) + qemuExtVirtioFSdStop(driver, vm, fs); + } } =20 =20 diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 24df0a48e7..bf3366f953 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -501,6 +501,12 @@ testCompareXMLToArgv(const void *data) } } =20 + for (i =3D 0; i < vm->def->nfss; i++) { + virDomainFSDefPtr fs =3D vm->def->fss[i]; + char *s =3D g_strdup_printf("/tmp/lib/domain--1-guest/fs%zu.vhost-= fs.sock", i); + fs->vhost_user_fs_path =3D s; + } + if (vm->def->vsock) { virDomainVsockDefPtr vsock =3D vm->def->vsock; qemuDomainVsockPrivatePtr vsockPriv =3D --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 20 07:01:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 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=1572610640; cv=none; d=zoho.com; s=zohoarc; b=YlxqP4gUqXezJ/iilQGJXejlhsKfTdbpMSe0XA4QJMrOcxBpDryMcPRO+sspiZUyfqI6VyLZHgAcvuL+ViCaJL4MgVC4K32/0ahGJRyjpNqGiCK8nBeMEAhkROmtWKzlaGLjatilbHqyKCeiUq0J2B29rfkhEYmCbW8HFtRllLc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572610640; 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=V61aVvFMklcN82QIIPsPAb6M0DWiLjnDuPVL/EPJBio=; b=Cs44EmXtgpIKEzcLToU0N6Pp8o0MvtXpQmlADrPZ6UTXAznrE4IzSEoJ0w0Y73Gi+Hdqq2mwqkLi/4HhNS9rjfI5CzGycNa3jNr2elFE9xDVhif5Jj9ZibKaMNdEpY14AgcLiOJOd6pf4BC7cRXg/E0CDTIn8bfRUfx/ITe82tA= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 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-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 157261064087637.19903958172415; Fri, 1 Nov 2019 05:17:20 -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-76-wacRMNc5OqySY3M7xQsT1A-1; Fri, 01 Nov 2019 08:16:00 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5B9201005509; Fri, 1 Nov 2019 12:15:54 +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 3878F5D9CD; Fri, 1 Nov 2019 12:15:54 +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 F36A94BB78; Fri, 1 Nov 2019 12:15:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xA1CFVdP005502 for ; Fri, 1 Nov 2019 08:15:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id 072865D9D6; Fri, 1 Nov 2019 12:15:31 +0000 (UTC) Received: from lpt.redhat.com (ovpn-200-34.brq.redhat.com [10.40.200.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1C77E5D9CD for ; Fri, 1 Nov 2019 12:15:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572610639; 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=V61aVvFMklcN82QIIPsPAb6M0DWiLjnDuPVL/EPJBio=; b=Ke7w9w5/RasksIfFFljcjvOek5OO9Ls0K9E9JocyV7DgX41dWidf7wR8Frux58b52qLUVh 0c/K63T2qqJA+ZFWwTg3DIHxNmacdHYhwfGUI9Cm6UJtvoLuEz9OWjfvqzuITgSk0aq/Wt LGRahMRLBjIsiWJzuyEyhm8V+u/E6sE= From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Fri, 1 Nov 2019 13:16:07 +0100 Message-Id: <6a612d00c0ce10ea0dc4ddadcbd4a04837a22065.1572609485.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 9/9] wip: build vhost-user-fs device command line 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.14 X-MC-Unique: wacRMNc5OqySY3M7xQsT1A-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Format the 'vhost-user-fs' device on the QEMU command line. --- src/qemu/qemu_command.c | 49 +++++++++++++++++-- ...vhost-user-fs-fd-memory.x86_64-latest.args | 3 ++ 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index d953e3626a..a3008e47ee 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2593,6 +2593,46 @@ qemuBuildDisksCommandLine(virCommandPtr cmd, } =20 =20 +static int +qemuBuildVHostUserFsCommandLine(virCommandPtr cmd, + virDomainFSDef *fs, + const virDomainDef *def G_GNUC_UNUSED, + qemuDomainObjPrivatePtr priv) +{ + /* TODO: reject non-passthrough accessmode */ + g_autofree char *chardev_alias =3D NULL; + g_auto(virBuffer) opt =3D VIR_BUFFER_INITIALIZER; + const char *tag =3D fs->dst; + + chardev_alias =3D g_strdup_printf("chr-vu-%s", fs->info.alias); + + virCommandAddArg(cmd, "-chardev"); + virBufferAddLit(&opt, "socket"); + virBufferAsprintf(&opt, ",id=3D%s", chardev_alias); + virBufferEscapeString(&opt, ",path=3D%s", fs->vhost_user_fs_path); + virCommandAddArg(cmd, virBufferContentAndReset(&opt)); + + virCommandAddArg(cmd, "-device"); + + if (qemuBuildVirtioDevStr(&opt, "vhost-user-fs", priv->qemuCaps, + VIR_DOMAIN_DEVICE_FS, fs) < 0) + return -1; + + virBufferAsprintf(&opt, ",chardev=3D%s", chardev_alias); + /* TODO: do not hardcode this */ + virBufferAsprintf(&opt, ",queue-size=3D%u", 1024); + virBufferEscapeString(&opt, ",tag=3D%s,cache-size=3D2G", tag); + if (qemuBuildVirtioOptionsStr(&opt, fs->virtio, priv->qemuCaps) < 0) + return -1; + + if (qemuBuildDeviceAddressStr(&opt, def, &fs->info, priv->qemuCaps) < = 0) + return -1; + + virCommandAddArg(cmd, virBufferContentAndReset(&opt)); + return 0; +} + + static char * qemuBuildFSStr(virDomainFSDefPtr fs) { @@ -2685,7 +2725,7 @@ static int qemuBuildFilesystemCommandLine(virCommandPtr cmd, const virDomainDef *def, virQEMUCapsPtr qemuCaps, - qemuDomainObjPrivatePtr priv G_GNUC_UNUSED) + qemuDomainObjPrivatePtr priv) { size_t i; =20 @@ -2699,8 +2739,11 @@ qemuBuildFilesystemCommandLine(virCommandPtr cmd, return -1; break; case VIR_DOMAIN_FS_DRIVER_TYPE_VIRTIO_FS: - /* TODO: vhost-user-fs-pci */ - return 0; + /* vhost-user-fs-pci */ + if (qemuBuildVHostUserFsCommandLine(cmd, def->fss[i], def, pri= v) < 0) + return -1; + break; + case VIR_DOMAIN_FS_DRIVER_TYPE_LOOP: case VIR_DOMAIN_FS_DRIVER_TYPE_NBD: case VIR_DOMAIN_FS_DRIVER_TYPE_PLOOP: diff --git a/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.x86_64-latest.a= rgs b/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.x86_64-latest.args index 39c7dbf6d8..a63d6b6dcc 100644 --- a/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.x86_64-latest.args +++ b/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.x86_64-latest.args @@ -30,6 +30,9 @@ size=3D15032385536 \ -no-shutdown \ -no-acpi \ -boot strict=3Don \ +-chardev socket,id=3Dchr-vu-fs0,path=3D/tmp/lib/domain--1-guest/fs0.vhost-= fs.sock \ +-device vhost-user-fs-pci,chardev=3Dchr-vu-fs0,queue-size=3D1024,tag=3D/pa= th,\ +cache-size=3D2G,bus=3Dpci.0,addr=3D0x2 \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ resourcecontrol=3Ddeny \ -msg timestamp=3Don --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list