From nobody Thu May 2 11:37:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1563275248; cv=none; d=zoho.com; s=zohoarc; b=bMTYLuJaGf104Wa3y7CvrpLkmyItNbotsfBFw/88aw8ED5E68SRru4w3O3nAZ7kac+MQW8uc+3OAT2iV426SwtoEOWBelSSooeXQ2SfiKmcCRuGOLBsi2qsVvdkE33Io/BIOTgdnpWuyN60cB9apX117oRR7TnLYgpU6yKt7JYE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563275248; 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:ARC-Authentication-Results; bh=FYdIhehPWihnbI+R2pgP30094g7Y8BBrq9Fbg6yp6I8=; b=jQwD6tSwuQG7agJfMA2BqLnOxJGKAMbRwvjEs4KYYnugo/xvhBLvPn8xpvkFyvGYI35s+WSWLvyAZ1+QHBy7m88ndbY75KL4hXWsAS2Fgr9PFZ0XNkpJ4lVNWZ4icqTphy87/TUVrW2p4sWXv5UdSWzOL7mEjPgoTHkZZzgUH5Y= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1563275248851437.5430252266897; Tue, 16 Jul 2019 04:07:28 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 49205335C9; Tue, 16 Jul 2019 11:07:27 +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 1DCA4614C1; Tue, 16 Jul 2019 11:07:27 +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 CEBF0180BACE; Tue, 16 Jul 2019 11:07:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6GB72Pj029243 for ; Tue, 16 Jul 2019 07:07:02 -0400 Received: by smtp.corp.redhat.com (Postfix) id 982D01C4; Tue, 16 Jul 2019 11:07:02 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2212460920 for ; Tue, 16 Jul 2019 11:07:01 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 16 Jul 2019 13:06:49 +0200 Message-Id: <2b6b38e050165afea021896ad6b9defa396ebe88.1563275164.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/9] tests: qemu: minimize fs9p.xml 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 16 Jul 2019 11:07:27 +0000 (UTC) Remove the hard drive, USB controller and memballoon. Signed-off-by: J=C3=A1n Tomko --- tests/qemuxml2argvdata/fs9p.args | 6 +----- tests/qemuxml2argvdata/fs9p.xml | 9 ++------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/tests/qemuxml2argvdata/fs9p.args b/tests/qemuxml2argvdata/fs9p= .args index caeb672760..5b028c7a80 100644 --- a/tests/qemuxml2argvdata/fs9p.args +++ b/tests/qemuxml2argvdata/fs9p.args @@ -24,9 +24,6 @@ server,nowait \ -rtc base=3Dutc \ -no-shutdown \ -no-acpi \ --usb \ --drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ --device ide-hd,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-0,b= ootindex=3D1 \ -fsdev local,security_model=3Dpassthrough,id=3Dfsdev-fs0,path=3D/export/to= /guest \ -device virtio-9p-pci,id=3Dfs0,fsdev=3Dfsdev-fs0,mount_tag=3D/import/from/= host,\ bus=3Dpci.0,addr=3D0x3 \ @@ -36,5 +33,4 @@ path=3D/export/to/guest2 \ bus=3Dpci.0,addr=3D0x4 \ -fsdev handle,writeout=3Dimmediate,id=3Dfsdev-fs2,path=3D/export/to/guest3= \ -device virtio-9p-pci,id=3Dfs2,fsdev=3Dfsdev-fs2,mount_tag=3D/import/from/= host3,\ -bus=3Dpci.0,addr=3D0x5 \ --device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x6 +bus=3Dpci.0,addr=3D0x5 diff --git a/tests/qemuxml2argvdata/fs9p.xml b/tests/qemuxml2argvdata/fs9p.= xml index 9216ea97ae..aaa7c466b4 100644 --- a/tests/qemuxml2argvdata/fs9p.xml +++ b/tests/qemuxml2argvdata/fs9p.xml @@ -14,13 +14,7 @@ destroy /usr/bin/qemu-system-i686 - - - -
- - - + @@ -35,5 +29,6 @@ + --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 11:37:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1563275229; cv=none; d=zoho.com; s=zohoarc; b=FhSXHG1QIFhxb/voQkiUQ1+86/pQIO9SDwjodjf9Xj6/JF/UYWvAfhBrnW3oKGSduWmqGaDnJpP9eYPlSfBk6RZfAe45awryH7ylLIVBTHc7MUfGvgSG3w2B5QEZpUFrfsNxfPyR+aIaxmvK7TXTEoxRlWm+bv418zeoW1DRON8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563275229; 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:ARC-Authentication-Results; bh=TbWQuqjTuYQ452LzUK+MBLY0CUg/RDj1tG35vSV/SOk=; b=MuLMRY2qD7+JiGEdwq2nsm2/7/3tXZM54V+RsemWJ4CpG4xdb0ucwhxTyJoJjYp05GYwziRRd6vZQ9DSJ1ZbGadOeF1UVwtKi/a+g0KPRxIQfU+/10v8GahuoZ6yF4IN2a6z9uqKp1a8mG/wedRTQGDeyXB8luUqcDVCKda3Gjg= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1563275229666959.9704570381426; Tue, 16 Jul 2019 04:07:09 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DA3E9300CB2D; Tue, 16 Jul 2019 11:07:07 +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 40DAE60C44; Tue, 16 Jul 2019 11:07:07 +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 8000E1800207; Tue, 16 Jul 2019 11:07:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6GB73jX029251 for ; Tue, 16 Jul 2019 07:07:03 -0400 Received: by smtp.corp.redhat.com (Postfix) id 650E860920; Tue, 16 Jul 2019 11:07:03 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id E3BA7611DC for ; Tue, 16 Jul 2019 11:07:02 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 16 Jul 2019 13:06:50 +0200 Message-Id: <58ba4558711d22ccac25d3f32aa0d9a7d49f3503.1563275164.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/9] qemu: add CAPS_LATEST tests for 9pfs 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Tue, 16 Jul 2019 11:07:08 +0000 (UTC) Use the existing fs9p.xml and fs9p-ccw.xml to run the tests with latest caps on x86_64 and s390x. Signed-off-by: J=C3=A1n Tomko --- .../fs9p-ccw.s390x-latest.args | 44 +++++++++++++++++++ .../qemuxml2argvdata/fs9p.x86_64-latest.args | 41 +++++++++++++++++ tests/qemuxml2argvtest.c | 2 + 3 files changed, 87 insertions(+) create mode 100644 tests/qemuxml2argvdata/fs9p-ccw.s390x-latest.args create mode 100644 tests/qemuxml2argvdata/fs9p.x86_64-latest.args diff --git a/tests/qemuxml2argvdata/fs9p-ccw.s390x-latest.args b/tests/qemu= xml2argvdata/fs9p-ccw.s390x-latest.args new file mode 100644 index 0000000000..efd29c10ea --- /dev/null +++ b/tests/qemuxml2argvdata/fs9p-ccw.s390x-latest.args @@ -0,0 +1,44 @@ +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-s390x \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine s390-ccw-virtio,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-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 \ +-boot strict=3Don \ +-drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-vir= tio-disk0 \ +-device virtio-blk-ccw,scsi=3Doff,devno=3Dfe.0.0000,drive=3Ddrive-virtio-d= isk0,\ +id=3Dvirtio-disk0,bootindex=3D1 \ +-fsdev local,security_model=3Dpassthrough,id=3Dfsdev-fs0,path=3D/export/to= /guest \ +-device virtio-9p-ccw,id=3Dfs0,fsdev=3Dfsdev-fs0,mount_tag=3D/import/from/= host,\ +devno=3Dfe.0.0001 \ +-fsdev local,security_model=3Dmapped,writeout=3Dimmediate,id=3Dfsdev-fs1,\ +path=3D/export/to/guest2 \ +-device virtio-9p-ccw,id=3Dfs1,fsdev=3Dfsdev-fs1,mount_tag=3D/import/from/= host2,\ +devno=3Dfe.0.0002 \ +-fsdev handle,writeout=3Dimmediate,id=3Dfsdev-fs2,path=3D/export/to/guest3= \ +-device virtio-9p-ccw,id=3Dfs2,fsdev=3Dfsdev-fs2,mount_tag=3D/import/from/= host3,\ +devno=3Dfe.0.0003 \ +-device virtio-balloon-ccw,id=3Dballoon0,devno=3Dfe.0.0004 \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/fs9p.x86_64-latest.args b/tests/qemuxml= 2argvdata/fs9p.x86_64-latest.args new file mode 100644 index 0000000000..47b7580817 --- /dev/null +++ b/tests/qemuxml2argvdata/fs9p.x86_64-latest.args @@ -0,0 +1,41 @@ +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-i686 \ +-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 \ +-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 \ +-fsdev local,security_model=3Dpassthrough,id=3Dfsdev-fs0,path=3D/export/to= /guest \ +-device virtio-9p-pci,id=3Dfs0,fsdev=3Dfsdev-fs0,mount_tag=3D/import/from/= host,\ +bus=3Dpci.0,addr=3D0x2 \ +-fsdev local,security_model=3Dmapped,writeout=3Dimmediate,id=3Dfsdev-fs1,\ +path=3D/export/to/guest2 \ +-device virtio-9p-pci,id=3Dfs1,fsdev=3Dfsdev-fs1,mount_tag=3D/import/from/= host2,\ +bus=3Dpci.0,addr=3D0x3 \ +-fsdev handle,writeout=3Dimmediate,id=3Dfsdev-fs2,path=3D/export/to/guest3= \ +-device virtio-9p-pci,id=3Dfs2,fsdev=3Dfsdev-fs2,mount_tag=3D/import/from/= host3,\ +bus=3Dpci.0,addr=3D0x4 \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index ca22d6b6d5..d6e6272518 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1568,8 +1568,10 @@ mymain(void) QEMU_CAPS_DEVICE_ICH9_INTEL_HDA, QEMU_CAPS_OBJECT_USB_AUDIO); DO_TEST("fs9p", NONE); + DO_TEST_CAPS_LATEST("fs9p"); DO_TEST("fs9p-ccw", QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); + DO_TEST_CAPS_ARCH_LATEST("fs9p-ccw", "s390x"); =20 DO_TEST("hostdev-usb-address", NONE); DO_TEST("hostdev-usb-address-device", NONE); --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 11:37:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1563275252; cv=none; d=zoho.com; s=zohoarc; b=nsDFhs/r4me2vIUZcSn6pw3sttcm9XO+Dm4xPLF3OaPRxgjfW728RodJrhphdpJJHhiROI+i3hlmqKuXFBFElZiwqkYQXY+sKKuP0R/AizDD8G5s0dsja2pM3aWRYlH7U/wuGz9eiZr/LfRH4oTPUVtDVDQ0eJ3ct7YLRiWCfdU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563275252; 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:ARC-Authentication-Results; bh=kV9BWGOYyMJtrA2tlMOqA84Zg7tR9Uit4Sp8uPdMgkk=; b=jrZYNCThDNQ4F7tHpiS4hCHXdimeSEVBBU+a44K2+omQxsxTUpBRhTZZ61AiRhd7u7kxHgNOkCvNOYYQhD3nut6HBOJ18CmSfzce0TlTsVVD7KhcWVG7SrXz7jWunb9VG6F2OIhKASS51ml/pYOGJP2lgpNX8+pxs5y2ALD6RTY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1563275252245284.1161125623123; Tue, 16 Jul 2019 04:07:32 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 999593086222; Tue, 16 Jul 2019 11:07:30 +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 6F8816013C; Tue, 16 Jul 2019 11:07:30 +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 37A9954D3D; Tue, 16 Jul 2019 11:07:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6GB74Ro029258 for ; Tue, 16 Jul 2019 07:07:04 -0400 Received: by smtp.corp.redhat.com (Postfix) id 30AF11C5; Tue, 16 Jul 2019 11:07:04 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id B03CE60920 for ; Tue, 16 Jul 2019 11:07:03 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 16 Jul 2019 13:06:51 +0200 Message-Id: <84077536f9b9c62b694e1db7efa1be6f1c43cc3a.1563275164.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/9] qemu: address: remove useless comment 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Tue, 16 Jul 2019 11:07:31 +0000 (UTC) Commit b27375a9b86f010a9a9fc0323be3f204b62195f4 omitted one zero. Signed-off-by: J=C3=A1n Tomko --- src/qemu/qemu_domain_address.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 972b810211..216ba6235e 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -670,8 +670,7 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDevic= eDefPtr dev, case VIR_DOMAIN_CONTROLLER_TYPE_CCID: case VIR_DOMAIN_CONTROLLER_TYPE_XENBUS: case VIR_DOMAIN_CONTROLLER_TYPE_LAST: - /* should be 0 */ - return pciFlags; + return 0; } } break; --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 11:37:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1563275232; cv=none; d=zoho.com; s=zohoarc; b=KISmdvWv4f5VrjBHWMdLolfJrvNyYqjRbkByHPxMgUdV9g17acckXFMfelfNEhIBi6dUa98dy6T2fuQXozaSCzt1qQWuQFrA9TZgHaggseZD1o9l0OJguAeV7MR+Fycs0lC1WauEzeZyInEG6pzTtlR0wX+haM7IgX2cD2C6538= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563275232; 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:ARC-Authentication-Results; bh=0VBTKVogrusyKieABUiqcT5lD+zOs4z16e8887SQLQs=; b=cBoM3QuP93w96+y+HKxOQ/7sZM1/sgnwltjiQFNAQ2k8dXz765reZU6KBaA94Du93rJeESY1oeGLlHW2legLGIGLsd0gG+5qCgHIhhLtFzylAKHW4dT37vBnS5xOZmKW5Zl2QVCON3bQCkQLYMqlYK2saMdDb7IKHrxlOAVQD4w= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 15632752322331002.3572067081599; Tue, 16 Jul 2019 04:07:12 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 665043091799; Tue, 16 Jul 2019 11:07:10 +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 3FB9B5D9D6; Tue, 16 Jul 2019 11:07:10 +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 EEE7A1800209; Tue, 16 Jul 2019 11:07:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6GB754t029265 for ; Tue, 16 Jul 2019 07:07:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id F371760920; Tue, 16 Jul 2019 11:07:04 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7D1AF611DE for ; Tue, 16 Jul 2019 11:07:04 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 16 Jul 2019 13:06:52 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 4/9] qemu: command: rename qemuBuildFSDevCommandLine 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Tue, 16 Jul 2019 11:07:11 +0000 (UTC) This function iterates over all filesystems, not just -fsdevs. Rename it to free the name for a function that actually builds fsdevs. Signed-off-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 6b0cd7f36d..9d5d54fd6e 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2802,9 +2802,9 @@ qemuBuildFSDevStr(const virDomainDef *def, =20 =20 static int -qemuBuildFSDevCommandLine(virCommandPtr cmd, - const virDomainDef *def, - virQEMUCapsPtr qemuCaps) +qemuBuildFilesystemCommandLine(virCommandPtr cmd, + const virDomainDef *def, + virQEMUCapsPtr qemuCaps) { size_t i; =20 @@ -10754,7 +10754,7 @@ qemuBuildCommandLine(virQEMUDriverPtr driver, if (qemuBuildDisksCommandLine(cmd, def, qemuCaps) < 0) goto error; =20 - if (qemuBuildFSDevCommandLine(cmd, def, qemuCaps) < 0) + if (qemuBuildFilesystemCommandLine(cmd, def, qemuCaps) < 0) goto error; =20 if (qemuBuildNetCommandLine(driver, logManager, secManager, cmd, def, --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 11:37:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1563275249; cv=none; d=zoho.com; s=zohoarc; b=NnLX44TOhVpPuLCZl/AtTpaWMwqpXG1UNFCIIN6f54kCyOWUc2xiA2waSoz8UBA7X6Lm6O2KkbXiEyePKFAuDdvIr3PAmh/kFfAFsoknGM/thcXbLLQTt26eGGM/u0H8ca5muRcvpJ7lhKBo4I4Yu2rORM2fM9Cko4kBcqqqwyE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563275249; 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:ARC-Authentication-Results; bh=3dRykdn5V5/a14Lt6l2ofl0ZbX95VNU3ZOI2rQo77WE=; b=fC21KfJYe5BZKfqHFYMjft22WbwiB7S471/NaBvzOt+qdNFAtR3XvLMBwNOdQVcK1+lFSTS52771U6NwwEEeOZ6TWRP9rbJsPhq0EA8R+oF+RGmSensPXzayMz8tioo3K9Zsz+o4ey2GQJrBStOlZy+lNVpRlbK88wS2RTW5By0= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1563275249174970.5490805351229; Tue, 16 Jul 2019 04:07:29 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 49F43811DC; Tue, 16 Jul 2019 11:07:27 +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 2501A60C70; Tue, 16 Jul 2019 11:07:27 +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 D4776180020C; Tue, 16 Jul 2019 11:07:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6GB75il029273 for ; Tue, 16 Jul 2019 07:07:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id C1F371C4; Tue, 16 Jul 2019 11:07:05 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4C53260920 for ; Tue, 16 Jul 2019 11:07:05 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 16 Jul 2019 13:06:53 +0200 Message-Id: <8af7958121fe4ef9c747b6e3e17fba0d422eeb94.1563275164.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 5/9] qemu: command: re-introduce qemuBuildFSDevCommandLine 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 16 Jul 2019 11:07:27 +0000 (UTC) This time it only builds one device. Signed-off-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 44 ++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 9d5d54fd6e..02a6642207 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2801,6 +2801,33 @@ qemuBuildFSDevStr(const virDomainDef *def, } =20 =20 +static int +qemuBuildFSDevCommandLine(virCommandPtr cmd, + virDomainFSDefPtr fs, + const virDomainDef *def, + virQEMUCapsPtr qemuCaps) +{ + char *optstr; + + virCommandAddArg(cmd, "-fsdev"); + if (!(optstr =3D qemuBuildFSStr(fs))) + return -1; + virCommandAddArg(cmd, optstr); + VIR_FREE(optstr); + + if (qemuCommandAddExtDevice(cmd, &fs->info) < 0) + return -1; + + virCommandAddArg(cmd, "-device"); + if (!(optstr =3D qemuBuildFSDevStr(def, fs, qemuCaps))) + return -1; + virCommandAddArg(cmd, optstr); + VIR_FREE(optstr); + + return 0; +} + + static int qemuBuildFilesystemCommandLine(virCommandPtr cmd, const virDomainDef *def, @@ -2809,23 +2836,8 @@ qemuBuildFilesystemCommandLine(virCommandPtr cmd, size_t i; =20 for (i =3D 0; i < def->nfss; i++) { - char *optstr; - virDomainFSDefPtr fs =3D def->fss[i]; - - virCommandAddArg(cmd, "-fsdev"); - if (!(optstr =3D qemuBuildFSStr(fs))) - return -1; - virCommandAddArg(cmd, optstr); - VIR_FREE(optstr); - - if (qemuCommandAddExtDevice(cmd, &fs->info) < 0) - return -1; - - virCommandAddArg(cmd, "-device"); - if (!(optstr =3D qemuBuildFSDevStr(def, fs, qemuCaps))) + if (qemuBuildFSDevCommandLine(cmd, def->fss[i], def, qemuCaps) < 0) return -1; - virCommandAddArg(cmd, optstr); - VIR_FREE(optstr); } =20 return 0; --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 11:37:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1563275255; cv=none; d=zoho.com; s=zohoarc; b=kpdZjVNerPSewLnW1k3RUtwggJ3B/VHFpKbD0AI3ncQnkSENbrhWSR/qGYmTIXjIjduwxgwQTBBqQm04UbC93yzJNYEsF2How6zaJ3mpNj7aN4HhQwlMLT+0Ykjs3QkbBBsnuONGs4l7DWEG5qYQVG3W2WsxPFMXj3DD4mszSBY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563275255; 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:ARC-Authentication-Results; bh=+eTCnyWNBd7sBxLsfFgzp8Sx9Lvtqts3j5UiUyOX4es=; b=dSwtNtdy5SUPc54nEDW92fHZrYfABOAojJndz4QyFMqTbXWjhpRDUm18rasVzGnFCXWuBBL9jNCon2dyotTNPAUKO3Puly4VofaTotGgF71IKBkQMSu0mKJcKkkRa6y8gm3n/4bhx7LwRkKhWGkXeOkiueZL34SsWNeUqN1Xik0= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1563275255987256.12028692315744; Tue, 16 Jul 2019 04:07:35 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 6F630C04D946; Tue, 16 Jul 2019 11:07:34 +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 425C45E7A5; Tue, 16 Jul 2019 11:07:34 +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 F04D441F66; Tue, 16 Jul 2019 11:07:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6GB76eC029283 for ; Tue, 16 Jul 2019 07:07:06 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8EB9E4F; Tue, 16 Jul 2019 11:07:06 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 197D660920 for ; Tue, 16 Jul 2019 11:07:05 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 16 Jul 2019 13:06:54 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 6/9] qemu: command: use VIR_AUTOFREE in qemuBuildFSDevCommandLine 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 16 Jul 2019 11:07:34 +0000 (UTC) Signed-off-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 02a6642207..8617b010dc 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2807,7 +2807,7 @@ qemuBuildFSDevCommandLine(virCommandPtr cmd, const virDomainDef *def, virQEMUCapsPtr qemuCaps) { - char *optstr; + VIR_AUTOFREE(char *) optstr =3D NULL; =20 virCommandAddArg(cmd, "-fsdev"); if (!(optstr =3D qemuBuildFSStr(fs))) @@ -2822,7 +2822,6 @@ qemuBuildFSDevCommandLine(virCommandPtr cmd, if (!(optstr =3D qemuBuildFSDevStr(def, fs, qemuCaps))) return -1; virCommandAddArg(cmd, optstr); - VIR_FREE(optstr); =20 return 0; } --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 11:37:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1563275260; cv=none; d=zoho.com; s=zohoarc; b=XouFCxBj/v8YAy0bGUnmA3h0OCNGYjzRT8W1aqbnbIrgZh6KkMpLEjivQxtQY0R4bHaNfSitCGLINQJVyfRKJ87rQRXXLSJh5de5PC55LBDo/kzB6bm2WXCvibgDOzEToJ6McOhWKiAOpxSYLSK7KQQs6EbqZix1ZBendlD1pZU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563275260; 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:ARC-Authentication-Results; bh=0/RVcQxX49sfD+S4vx0pTVbgwAuCYaI2FnmTZT0htzA=; b=MkASteH7qwrDALNNs98sLabgwlPYnaxyruCYu3oGbewP/h6OqQfl99DYliXHKGEzGwyx0X52XuMG+F5wbJ4KBRUdfor0I2hbR1bX1JAc7OofV6x7BcINWF024i+0G7Ea5CluMMgEnjeCH4D2+4vUJ5xmnXK6Oyd1Hk41mf1VXNg= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1563275260345852.6514553209784; Tue, 16 Jul 2019 04:07:40 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id C6B52307D960; Tue, 16 Jul 2019 11:07:37 +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 A47F75B681; Tue, 16 Jul 2019 11:07:37 +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 65C473FA9A; Tue, 16 Jul 2019 11:07:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6GB77Bk029294 for ; Tue, 16 Jul 2019 07:07:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5AF0B60920; Tue, 16 Jul 2019 11:07:07 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id DA385611DC for ; Tue, 16 Jul 2019 11:07:06 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 16 Jul 2019 13:06:55 +0200 Message-Id: <9f2d738c8522c54e1538441af547673077a05283.1563275164.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 7/9] qemu: introduce qemuDomainDeviceDefValidateFS 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Tue, 16 Jul 2019 11:07:38 +0000 (UTC) Move validation of the filesystem device out of qemu_command. Signed-off-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 25 ---------------------- src/qemu/qemu_domain.c | 46 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 26 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 8617b010dc..f938ec22d3 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2707,17 +2707,6 @@ qemuBuildFSStr(virDomainFSDefPtr fs) const char *driver =3D qemuDomainFSDriverTypeToString(fs->fsdriver); const char *wrpolicy =3D virDomainFSWrpolicyTypeToString(fs->wrpolicy); =20 - if (fs->type !=3D VIR_DOMAIN_FS_TYPE_MOUNT) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("only supports mount filesystem type")); - goto error; - } - - if (!driver) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("Filesystem driver type not supported")); - goto error; - } virBufferAdd(&opt, driver, -1); =20 if (fs->fsdriver =3D=3D VIR_DOMAIN_FS_DRIVER_TYPE_PATH || @@ -2729,14 +2718,6 @@ qemuBuildFSStr(virDomainFSDefPtr fs) } else if (fs->accessmode =3D=3D VIR_DOMAIN_FS_ACCESSMODE_SQUASH) { virBufferAddLit(&opt, ",security_model=3Dnone"); } - } else { - /* For other fs drivers, default(passthru) should always - * be supported */ - if (fs->accessmode !=3D VIR_DOMAIN_FS_ACCESSMODE_PASSTHROUGH) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("only supports passthrough accessmode")); - goto error; - } } =20 if (fs->wrpolicy) @@ -2767,12 +2748,6 @@ qemuBuildFSDevStr(const virDomainDef *def, { virBuffer opt =3D VIR_BUFFER_INITIALIZER; =20 - if (fs->type !=3D VIR_DOMAIN_FS_TYPE_MOUNT) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("can only passthrough directories")); - goto error; - } - if (qemuBuildVirtioDevStr(&opt, "virtio-9p", qemuCaps, VIR_DOMAIN_DEVICE_FS, fs) < 0) { goto error; diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 670b928c4c..bd7e8c2648 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -6274,6 +6274,47 @@ qemuDomainDeviceDefValidateIOMMU(const virDomainIOMM= UDef *iommu, } =20 =20 +static int +qemuDomainDeviceDefValidateFS(virDomainFSDefPtr fs, + const virDomainDef *def ATTRIBUTE_UNUSED, + virQEMUCapsPtr qemuCaps ATTRIBUTE_UNUSED) +{ + if (fs->type !=3D VIR_DOMAIN_FS_TYPE_MOUNT) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("only supports mount filesystem type")); + return -1; + } + + switch ((virDomainFSDriverType) fs->fsdriver) { + case VIR_DOMAIN_FS_DRIVER_TYPE_DEFAULT: + case VIR_DOMAIN_FS_DRIVER_TYPE_PATH: + break; + + case VIR_DOMAIN_FS_DRIVER_TYPE_HANDLE: + if (fs->accessmode !=3D VIR_DOMAIN_FS_ACCESSMODE_PASSTHROUGH) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("only supports passthrough accessmode")); + return -1; + } + break; + + case VIR_DOMAIN_FS_DRIVER_TYPE_LOOP: + case VIR_DOMAIN_FS_DRIVER_TYPE_NBD: + case VIR_DOMAIN_FS_DRIVER_TYPE_PLOOP: + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("Filesystem driver type not supported")); + return -1; + + case VIR_DOMAIN_FS_DRIVER_TYPE_LAST: + default: + virReportEnumRangeError(virDomainFSDriverType, fs->fsdriver); + return -1; + } + + return 0; +} + + static int qemuDomainDeviceDefValidateZPCIAddress(virDomainDeviceInfoPtr info, virQEMUCapsPtr qemuCaps) @@ -6429,8 +6470,11 @@ qemuDomainDeviceDefValidate(const virDomainDeviceDef= *dev, ret =3D qemuDomainDeviceDefValidateIOMMU(dev->data.iommu, def, qem= uCaps); break; =20 - case VIR_DOMAIN_DEVICE_LEASE: case VIR_DOMAIN_DEVICE_FS: + ret =3D qemuDomainDeviceDefValidateFS(dev->data.fs, def, qemuCaps); + break; + + case VIR_DOMAIN_DEVICE_LEASE: case VIR_DOMAIN_DEVICE_SOUND: case VIR_DOMAIN_DEVICE_HUB: case VIR_DOMAIN_DEVICE_NVRAM: --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 11:37:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1563275250; cv=none; d=zoho.com; s=zohoarc; b=JYraXOkG6987Xg83NbUXovQPSo8lgCpiA0bzvvIjNr36EBn/kgy56kIPn+gYuuMr7lsW3nCMF9rcnUCsKKneAaqraRcqBKSJHVuUNVUqMW+iZ/AkqK+GCoODYplB3Y36JUSrD+OPzYFB0qYm5X8n1BXhdYkx6vbBv5EkNGY74hI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563275250; 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:ARC-Authentication-Results; bh=MvegdRPpNDq0gYHX6oBTa8xWJ0PM/7TRFZENRlnEc1Y=; b=aOfDxm8vCQNjr2Fr3GPdzT6mvd5uUmOVE7lhY5wrc0wch1PmoXAQaFC4LxXfuQ2ww+deKl/ZxNtg7bmHIyfH4pfhdmEAVDzZp7ZcXi/xMGF2if6AEjBbNO/4d3+kKhDXl/WkWi6BTTZ3iy2EZOgDsaCvwhM1A2MgJpovDW5Hzww= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 156327525042339.10482076051949; Tue, 16 Jul 2019 04:07:30 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 7481D22389F; Tue, 16 Jul 2019 11:07:28 +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 F17075E7A5; Tue, 16 Jul 2019 11:07:27 +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 B00054EBC0; Tue, 16 Jul 2019 11:07:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6GB78Dj029301 for ; Tue, 16 Jul 2019 07:07:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id 290E14F; Tue, 16 Jul 2019 11:07:08 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id A769560920 for ; Tue, 16 Jul 2019 11:07:07 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 16 Jul 2019 13:06:56 +0200 Message-Id: <0e63776c7c9259c58a86d105cae316a88988df4a.1563275164.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 8/9] qemu: command: use VIR_AUTOCLEAN in qemuBuildFS* 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 16 Jul 2019 11:07:28 +0000 (UTC) Signed-off-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index f938ec22d3..803f7ece19 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2703,7 +2703,7 @@ qemuBuildDisksCommandLine(virCommandPtr cmd, static char * qemuBuildFSStr(virDomainFSDefPtr fs) { - virBuffer opt =3D VIR_BUFFER_INITIALIZER; + VIR_AUTOCLEAN(virBuffer) opt =3D VIR_BUFFER_INITIALIZER; const char *driver =3D qemuDomainFSDriverTypeToString(fs->fsdriver); const char *wrpolicy =3D virDomainFSWrpolicyTypeToString(fs->wrpolicy); =20 @@ -2731,13 +2731,9 @@ qemuBuildFSStr(virDomainFSDefPtr fs) virBufferAddLit(&opt, ",readonly"); =20 if (virBufferCheckError(&opt) < 0) - goto error; + return NULL; =20 return virBufferContentAndReset(&opt); - - error: - virBufferFreeAndReset(&opt); - return NULL; } =20 =20 @@ -2746,12 +2742,11 @@ qemuBuildFSDevStr(const virDomainDef *def, virDomainFSDefPtr fs, virQEMUCapsPtr qemuCaps) { - virBuffer opt =3D VIR_BUFFER_INITIALIZER; + VIR_AUTOCLEAN(virBuffer) opt =3D VIR_BUFFER_INITIALIZER; =20 if (qemuBuildVirtioDevStr(&opt, "virtio-9p", qemuCaps, - VIR_DOMAIN_DEVICE_FS, fs) < 0) { - goto error; - } + VIR_DOMAIN_DEVICE_FS, fs) < 0) + return NULL; =20 virBufferAsprintf(&opt, ",id=3D%s", fs->info.alias); virBufferAsprintf(&opt, ",fsdev=3D%s%s", @@ -2760,19 +2755,15 @@ qemuBuildFSDevStr(const virDomainDef *def, virQEMUBuildBufferEscapeComma(&opt, fs->dst); =20 if (qemuBuildVirtioOptionsStr(&opt, fs->virtio, qemuCaps) < 0) - goto error; + return NULL; =20 if (qemuBuildDeviceAddressStr(&opt, def, &fs->info, qemuCaps) < 0) - goto error; + return NULL; =20 if (virBufferCheckError(&opt) < 0) - goto error; + return NULL; =20 return virBufferContentAndReset(&opt); - - error: - virBufferFreeAndReset(&opt); - return NULL; } =20 =20 --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 11:37:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1563275267; cv=none; d=zoho.com; s=zohoarc; b=kXstH4ZddyRpOk7sJJxuwnzrurGDuUR01dDkkWCToeUIOugSkWh9E0aEA+T4n12RqG0BEWzXnlaks+2iOmmi9M+fzfT601e3C4e/ZV6t56NVxyLdhX+FFBLZem9HIcOpJZV1YbJJWS1IX5Ua7Xyr0XigVbvVUrHulBAnwWY90R0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563275267; 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:ARC-Authentication-Results; bh=N++lq6/+1S6kNKA+NWLfTRs4ps8G+a8TrHKzGLNRU04=; b=jbAFC8RYJc9a4LYVmdDBEaWtXE6vp03depl1A6kX4BYshbGKPWMqdZe05uElySwWikpCUowFd+J/Ip6Awp17+GPvoc5LhDXtuNjDn7Et5YFvkpA79vPhg0+KFnl0hXHtKNxQTNvjxmk7LG16NmMgcVuYVPCcUagDdcRleoUI6XI= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1563275267785162.52073680138335; Tue, 16 Jul 2019 04:07:47 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 0670485376; Tue, 16 Jul 2019 11:07:46 +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 D79005E7A8; Tue, 16 Jul 2019 11:07: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 9E539264CA; Tue, 16 Jul 2019 11:07:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6GB78FC029306 for ; Tue, 16 Jul 2019 07:07:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id EBB504F; Tue, 16 Jul 2019 11:07:08 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 757C160920 for ; Tue, 16 Jul 2019 11:07:08 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 16 Jul 2019 13:06:57 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 9/9] qemu: command: remove qemuDomainFSDriver 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 16 Jul 2019 11:07:46 +0000 (UTC) Having a translation enum full of empty strings seems excessive. Now that the validiation is performed in qemuDomainDeviceDefValidateFS, remove it completely and open-code the two allowed cases. Signed-off-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 803f7ece19..a0246bbe32 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -179,17 +179,6 @@ VIR_ENUM_IMPL(qemuControllerModelUSB, "none", ); =20 -VIR_ENUM_DECL(qemuDomainFSDriver); -VIR_ENUM_IMPL(qemuDomainFSDriver, - VIR_DOMAIN_FS_DRIVER_TYPE_LAST, - "local", - "local", - "handle", - NULL, - NULL, - NULL, -); - VIR_ENUM_DECL(qemuNumaPolicy); VIR_ENUM_IMPL(qemuNumaPolicy, VIR_DOMAIN_NUMATUNE_MEM_LAST, @@ -2704,13 +2693,11 @@ static char * qemuBuildFSStr(virDomainFSDefPtr fs) { VIR_AUTOCLEAN(virBuffer) opt =3D VIR_BUFFER_INITIALIZER; - const char *driver =3D qemuDomainFSDriverTypeToString(fs->fsdriver); const char *wrpolicy =3D virDomainFSWrpolicyTypeToString(fs->wrpolicy); =20 - virBufferAdd(&opt, driver, -1); - if (fs->fsdriver =3D=3D VIR_DOMAIN_FS_DRIVER_TYPE_PATH || fs->fsdriver =3D=3D VIR_DOMAIN_FS_DRIVER_TYPE_DEFAULT) { + virBufferAddLit(&opt, "local"); if (fs->accessmode =3D=3D VIR_DOMAIN_FS_ACCESSMODE_MAPPED) { virBufferAddLit(&opt, ",security_model=3Dmapped"); } else if (fs->accessmode =3D=3D VIR_DOMAIN_FS_ACCESSMODE_PASSTHRO= UGH) { @@ -2718,6 +2705,9 @@ qemuBuildFSStr(virDomainFSDefPtr fs) } else if (fs->accessmode =3D=3D VIR_DOMAIN_FS_ACCESSMODE_SQUASH) { virBufferAddLit(&opt, ",security_model=3Dnone"); } + } 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"); } =20 if (fs->wrpolicy) --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list