From nobody Wed May 8 15:24:13 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1616185541; cv=none; d=zohomail.com; s=zohoarc; b=hoYKfcEjEBaUq/m/QmjzuMYw3uwuWVbpaz2XeicWttYjq1JllVlXTspAt37CAGTppxp0Yf4S4N4r+3xoDPKBY0g3t5R2I22gVDCJeE/CujKknsl32mt6EJIgdkB22UaRXJ2sYVZYTiJeI5aftrNSGEaWsk+RCSJAqzJwHYAxiZ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616185541; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=KBWM/pzw4ILTrurnR1mB9hDari5t9RchYkjmoSHzVl8=; b=QdMwNY1O7Gy+ZqcNx7jVELPBnYCLumgxwMwj/95hBIVDLo/tOiLxS900opOLuxgHZC4Hyd/eqACH7GsBLx6Mk8FrnnN1U4axUlS2rZbmXm4MLo9n+4TrHhX/ODHV40kaxypCA4tHRAYL99Oz8+OSjlg70V3CdQTQJwc+HLsjGrc= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616185541823994.847398054291; Fri, 19 Mar 2021 13:25:41 -0700 (PDT) Received: from localhost ([::1]:44176 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNLgi-0006Ev-3f for importer@patchew.org; Fri, 19 Mar 2021 16:25:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNLew-0004Yk-KA; Fri, 19 Mar 2021 16:23:50 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:54695) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNLes-0001Mu-J0; Fri, 19 Mar 2021 16:23:50 -0400 Received: from localhost.localdomain ([82.142.20.38]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MXXhv-1lBdwK41yJ-00Z0L2; Fri, 19 Mar 2021 21:23:40 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PATCH v3 1/6] qdev: define list of archs with virtio-pci or virtio-ccw Date: Fri, 19 Mar 2021 21:23:30 +0100 Message-Id: <20210319202335.2397060-2-laurent@vivier.eu> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210319202335.2397060-1-laurent@vivier.eu> References: <20210319202335.2397060-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:76yBD/AL0SG3dAQw1RSeXD2OjcJw4elfo+pyNdPRwsQ7f49DExy ZpiDSj0vUNJGQL4QOCzbMVZN52EvYloDFwyz5ZIuIkFJpGuGTxSSAlwVWmqslj5Y8cRUrZz xtVBXppXh7PXUPbyAwgV9zhZptZP0GGMqSijsjkStIMdBlyKXsflhgRP1u6U2WW73jFWJWp 94HT1orfFgxAzJvK6Ph/w== X-UI-Out-Filterresults: notjunk:1;V03:K0:mEpDGrKjz9A=:HNr4K+XM12nFix55VeWwRP pYTpVKNKqMblw50wXckSYdTRQ13S9oQ8++yhuEgNeypR9rf3vXCE8kPThlLRCMx4AfghVvKZN MSM2WuuLAF0US1AO1ocmToV63ijZLDsIEHl7jzhm+PSRR6xbBQDvuPWFmFtnWTKAGf9me5j/L GpeJtRlc7K9wTXsqWX49vgLcqG7cGG5EEEhEpfNuqh/EHKjpafi4p5nvuWm59bZgDUrGV0ID0 Z4iy4mf4dzgkItp//tcKy0Ui0d0IOJS/KIU8PdB+DBL0ZRvKdc+GrVtoew7jN3OHPMCxtSsBR JjfZJ3vm2XJIMgarKymDyzbwjkfHhlIdQxzRbiXoD1v1v6vBB4XCGf1FZY3Ge5GM7QeK3Iijb HwxHg+Ya1dLaLun3jtCllfg1WKJ3cFfvHJ8/ORwSvbsIGAg3v/4NutDKoEEKoX0ZYeaDjUtnJ m3wCg4ppmg== Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=212.227.126.130; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , Thomas Huth , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, Cornelia Huck , Markus Armbruster , Max Reitz , qemu-s390x@nongnu.org, Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" This is used to define virtio-*-pci and virtio-*-ccw aliases rather than substracting the CCW architecture from all the others. Reviewed-by: Cornelia Huck Signed-off-by: Laurent Vivier --- include/sysemu/arch_init.h | 8 ++++++ softmmu/qdev-monitor.c | 53 ++++++++++++++++++-------------------- 2 files changed, 33 insertions(+), 28 deletions(-) diff --git a/include/sysemu/arch_init.h b/include/sysemu/arch_init.h index 54f069d49126..0c9070651664 100644 --- a/include/sysemu/arch_init.h +++ b/include/sysemu/arch_init.h @@ -35,4 +35,12 @@ extern const uint32_t arch_type; int kvm_available(void); int xen_available(void); =20 +/* default virtio transport per architecture */ +#define QEMU_ARCH_VIRTIO_PCI (QEMU_ARCH_ALPHA | QEMU_ARCH_ARM | \ + QEMU_ARCH_HPPA | QEMU_ARCH_I386 | \ + QEMU_ARCH_MIPS | QEMU_ARCH_PPC | \ + QEMU_ARCH_RISCV | QEMU_ARCH_SH4 | \ + QEMU_ARCH_SPARC | QEMU_ARCH_XTENSA) +#define QEMU_ARCH_VIRTIO_CCW (QEMU_ARCH_S390X) + #endif diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c index 8dc656becca9..0b40c97c6e50 100644 --- a/softmmu/qdev-monitor.c +++ b/softmmu/qdev-monitor.c @@ -60,34 +60,31 @@ static const QDevAlias qdev_alias_table[] =3D { { "ES1370", "es1370" }, /* -soundhw name */ { "ich9-ahci", "ahci" }, { "lsi53c895a", "lsi" }, - { "virtio-9p-ccw", "virtio-9p", QEMU_ARCH_S390X }, - { "virtio-9p-pci", "virtio-9p", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X }, - { "virtio-balloon-ccw", "virtio-balloon", QEMU_ARCH_S390X }, - { "virtio-balloon-pci", "virtio-balloon", - QEMU_ARCH_ALL & ~QEMU_ARCH_S390X }, - { "virtio-blk-ccw", "virtio-blk", QEMU_ARCH_S390X }, - { "virtio-blk-pci", "virtio-blk", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X }, - { "virtio-gpu-ccw", "virtio-gpu", QEMU_ARCH_S390X }, - { "virtio-gpu-pci", "virtio-gpu", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X }, - { "virtio-input-host-ccw", "virtio-input-host", QEMU_ARCH_S390X }, - { "virtio-input-host-pci", "virtio-input-host", - QEMU_ARCH_ALL & ~QEMU_ARCH_S390X }, - { "virtio-iommu-pci", "virtio-iommu", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X= }, - { "virtio-keyboard-ccw", "virtio-keyboard", QEMU_ARCH_S390X }, - { "virtio-keyboard-pci", "virtio-keyboard", - QEMU_ARCH_ALL & ~QEMU_ARCH_S390X }, - { "virtio-mouse-ccw", "virtio-mouse", QEMU_ARCH_S390X }, - { "virtio-mouse-pci", "virtio-mouse", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X= }, - { "virtio-net-ccw", "virtio-net", QEMU_ARCH_S390X }, - { "virtio-net-pci", "virtio-net", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X }, - { "virtio-rng-ccw", "virtio-rng", QEMU_ARCH_S390X }, - { "virtio-rng-pci", "virtio-rng", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X }, - { "virtio-scsi-ccw", "virtio-scsi", QEMU_ARCH_S390X }, - { "virtio-scsi-pci", "virtio-scsi", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X }, - { "virtio-serial-ccw", "virtio-serial", QEMU_ARCH_S390X }, - { "virtio-serial-pci", "virtio-serial", QEMU_ARCH_ALL & ~QEMU_ARCH_S39= 0X }, - { "virtio-tablet-ccw", "virtio-tablet", QEMU_ARCH_S390X }, - { "virtio-tablet-pci", "virtio-tablet", QEMU_ARCH_ALL & ~QEMU_ARCH_S39= 0X }, + { "virtio-9p-ccw", "virtio-9p", QEMU_ARCH_VIRTIO_CCW }, + { "virtio-9p-pci", "virtio-9p", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-balloon-ccw", "virtio-balloon", QEMU_ARCH_VIRTIO_CCW }, + { "virtio-balloon-pci", "virtio-balloon", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-blk-ccw", "virtio-blk", QEMU_ARCH_VIRTIO_CCW }, + { "virtio-blk-pci", "virtio-blk", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-gpu-ccw", "virtio-gpu", QEMU_ARCH_VIRTIO_CCW }, + { "virtio-gpu-pci", "virtio-gpu", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-input-host-ccw", "virtio-input-host", QEMU_ARCH_VIRTIO_CCW }, + { "virtio-input-host-pci", "virtio-input-host", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-iommu-pci", "virtio-iommu", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-keyboard-ccw", "virtio-keyboard", QEMU_ARCH_VIRTIO_CCW }, + { "virtio-keyboard-pci", "virtio-keyboard", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-mouse-ccw", "virtio-mouse", QEMU_ARCH_VIRTIO_CCW }, + { "virtio-mouse-pci", "virtio-mouse", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-net-ccw", "virtio-net", QEMU_ARCH_VIRTIO_CCW }, + { "virtio-net-pci", "virtio-net", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-rng-ccw", "virtio-rng", QEMU_ARCH_VIRTIO_CCW }, + { "virtio-rng-pci", "virtio-rng", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-scsi-ccw", "virtio-scsi", QEMU_ARCH_VIRTIO_CCW }, + { "virtio-scsi-pci", "virtio-scsi", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-serial-ccw", "virtio-serial", QEMU_ARCH_VIRTIO_CCW }, + { "virtio-serial-pci", "virtio-serial", QEMU_ARCH_VIRTIO_PCI}, + { "virtio-tablet-ccw", "virtio-tablet", QEMU_ARCH_VIRTIO_CCW }, + { "virtio-tablet-pci", "virtio-tablet", QEMU_ARCH_VIRTIO_PCI }, { } }; =20 --=20 2.30.2 From nobody Wed May 8 15:24:13 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1616185590; cv=none; d=zohomail.com; s=zohoarc; b=Vm2ofGQ/8uKSu8kcb88QRL9xw0nboWeuh4dhDG9qQGetYMtoF5cvBB2J+fv7mzj6Mpn4w31+KdrBOtGYeN0macSdCv6fVLECU7PXN/xeJ/aO3ZVMsPQyOFF/WrtIrU0wLbWS3jtqJqzgnCK4skUCat3915Z3gALA1Nfm4V3clLU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616185590; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ZcyIcDVW3nzVN1UmJMYy2ST7ZKu7HhjKowH3Jo3vmMg=; b=BXGmHoQ76jr0TX2ZAJLRy2Qsan1Ji+9th/470mK/DVRevr3EidlwyMaB4MUw3EUYj42PvEMygyKe89PipuG4QVgrdOcYzV5znAyA+/Xkw8o4ofCc5SKYNm4aXiGqMSu0mwca8/zw7iXlLX24maGPE8Xa+0hx0n8ZB8Cl/TmJso8= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 161618559005853.39312963080533; Fri, 19 Mar 2021 13:26:30 -0700 (PDT) Received: from localhost ([::1]:46090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNLhM-00075v-8c for importer@patchew.org; Fri, 19 Mar 2021 16:26:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNLf7-0004v6-5S; Fri, 19 Mar 2021 16:24:01 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:59285) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNLf2-0001SH-Kl; Fri, 19 Mar 2021 16:24:00 -0400 Received: from localhost.localdomain ([82.142.20.38]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MjjSt-1m7zHi0VoJ-00lBbg; Fri, 19 Mar 2021 21:23:41 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PATCH v3 2/6] m68k: add the virtio devices aliases Date: Fri, 19 Mar 2021 21:23:31 +0100 Message-Id: <20210319202335.2397060-3-laurent@vivier.eu> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210319202335.2397060-1-laurent@vivier.eu> References: <20210319202335.2397060-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:E95/utwZKt79kFVUK3iWKU/InUEmj3zwqWv/HPdZcM91TBv+lSS /jL8GMxOnuLG+G9tq7ZTxRBJUv3KPgj9YRCVaMcsP4HSCz8IcKevYf3m68CfDSDM0IzJvCK t95tMBwok2gg8NspotMNkDJv8spNaJ8aOnX7/OPvanO02zSaG5QEG4LN5rYVoV5eWz3WyBV feccnezAVd8yoxTUhM2KQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:OTjdt/FpSX8=:86UmfJZMNiCdEyEhLZkc21 RFW2J9CjLrwAJXybTnoVyHoSzp7UemtXkv7rXdsTnFo3KyRICOb8LQUjD2RU9IJ4lIS1tHLYB aOp0hZwJX1Ndyf1BRaST8U1EkcLyRZNiMNJ9Bl1RExoKijU7Gy9XJVg1bfxh+WmqQ0PYkinTA nJDQP4DhnIj8bjmBV727/AtqfD9UuzcHk/XiwGNhHcMT16o7ocH25pA8GVm0Oa67A2z+OwuDE MyeBjRLuMeIw5NIfwULPDhK6Gr5R7WSPBvhkEX7gqmiqKPZxzOtPbH1nQaHhzb+e8UnlLUhBw /5NMXY1fN+SMg+eQU4yWaDUi7IyoYSsz+2mNRdJ+rLASDt+M36dhQ1Zm9D3FFu0vqel51Owtk OFpZKhgtHZhw+L+J35bNbLxYfPFdNXz1G1MoTYVxzP09agFAU8/V0p8KOHCCRF53YvZoE8yBb Gg4lL/q72w== Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=212.227.126.187; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , Thomas Huth , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cornelia Huck , Markus Armbruster , Max Reitz , qemu-s390x@nongnu.org, Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Similarly to 5f629d943cb0 ("s390x: fix s390 virtio aliases"), define the virtio aliases. This allows to start machines with virtio devices without knowledge of the implementation type. For instance, we can use "-device virtio-scsi" on m68k, s390x or PC, and the device will be respectively "virtio-scsi-device", "virtio-scsi-ccw" or "virtio-scsi-pci". This already exists for s390x and -ccw interfaces, add them for m68k and MMIO (-device) interfaces. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Cornelia Huck Signed-off-by: Laurent Vivier --- include/sysemu/arch_init.h | 1 + softmmu/qdev-monitor.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/include/sysemu/arch_init.h b/include/sysemu/arch_init.h index 0c9070651664..16da27969627 100644 --- a/include/sysemu/arch_init.h +++ b/include/sysemu/arch_init.h @@ -42,5 +42,6 @@ int xen_available(void); QEMU_ARCH_RISCV | QEMU_ARCH_SH4 | \ QEMU_ARCH_SPARC | QEMU_ARCH_XTENSA) #define QEMU_ARCH_VIRTIO_CCW (QEMU_ARCH_S390X) +#define QEMU_ARCH_VIRTIO_MMIO (QEMU_ARCH_M68K) =20 #endif diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c index 0b40c97c6e50..a9955b97a078 100644 --- a/softmmu/qdev-monitor.c +++ b/softmmu/qdev-monitor.c @@ -60,29 +60,41 @@ static const QDevAlias qdev_alias_table[] =3D { { "ES1370", "es1370" }, /* -soundhw name */ { "ich9-ahci", "ahci" }, { "lsi53c895a", "lsi" }, + { "virtio-9p-device", "virtio-9p", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-9p-ccw", "virtio-9p", QEMU_ARCH_VIRTIO_CCW }, { "virtio-9p-pci", "virtio-9p", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-balloon-device", "virtio-balloon", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-balloon-ccw", "virtio-balloon", QEMU_ARCH_VIRTIO_CCW }, { "virtio-balloon-pci", "virtio-balloon", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-blk-device", "virtio-blk", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-blk-ccw", "virtio-blk", QEMU_ARCH_VIRTIO_CCW }, { "virtio-blk-pci", "virtio-blk", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-gpu-device", "virtio-gpu", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-gpu-ccw", "virtio-gpu", QEMU_ARCH_VIRTIO_CCW }, { "virtio-gpu-pci", "virtio-gpu", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-input-host-device", "virtio-input-host", QEMU_ARCH_VIRTIO_MM= IO }, { "virtio-input-host-ccw", "virtio-input-host", QEMU_ARCH_VIRTIO_CCW }, { "virtio-input-host-pci", "virtio-input-host", QEMU_ARCH_VIRTIO_PCI }, { "virtio-iommu-pci", "virtio-iommu", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-keyboard-device", "virtio-keyboard", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-keyboard-ccw", "virtio-keyboard", QEMU_ARCH_VIRTIO_CCW }, { "virtio-keyboard-pci", "virtio-keyboard", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-mouse-device", "virtio-mouse", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-mouse-ccw", "virtio-mouse", QEMU_ARCH_VIRTIO_CCW }, { "virtio-mouse-pci", "virtio-mouse", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-net-device", "virtio-net", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-net-ccw", "virtio-net", QEMU_ARCH_VIRTIO_CCW }, { "virtio-net-pci", "virtio-net", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-rng-device", "virtio-rng", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-rng-ccw", "virtio-rng", QEMU_ARCH_VIRTIO_CCW }, { "virtio-rng-pci", "virtio-rng", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-scsi-device", "virtio-scsi", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-scsi-ccw", "virtio-scsi", QEMU_ARCH_VIRTIO_CCW }, { "virtio-scsi-pci", "virtio-scsi", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-serial-device", "virtio-serial", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-serial-ccw", "virtio-serial", QEMU_ARCH_VIRTIO_CCW }, { "virtio-serial-pci", "virtio-serial", QEMU_ARCH_VIRTIO_PCI}, + { "virtio-tablet-device", "virtio-tablet", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-tablet-ccw", "virtio-tablet", QEMU_ARCH_VIRTIO_CCW }, { "virtio-tablet-pci", "virtio-tablet", QEMU_ARCH_VIRTIO_PCI }, { } --=20 2.30.2 From nobody Wed May 8 15:24:13 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1616185726; cv=none; d=zohomail.com; s=zohoarc; b=HKv+rUCmgEAyNU4v318KTENvDqWWGu9u/ICXf4vJQXxtrFWgkNyazDYXX8DMGQU4BoCdgv9+faxRcUpUJzm/T+JpYKJEIqSDVk+0Plm3ra2qiYEesJbJRrJk4kkT0FQXtjm8z1rty6o5vQxLcryJ3NsPywoIiXgHnG7Y07DDoSc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616185726; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7kTEnJqYtrDSIARGFGyjHosSMU0ZgbqXGAEpV3CtTpQ=; b=BIQNqxVV2+5PG+iBiBhcT3LAD2vAmhQfC9+Dd+AJbRGorqO60SP64akqp66AhSaFsWyNMP6WDL1l/kFDpZ5kmIVXIDz8EH3FJMaGWfaHD5FmdwnrxQlHPmkiWFMbCd54Di9lQZjAiFM3W4E/1cSo/BIphzvpuqg9dG3T79gO4+o= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616185726634332.0431914432784; Fri, 19 Mar 2021 13:28:46 -0700 (PDT) Received: from localhost ([::1]:54970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNLjd-0002Nb-4K for importer@patchew.org; Fri, 19 Mar 2021 16:28:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47746) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNLf8-0004yE-If; Fri, 19 Mar 2021 16:24:02 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:53075) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNLew-0001P0-DC; Fri, 19 Mar 2021 16:24:02 -0400 Received: from localhost.localdomain ([82.142.20.38]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MTzrW-1lFChw0gNe-00R27x; Fri, 19 Mar 2021 21:23:42 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PATCH v3 3/6] blockdev: with -drive if=virtio, use generic virtio-blk Date: Fri, 19 Mar 2021 21:23:32 +0100 Message-Id: <20210319202335.2397060-4-laurent@vivier.eu> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210319202335.2397060-1-laurent@vivier.eu> References: <20210319202335.2397060-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:Gc7NCjRrRa6oWoAW/nGwf8xXfOoQ0ApvqYEedBxhtkfqS7Ez+c9 mluwsdF8+K0PmxtJIZUa5ODXloVVpcxh5wyiZYJ+SJeliiW86ws6xgqaSWhZGPD4ALruVZh qvRx93eH9gEVRwpWgjHzX683aNDQOspS9pD8iQJXkmc1d5pMxOnsIK0TfYSlbtI4WAtgKee a/GXIsEU9eCd5NtBhpnIA== X-UI-Out-Filterresults: notjunk:1;V03:K0:C2fVXyWp98Q=:F6y7gkWYgNb0MukgqMbbge kRWUGlPRlpu1CrkT4f3XqK0T+LfeuP9o8RfPrTSr0TgO1cSTjwXXohfQnOcNXqaFHsZksjJMw yiq3oeX3/htn9rg4jqNJg8KY+1y7pxGTx4uPAgoem6WKUACERDumD9GLL38fl4yIVY5C2r8tT NH0hzW1yuPhfQCyU8HbMB7Dnw/7Ta7y9a/ETYMeURRJHsHMJQytin9PdHPfF3OVcEpWHVZ3z2 BJOQaD02Bfp5oRc2+BEBH5wwZekkTbHcHkCxgajlFQl1+v3kXYdzU8wy0dj3IGQ1ecqtwgM4Q a5n0PMktNp00ORtYJ46o+uljkk0XY1IjPxOYZr1ELzYS7A9UMSYthOczT/hFETREr7bCyG+Pb OPQaBb2GAWxtOOTJVy7WzsJB0MH3ZSJndRaGQ/adnS7qQYkWDrjssTGVx69gj1rQpd2if9VRM Gz4ZodReZA== Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=212.227.126.131; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , Thomas Huth , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, Cornelia Huck , Markus Armbruster , Max Reitz , qemu-s390x@nongnu.org, Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Rather than checking if the machine is an s390x to use virtio-blk-ccw instead of virtio-blk-pci, use the alias virtio-blk that is set to the expected target. This also enables the use of virtio-blk-device for targets without PCI or CCW. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Laurent Vivier Acked-by: Markus Armbruster --- blockdev.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/blockdev.c b/blockdev.c index 5cc7c7effe9f..64da5350e3ad 100644 --- a/blockdev.c +++ b/blockdev.c @@ -969,11 +969,7 @@ DriveInfo *drive_new(QemuOpts *all_opts, BlockInterfac= eType block_default_type, QemuOpts *devopts; devopts =3D qemu_opts_create(qemu_find_opts("device"), NULL, 0, &error_abort); - if (arch_type =3D=3D QEMU_ARCH_S390X) { - qemu_opt_set(devopts, "driver", "virtio-blk-ccw", &error_abort= ); - } else { - qemu_opt_set(devopts, "driver", "virtio-blk-pci", &error_abort= ); - } + qemu_opt_set(devopts, "driver", "virtio-blk", &error_abort); qemu_opt_set(devopts, "drive", qdict_get_str(bs_opts, "id"), &error_abort); } --=20 2.30.2 From nobody Wed May 8 15:24:13 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1616185588; cv=none; d=zohomail.com; s=zohoarc; b=Fb/MraBBPghl3XUp/1ONImSp/0MW3HLf9poI1U2SqxypDDj7nd10STNXxmRxv5Uh7A+lm98BajGLLFSxIDiZeu68XI2UB0P9U7NHBzttpd2JcZRFanLUIGJ3hnn/rNrlrgUeyoXnTdfEISIIw4bTNckP35Ik17L2BRLNuSmMse4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616185588; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=xjmPO1aEJA4sWDm4aub+8xRDmTF19oZMxT82+2+obRw=; b=YJYKtSpbHvkDtqOnbPo5tguPbiqtZ7mGkKXMxFLZbfh0mLbrQs8ZjcotNlM9PAPbgo1V+rDG9GIujd5OcaMq3Qfq7ZDoJscnbywtANz1knNmzXWzR5QvvSMyNCqwKLyCQURfUJtpn/ikVvVnf9L03XBpTsOW81z114CISmIMSPw= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616185588360704.4972393338521; Fri, 19 Mar 2021 13:26:28 -0700 (PDT) Received: from localhost ([::1]:45848 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNLhK-0006zd-KA for importer@patchew.org; Fri, 19 Mar 2021 16:26:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47696) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNLf2-0004kh-LF; Fri, 19 Mar 2021 16:23:56 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:44535) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNLew-0001Oz-EL; Fri, 19 Mar 2021 16:23:56 -0400 Received: from localhost.localdomain ([82.142.20.38]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Mg6JS-1ltwv31A22-00hdEv; Fri, 19 Mar 2021 21:23:43 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PATCH v3 4/6] iotests: Revert "iotests: use -ccw on s390x for 040, 139, and 182" Date: Fri, 19 Mar 2021 21:23:33 +0100 Message-Id: <20210319202335.2397060-5-laurent@vivier.eu> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210319202335.2397060-1-laurent@vivier.eu> References: <20210319202335.2397060-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:400ggtY+W2RpYRy3KuR0ygmqcUYzEOa/WfHfXlXh5kPhrKkxLXS 0YjeULpmJh45YeeDb/Ck1d6t1ayfOeHKxWa+ev9fYiwSIWlF94XMipUZoQ3VBUnPpyQej+6 KjF64w7WPipHGAWGxgJ+trKd1knrUZb2nERT9mdq2D/dCJuN7ryhsSVbt55XroXaNVSSp+n 7fQtkmy2LPjgO/r9TbTtg== X-UI-Out-Filterresults: notjunk:1;V03:K0:0ezXk6CqcMI=:pNcB8Bj7uGzSoudYKhvXzU QkQEXXJUX0PsMgQ5mx8UTFavIeNA6SK+xcNe2fLlOiBRjO55vpWWFMFIhiJlIhFJh2o0NUntL 5gDIyXK7mUlfv39A+oc+j8O14US3Atna+3Ry8ZpKuHOTjE427eSIIjfdfotrdwknzJ8G1x1Xt ileFXScVFLxukJb91cctQwk+XGP2Pdz9rq1d/dd4WPjQyf5WoXG8JG3tEsEnUuWPc51phg4LV T/qqgXSqlCIExfwcIcjIeOT8kvGjpJYkjvK60SLZ6xYcXm9QdSa6hS4hwGH1nYnaPGSDVnBk4 ehRuolxwnqdxi4uTyh0bZni2iPyQJJaimyTvBvjPlNC0TI2vdkBx0eQkWHugzErbdec5sz+MX 2aQByfR1ka8PxBc3Sj1rcGCgJitlckBUhS4SSOtVPFoCwU1aKQOW3lzxZWFnmUfeTeBvgiXPZ VQPCAykF/A== Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=212.227.126.134; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , Thomas Huth , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, Cornelia Huck , Markus Armbruster , Max Reitz , qemu-s390x@nongnu.org, Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Commit f1d5516ab583 introduces a test in some iotests to check if the machine is a s390-ccw-virtio and to select virtio-*-ccw rather than virtio-*-pci. We don't need that because QEMU already provides aliases to use the correct virtio interface according to the machine type. This patch removes all virtio-*-pci and virtio-*-ccw to use virtio-* instead and remove get_virtio_scsi_device(). This also enables virtio-mmio devices (virtio-*-device) Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Cornelia Huck Signed-off-by: Laurent Vivier --- tests/qemu-iotests/040 | 2 +- tests/qemu-iotests/051 | 12 +----------- tests/qemu-iotests/051.out | 2 +- tests/qemu-iotests/051.pc.out | 2 +- tests/qemu-iotests/068 | 4 +--- tests/qemu-iotests/093 | 3 +-- tests/qemu-iotests/139 | 9 ++------- tests/qemu-iotests/182 | 13 ++----------- tests/qemu-iotests/238 | 4 +--- tests/qemu-iotests/240 | 10 +++++----- tests/qemu-iotests/257 | 4 ++-- tests/qemu-iotests/307 | 4 +--- tests/qemu-iotests/iotests.py | 5 ----- 13 files changed, 19 insertions(+), 55 deletions(-) diff --git a/tests/qemu-iotests/040 b/tests/qemu-iotests/040 index 336ff7c4f2ab..ba7cb34ce8cf 100755 --- a/tests/qemu-iotests/040 +++ b/tests/qemu-iotests/040 @@ -89,7 +89,7 @@ class TestSingleDrive(ImageCommitTestCase): qemu_io('-f', 'raw', '-c', 'write -P 0xab 0 524288', backing_img) qemu_io('-f', iotests.imgfmt, '-c', 'write -P 0xef 524288 524288',= mid_img) self.vm =3D iotests.VM().add_drive(test_img, "node-name=3Dtop,back= ing.node-name=3Dmid,backing.backing.node-name=3Dbase", interface=3D"none") - self.vm.add_device(iotests.get_virtio_scsi_device()) + self.vm.add_device('virtio-scsi') self.vm.add_device("scsi-hd,id=3Dscsi0,drive=3Ddrive0") self.vm.launch() self.has_quit =3D False diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 index 7cbd1415ce7b..00382cc55e25 100755 --- a/tests/qemu-iotests/051 +++ b/tests/qemu-iotests/051 @@ -119,17 +119,7 @@ echo echo =3D=3D=3D Device without drive =3D=3D=3D echo =20 -case "$QEMU_DEFAULT_MACHINE" in - s390-ccw-virtio) - virtio_scsi=3Dvirtio-scsi-ccw - ;; - *) - virtio_scsi=3Dvirtio-scsi-pci - ;; -esac - -run_qemu -device $virtio_scsi -device scsi-hd | - sed -e "s/$virtio_scsi/VIRTIO_SCSI/" +run_qemu -device virtio-scsi -device scsi-hd =20 echo echo =3D=3D=3D Overriding backing file =3D=3D=3D diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out index de4771bcb36d..437053c8395c 100644 --- a/tests/qemu-iotests/051.out +++ b/tests/qemu-iotests/051.out @@ -72,7 +72,7 @@ QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,node-name=3Dfoo= #12: Invalid node name =20 =3D=3D=3D Device without drive =3D=3D=3D =20 -Testing: -device VIRTIO_SCSI -device scsi-hd +Testing: -device virtio-scsi -device scsi-hd QEMU X.Y.Z monitor - type 'help' for more information (qemu) QEMU_PROG: -device scsi-hd: drive property not set =20 diff --git a/tests/qemu-iotests/051.pc.out b/tests/qemu-iotests/051.pc.out index f570610f645f..c4e011369809 100644 --- a/tests/qemu-iotests/051.pc.out +++ b/tests/qemu-iotests/051.pc.out @@ -72,7 +72,7 @@ QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,node-name=3Dfoo= #12: Invalid node-name: 'fo =20 =3D=3D=3D Device without drive =3D=3D=3D =20 -Testing: -device VIRTIO_SCSI -device scsi-hd +Testing: -device virtio-scsi -device scsi-hd QEMU X.Y.Z monitor - type 'help' for more information (qemu) QEMU_PROG: -device scsi-hd: drive property not set =20 diff --git a/tests/qemu-iotests/068 b/tests/qemu-iotests/068 index 03e03508a6e2..54e49c8ffab1 100755 --- a/tests/qemu-iotests/068 +++ b/tests/qemu-iotests/068 @@ -49,11 +49,9 @@ IMG_SIZE=3D128K case "$QEMU_DEFAULT_MACHINE" in s390-ccw-virtio) platform_parm=3D"-no-shutdown" - hba=3Dvirtio-scsi-ccw ;; *) platform_parm=3D"" - hba=3Dvirtio-scsi-pci ;; esac =20 @@ -61,7 +59,7 @@ _qemu() { $QEMU $platform_parm -nographic -monitor stdio -serial none \ -drive if=3Dnone,id=3Ddrive0,file=3D"$TEST_IMG",format=3D"$IMGFM= T" \ - -device $hba,id=3Dhba0 \ + -device virtio-scsi,id=3Dhba0 \ -device scsi-hd,drive=3Ddrive0 \ "$@" |\ _filter_qemu | _filter_hmp diff --git a/tests/qemu-iotests/093 b/tests/qemu-iotests/093 index 7745cb04b611..93274dc8cbde 100755 --- a/tests/qemu-iotests/093 +++ b/tests/qemu-iotests/093 @@ -371,8 +371,7 @@ class ThrottleTestGroupNames(iotests.QMPTestCase): class ThrottleTestRemovableMedia(iotests.QMPTestCase): def setUp(self): self.vm =3D iotests.VM() - self.vm.add_device("{},id=3Dvirtio-scsi".format( - iotests.get_virtio_scsi_device())) + self.vm.add_device("{},id=3Dvirtio-scsi".format('virtio-scsi')) self.vm.launch() =20 def tearDown(self): diff --git a/tests/qemu-iotests/139 b/tests/qemu-iotests/139 index e79b3c21fdce..178b1ee230ca 100755 --- a/tests/qemu-iotests/139 +++ b/tests/qemu-iotests/139 @@ -26,18 +26,13 @@ import time =20 base_img =3D os.path.join(iotests.test_dir, 'base.img') new_img =3D os.path.join(iotests.test_dir, 'new.img') -if iotests.qemu_default_machine =3D=3D 's390-ccw-virtio': - default_virtio_blk =3D 'virtio-blk-ccw' -else: - default_virtio_blk =3D 'virtio-blk-pci' =20 class TestBlockdevDel(iotests.QMPTestCase): =20 def setUp(self): iotests.qemu_img('create', '-f', iotests.imgfmt, base_img, '1M') self.vm =3D iotests.VM() - self.vm.add_device("{},id=3Dvirtio-scsi".format( - iotests.get_virtio_scsi_device())) + self.vm.add_device("{},id=3Dvirtio-scsi".format('virtio-scsi')) self.vm.launch() =20 def tearDown(self): @@ -93,7 +88,7 @@ class TestBlockdevDel(iotests.QMPTestCase): self.checkBlockDriverState(node, expect_error) =20 # Add a device model - def addDeviceModel(self, device, backend, driver =3D default_virtio_bl= k): + def addDeviceModel(self, device, backend, driver =3D 'virtio-blk'): result =3D self.vm.qmp('device_add', id =3D device, driver =3D driver, drive =3D backend) self.assert_qmp(result, 'return', {}) diff --git a/tests/qemu-iotests/182 b/tests/qemu-iotests/182 index 55a0384c0873..fcd1d796ebd0 100755 --- a/tests/qemu-iotests/182 +++ b/tests/qemu-iotests/182 @@ -46,26 +46,17 @@ _supported_proto file =20 size=3D32M =20 -case "$QEMU_DEFAULT_MACHINE" in - s390-ccw-virtio) - virtioblk=3Dvirtio-blk-ccw - ;; - *) - virtioblk=3Dvirtio-blk-pci - ;; -esac - _make_test_img $size =20 echo "Starting QEMU" _launch_qemu -drive file=3D$TEST_IMG,if=3Dnone,id=3Ddrive0,file.locking=3D= on \ - -device $virtioblk,drive=3Ddrive0 + -device virtio-blk,drive=3Ddrive0 =20 echo echo "Starting a second QEMU using the same image should fail" echo 'quit' | $QEMU -nographic -monitor stdio \ -drive file=3D$TEST_IMG,if=3Dnone,id=3Ddrive0,file.locking=3Don \ - -device $virtioblk,drive=3Ddrive0 2>&1 | _filter_testdir 2>&1 | + -device virtio-blk,drive=3Ddrive0 2>&1 | _filter_testdir 2>&1 | _filter_qemu | sed -e '/falling back to POSIX file/d' \ -e '/locks can be lost unexpectedly/d' diff --git a/tests/qemu-iotests/238 b/tests/qemu-iotests/238 index 8a10af57f17c..38bd3744e68c 100755 --- a/tests/qemu-iotests/238 +++ b/tests/qemu-iotests/238 @@ -26,14 +26,12 @@ from iotests import log =20 iotests.script_initialize() =20 -virtio_scsi_device =3D iotests.get_virtio_scsi_device() - vm =3D iotests.VM() vm.launch() =20 log(vm.qmp('blockdev-add', node_name=3D'hd0', driver=3D'null-co', read_zer= oes=3DTrue)) log(vm.qmp('object-add', qom_type=3D'iothread', id=3D'iothread0')) -log(vm.qmp('device_add', id=3D'scsi0', driver=3Dvirtio_scsi_device, iothre= ad=3D'iothread0')) +log(vm.qmp('device_add', id=3D'scsi0', driver=3D'virtio-scsi', iothread=3D= 'iothread0')) log(vm.qmp('device_add', id=3D'scsi-hd0', driver=3D'scsi-hd', drive=3D'hd0= ')) log(vm.qmp('block_set_io_throttle', id=3D'scsi-hd0', bps=3D0, bps_rd=3D0, = bps_wr=3D0, iops=3D1000, iops_rd=3D0, iops_wr=3D0, conv_keys=3DFalse)) diff --git a/tests/qemu-iotests/240 b/tests/qemu-iotests/240 index ab077f4ceb01..9b281e1dc036 100755 --- a/tests/qemu-iotests/240 +++ b/tests/qemu-iotests/240 @@ -42,7 +42,7 @@ class TestCase(iotests.QMPTestCase): iotests.log('=3D=3DUnplug a SCSI disk and then plug it again=3D=3D= ') self.vm.qmp_log('blockdev-add', driver=3D'null-co', read_zeroes=3D= True, node_name=3D'hd0') self.vm.qmp_log('object-add', qom_type=3D'iothread', id=3D"iothrea= d0") - self.vm.qmp_log('device_add', id=3D'scsi0', driver=3Diotests.get_v= irtio_scsi_device(), iothread=3D'iothread0', filters=3D[iotests.filter_qmp_= virtio_scsi]) + self.vm.qmp_log('device_add', id=3D'scsi0', driver=3D'virtio-scsi'= , iothread=3D'iothread0', filters=3D[iotests.filter_qmp_virtio_scsi]) self.vm.qmp_log('device_add', id=3D'scsi-hd0', driver=3D'scsi-hd',= drive=3D'hd0') self.vm.qmp_log('device_del', id=3D'scsi-hd0') self.vm.event_wait('DEVICE_DELETED') @@ -55,7 +55,7 @@ class TestCase(iotests.QMPTestCase): iotests.log('=3D=3DAttach two SCSI disks using the same block devi= ce and the same iothread=3D=3D') self.vm.qmp_log('blockdev-add', driver=3D'null-co', read_zeroes=3D= True, node_name=3D'hd0', read_only=3DTrue) self.vm.qmp_log('object-add', qom_type=3D'iothread', id=3D"iothrea= d0") - self.vm.qmp_log('device_add', id=3D'scsi0', driver=3Diotests.get_v= irtio_scsi_device(), iothread=3D'iothread0', filters=3D[iotests.filter_qmp_= virtio_scsi]) + self.vm.qmp_log('device_add', id=3D'scsi0', driver=3D'virtio-scsi'= , iothread=3D'iothread0', filters=3D[iotests.filter_qmp_virtio_scsi]) =20 self.vm.qmp_log('device_add', id=3D'scsi-hd0', driver=3D'scsi-hd',= drive=3D'hd0') self.vm.qmp_log('device_add', id=3D'scsi-hd1', driver=3D'scsi-hd',= drive=3D'hd0') @@ -73,8 +73,8 @@ class TestCase(iotests.QMPTestCase): self.vm.qmp_log('object-add', qom_type=3D'iothread', id=3D"iothrea= d0") self.vm.qmp_log('object-add', qom_type=3D'iothread', id=3D"iothrea= d1") =20 - self.vm.qmp_log('device_add', id=3D'scsi0', driver=3Diotests.get_v= irtio_scsi_device(), iothread=3D'iothread0', filters=3D[iotests.filter_qmp_= virtio_scsi]) - self.vm.qmp_log('device_add', id=3D'scsi1', driver=3Diotests.get_v= irtio_scsi_device(), iothread=3D'iothread1', filters=3D[iotests.filter_qmp_= virtio_scsi]) + self.vm.qmp_log('device_add', id=3D'scsi0', driver=3D'virtio-scsi'= , iothread=3D'iothread0', filters=3D[iotests.filter_qmp_virtio_scsi]) + self.vm.qmp_log('device_add', id=3D'scsi1', driver=3D'virtio-scsi'= , iothread=3D'iothread1', filters=3D[iotests.filter_qmp_virtio_scsi]) =20 self.vm.qmp_log('device_add', id=3D'scsi-hd0', driver=3D'scsi-hd',= drive=3D'hd0', bus=3D"scsi0.0") self.vm.qmp_log('device_add', id=3D'scsi-hd1', driver=3D'scsi-hd',= drive=3D'hd0', bus=3D"scsi1.0") @@ -99,7 +99,7 @@ class TestCase(iotests.QMPTestCase): self.vm.qmp_log('nbd-server-add', device=3D'hd0') =20 self.vm.qmp_log('object-add', qom_type=3D'iothread', id=3D"iothrea= d0") - self.vm.qmp_log('device_add', id=3D'scsi0', driver=3Diotests.get_v= irtio_scsi_device(), iothread=3D'iothread0', filters=3D[iotests.filter_qmp_= virtio_scsi]) + self.vm.qmp_log('device_add', id=3D'scsi0', driver=3D'virtio-scsi'= , iothread=3D'iothread0', filters=3D[iotests.filter_qmp_virtio_scsi]) self.vm.qmp_log('device_add', id=3D'scsi-hd0', driver=3D'scsi-hd',= drive=3D'hd0') =20 if __name__ =3D=3D '__main__': diff --git a/tests/qemu-iotests/257 b/tests/qemu-iotests/257 index 7cd25208296e..c72c82a171b4 100755 --- a/tests/qemu-iotests/257 +++ b/tests/qemu-iotests/257 @@ -292,7 +292,7 @@ def test_bitmap_sync(bsync_mode, msync_mode=3D'bitmap',= failure=3DNone): log('--- Preparing image & VM ---\n') drive0 =3D Drive(img_path, vm=3Dvm) drive0.img_create(iotests.imgfmt, SIZE) - vm.add_device("{},id=3Dscsi0".format(iotests.get_virtio_scsi_devic= e())) + vm.add_device("{},id=3Dscsi0".format('virtio-scsi')) vm.launch() =20 file_config =3D { @@ -449,7 +449,7 @@ def test_backup_api(): log('--- Preparing image & VM ---\n') drive0 =3D Drive(img_path, vm=3Dvm) drive0.img_create(iotests.imgfmt, SIZE) - vm.add_device("{},id=3Dscsi0".format(iotests.get_virtio_scsi_devic= e())) + vm.add_device("{},id=3Dscsi0".format('virtio-scsi')) vm.launch() =20 file_config =3D { diff --git a/tests/qemu-iotests/307 b/tests/qemu-iotests/307 index 9008974346b0..c7685347bc4c 100755 --- a/tests/qemu-iotests/307 +++ b/tests/qemu-iotests/307 @@ -40,13 +40,11 @@ with iotests.FilePath('image') as img, \ =20 iotests.log('=3D=3D=3D Launch VM =3D=3D=3D') =20 - virtio_scsi_device =3D iotests.get_virtio_scsi_device() - vm.add_object('iothread,id=3Diothread0') vm.add_blockdev(f'file,filename=3D{img},node-name=3Dfile') vm.add_blockdev(f'{iotests.imgfmt},file=3Dfile,node-name=3Dfmt') vm.add_blockdev('raw,file=3Dfile,node-name=3Dro,read-only=3Don') - vm.add_device(f'id=3Dscsi0,driver=3D{virtio_scsi_device},iothread=3Dio= thread0') + vm.add_device(f'id=3Dscsi0,driver=3Dvirtio-scsi,iothread=3Diothread0') vm.launch() =20 vm.qmp_log('nbd-server-start', diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 90d0b6252368..1e9e6a066e90 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -234,11 +234,6 @@ def qemu_io_silent_check(*args): stderr=3Dsubprocess.STDOUT) return exitcode =3D=3D 0 =20 -def get_virtio_scsi_device(): - if qemu_default_machine =3D=3D 's390-ccw-virtio': - return 'virtio-scsi-ccw' - return 'virtio-scsi-pci' - class QemuIoInteractive: def __init__(self, *args): self.args =3D qemu_io_args_no_fmt + list(args) --=20 2.30.2 From nobody Wed May 8 15:24:13 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1616185730; cv=none; d=zohomail.com; s=zohoarc; b=TWdt/RAJtpHm5SADsnxupQxQuzsCtACguRTi+DN/BzyLFrQQgZYyiu+Rp+vanBWqloDDhC5xzPS0eu0ZCY+Eew5EuPpk9i9mEbwqlntjJisGJUu3hIxayICkRjIbQlbKP/zNy1/pMMXQuEjQ/UBPJmYrFf9F/KbdfNySXdO6hvk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616185730; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6q84ojyGOJUXQ+LwIa6IUwl7dX2FB82wwqSPXcdg7Bc=; b=fKqpiYNlh1OZwDa2eKb5GTn7YCwDqFZB/GChMWFV/8WadK+EavSL3+9eKEQzAWCCL+PBGCZDjlHdQII1cMBY8I/q60XjW0JoDesoFG1827o4gQ0N7GhwPZZ2miWgQOAyenGrvjNjGDiT5f4SAc69IE+wDdhmkjZUwQRzzH2tR/s= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTP id 1616185730785840.4646183990039; Fri, 19 Mar 2021 13:28:50 -0700 (PDT) Received: from localhost ([::1]:54312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNLjW-00027c-Bo for importer@patchew.org; Fri, 19 Mar 2021 16:28:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47720) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNLf6-0004uC-MC; Fri, 19 Mar 2021 16:24:00 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:45981) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNLf4-0001Tj-AQ; Fri, 19 Mar 2021 16:24:00 -0400 Received: from localhost.localdomain ([82.142.20.38]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MfHUx-1lulrf2AId-00gntU; Fri, 19 Mar 2021 21:23:44 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PATCH v3 5/6] iotests: test m68k with the virt machine Date: Fri, 19 Mar 2021 21:23:34 +0100 Message-Id: <20210319202335.2397060-6-laurent@vivier.eu> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210319202335.2397060-1-laurent@vivier.eu> References: <20210319202335.2397060-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:Hsqgey4NK+7nLCVqA9rp6cTaJxObQqtjvxVrSahD1jNsnmFnYia p/paXzGMDdcHnP1pUPI1/bi13ESHvUANa7FmgbhNqpNgK98SBNNyL+TP5JQKj5ubbLEwuda UxqsmwEcWKZnNwbW4QQnB4HL7lyZ02Vk2MMAgjQ0TDv9AytWpDjOPbmFM5F2DtRaxt6SBgY typuVMaoSAJzL/nzV+snw== X-UI-Out-Filterresults: notjunk:1;V03:K0:QXrVGJN1vYQ=:sO4A8F/OyIjISDY2dgZbBF eOBzdCwLjPGvvqeiwfagDIDllhP/zHFZeXBaX2RFcH61evEzSFOAY0865wh7ub9XR2IYQNoR4 ekyee/Tx60lMC2MTrVjVHI3War+XNPC/njQBJBx5IU4+/fWvY7UOcCIWY8o5bGkQY8aZO0Rq/ /xIK+oGsL3A1NY48ZPnzcY3MVTxRn2tq7A7luq4nAYIp1+sqwChlWIOhr2BaOxJeJVPIWaZQ/ PL4HgaIixBd3buX3XiVhq0H9ibYomqU9is7NP6GQbctjq+PDdG+MV0l2WFgfFRblzJUaw4we/ 05LqOgmfdja7pHqNdyu3Pn1/r9ctP2zjhyB7nAcNfV+RgAfFYF1bZDDhYhR+J7UAJ5PS6Hgcg ka8TJahK4dwxMjkQFSkYYud8TTl9kQW+dKXBsBMVKeb/8HMBrMbwXuCjHxtlXiXX2lXg9Qct1 tLjzOg5wzQ== Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=212.227.126.134; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , Thomas Huth , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cornelia Huck , Markus Armbruster , Max Reitz , qemu-s390x@nongnu.org, Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" This allows to cover the virtio tests with a 32bit big-endian virtio-mmio machine. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Cornelia Huck Signed-off-by: Laurent Vivier --- tests/qemu-iotests/testenv.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/testenv.py b/tests/qemu-iotests/testenv.py index 1fbec854c1f7..6d27712617a3 100644 --- a/tests/qemu-iotests/testenv.py +++ b/tests/qemu-iotests/testenv.py @@ -208,6 +208,7 @@ def __init__(self, imgfmt: str, imgproto: str, aiomode:= str, ('arm', 'virt'), ('aarch64', 'virt'), ('avr', 'mega2560'), + ('m68k', 'virt'), ('rx', 'gdbsim-r5f562n8'), ('tricore', 'tricore_testboard') ) --=20 2.30.2 From nobody Wed May 8 15:24:13 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1616185706; cv=none; d=zohomail.com; s=zohoarc; b=jd60LrwgibTEO+c8g4sj+QS7BF7MNlAY7poahod90FSbStGDGKbZaD+evXywfnxZ2z6Z74o/E/QFhQ4KuH9+6dvVG02KOL+0vVKOvZTsAlgnBu0QNr4omMOoSU0+kTDS+e81xlKNOvpZ1SybykDnR6BxKZfTbyGIuZDraPPRdvc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616185706; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ozyjs1Qp0PnndwjTYVHczt6YWhMK6OLhRYwymumB5Pc=; b=To0M2001Vk1JM94516rUpPM9HvL2dxZ0PnlhqRPopCMRRn8QrMgwERqaM7bVwdiagxptrQ9cwAYy7wWT6+7ApE9uQQbqLOILwpKwI8pAPld/cJ5lkg67cQH/voYV0G0iTXxg7U+9wrtyuM0SYNonuowC/MfQUc40+4fgiUClNro= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616185706412258.2473933049573; Fri, 19 Mar 2021 13:28:26 -0700 (PDT) Received: from localhost ([::1]:53390 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNLjM-0001jV-Hr for importer@patchew.org; Fri, 19 Mar 2021 16:28:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNLf1-0004hj-Fq; Fri, 19 Mar 2021 16:23:55 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:33073) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNLex-0001PB-5k; Fri, 19 Mar 2021 16:23:55 -0400 Received: from localhost.localdomain ([82.142.20.38]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MKKIZ-1l7BxG2KbP-00LrCS; Fri, 19 Mar 2021 21:23:45 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PATCH v3 6/6] iotests: iothreads need ioeventfd Date: Fri, 19 Mar 2021 21:23:35 +0100 Message-Id: <20210319202335.2397060-7-laurent@vivier.eu> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210319202335.2397060-1-laurent@vivier.eu> References: <20210319202335.2397060-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:Bvr2lMNLeWFB6ix2L7INbQjVwPfsB0Cd5IFjUjpHS0KtvsDGMR9 ZlP4KCWbMBXS6cT1ZONF84AD2WtGoP64I177hZvBcTiji85TRVmGWdyPRsfoP2wfSHxDoep mHxplD6vXQuSwIVW64jDsZJOiv0ZKW7cYM9Ih4nH04+Dt42g1FeKQfpb/hSE/Lk5hQ57eN7 Tu60Me1+7i34V9tyQyIAw== X-UI-Out-Filterresults: notjunk:1;V03:K0:lbiQ0Lcfwxo=:3DyiptjdbaIuF0ninv4s4n Y7jKE2n6dRWGJmoqAYNPJiJxxide7qfejXySBzt+gpUaX8ekPREy60xC6L4nYdnXTaY+eIB+X SrvAX7x0yaPF3gQQNkB8P+OwdUMlDjWclJrR47dUmcDnZRLTUx9LlkBaI4A8G4DBfdH1g/a2y s74DX2pGNcvn64/laGVCp+9dmHbXb/n6crfFxXVgNtk7sXOufDGqDhpr94PQZ8AZp+CxxRSOY iTHutYOnKBmgEqitzWzyDYR0Q2d9EPxlij21ozogBV1LwUCmDEnTny+bCqiTTl1Yc4H7NZc9S lnX1lp+KalxttfV/pCABtKkuzIPzrbUTFa4lPZiIKQskr4SzIfjsbrKATOCBEL6e+CI4+Ibg/ jq4g2znhe3z5zo7wWU+P4NkSmFyi+zBixAbWym69pxEwxldK1MDGJXJq0AQ78iDE6iHndEMA3 dSUOYmPfuw== Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=212.227.126.187; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , Thomas Huth , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, Cornelia Huck , Markus Armbruster , Max Reitz , qemu-s390x@nongnu.org, Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" And ioeventfd are only available with virtio-scsi-pci or virtio-scsi-ccw, use the alias but add a rule to require virtio-scsi-pci or virtio-scsi-ccw for the tests that use iothreads. Signed-off-by: Laurent Vivier Reviewed-by: Thomas Huth --- tests/qemu-iotests/127 | 3 ++- tests/qemu-iotests/256 | 6 ++++-- tests/qemu-iotests/common.rc | 13 +++++++++++++ tests/qemu-iotests/iotests.py | 5 +++++ 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/127 b/tests/qemu-iotests/127 index 98e8e82a8210..32edc3b0685e 100755 --- a/tests/qemu-iotests/127 +++ b/tests/qemu-iotests/127 @@ -44,7 +44,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 _supported_fmt qcow2 _supported_proto file fuse =20 -_require_devices virtio-scsi scsi-hd +_require_devices scsi-hd +_require_one_device_of virtio-scsi-pci virtio-scsi-ccw =20 IMG_SIZE=3D64K =20 diff --git a/tests/qemu-iotests/256 b/tests/qemu-iotests/256 index 8d82a1dd865f..13666813bd8f 100755 --- a/tests/qemu-iotests/256 +++ b/tests/qemu-iotests/256 @@ -24,6 +24,8 @@ import os import iotests from iotests import log =20 +iotests._verify_virtio_scsi_pci_or_ccw() + iotests.script_initialize(supported_fmts=3D['qcow2']) size =3D 64 * 1024 * 1024 =20 @@ -61,8 +63,8 @@ with iotests.FilePath('img0') as img0_path, \ log('--- Preparing images & VM ---\n') vm.add_object('iothread,id=3Diothread0') vm.add_object('iothread,id=3Diothread1') - vm.add_device('virtio-scsi-pci,id=3Dscsi0,iothread=3Diothread0') - vm.add_device('virtio-scsi-pci,id=3Dscsi1,iothread=3Diothread1') + vm.add_device('virtio-scsi,id=3Dscsi0,iothread=3Diothread0') + vm.add_device('virtio-scsi,id=3Dscsi1,iothread=3Diothread1') iotests.qemu_img_create('-f', iotests.imgfmt, img0_path, str(size)) iotests.qemu_img_create('-f', iotests.imgfmt, img1_path, str(size)) vm.add_drive(img0_path, interface=3D'none') diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index 65cdba5723ba..7f49c9716db7 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -977,5 +977,18 @@ _require_devices() done } =20 +_require_one_device_of() +{ + available=3D$($QEMU -M none -device help | \ + grep ^name | sed -e 's/^name "//' -e 's/".*$//') + for device + do + if echo "$available" | grep -q "$device" ; then + return + fi + done + _notrun "$* not available" +} + # make sure this script returns success true diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 1e9e6a066e90..5af01828951e 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -1146,6 +1146,11 @@ def _verify_virtio_blk() -> None: if 'virtio-blk' not in out: notrun('Missing virtio-blk in QEMU binary') =20 +def _verify_virtio_scsi_pci_or_ccw() -> None: + out =3D qemu_pipe('-M', 'none', '-device', 'help') + if 'virtio-scsi-pci' not in out and 'virtio-scsi-ccw' not in out: + notrun('Missing virtio-scsi-pci or virtio-scsi-ccw in QEMU binary') + =20 def supports_quorum(): return 'quorum' in qemu_img_pipe('--help') --=20 2.30.2