[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 1/6] qdev: define list of archs with virtio-pci or virtio-ccw
From: |
Laurent Vivier |
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 |
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 <cohuck@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
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);
+/* 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[] = {
{ "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_S390X },
- { "virtio-tablet-ccw", "virtio-tablet", QEMU_ARCH_S390X },
- { "virtio-tablet-pci", "virtio-tablet", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X },
+ { "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 },
{ }
};
--
2.30.2
- [PATCH v3 0/6] iotests: fix failures with non-PCI machines, Laurent Vivier, 2021/03/19
- [PATCH v3 1/6] qdev: define list of archs with virtio-pci or virtio-ccw,
Laurent Vivier <=
- [PATCH v3 6/6] iotests: iothreads need ioeventfd, Laurent Vivier, 2021/03/19
- [PATCH v3 4/6] iotests: Revert "iotests: use -ccw on s390x for 040, 139, and 182", Laurent Vivier, 2021/03/19
- [PATCH v3 5/6] iotests: test m68k with the virt machine, Laurent Vivier, 2021/03/19
- [PATCH v3 2/6] m68k: add the virtio devices aliases, Laurent Vivier, 2021/03/19
- [PATCH v3 3/6] blockdev: with -drive if=virtio, use generic virtio-blk, Laurent Vivier, 2021/03/19
- Re: [PATCH v3 0/6] iotests: fix failures with non-PCI machines, Alex Bennée, 2021/03/22