Le 19/03/2021 à 12:36, Cornelia Huck a écrit : > On Thu, 18 Mar 2021 23:39:04 +0100 > Laurent Vivier <laur...@vivier.eu> wrote: > >> 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 >> "virtio-scsi-device", "virtio-scsi-ccw" or "virtio-scsi-pci". >> >> This already exists for s390x and -ccw interfaces, adds them >> for m68k and MMIO (-device) interfaces. >> >> Signed-off-by: Laurent Vivier <laur...@vivier.eu> >> --- >> softmmu/qdev-monitor.c | 46 +++++++++++++++++++++++++++--------------- >> 1 file changed, 30 insertions(+), 16 deletions(-) >> >> diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c >> index 8dc656becca9..262d38b8c01e 100644 >> --- a/softmmu/qdev-monitor.c >> +++ b/softmmu/qdev-monitor.c >> @@ -42,6 +42,8 @@ >> #include "hw/qdev-properties.h" >> #include "hw/clock.h" >> >> +#define QEMU_ARCH_NO_PCI (QEMU_ARCH_S390X | QEMU_ARCH_M68K) > > The name of the #define is a tad misleading (we do have virtio-pci > devices on s390x, unlike in 2012, we just don't want the aliases to > point to them.) Maybe QEMU_ARCH_NONPCI_DEFAULT?
I have changed this patch to define QEMU_ARCH_VIRTIO_PCI with the list of archs with virtio-pci devices, and QEMU_ARCH_VIRTIO_CCW and then QEMU_ARCH_VIRTIO_MMIO > >> + >> /* >> * Aliases were a bad idea from the start. Let's keep them >> * from spreading further. > > Otherwise, LGTM. > Thanks, Laurent