On Wednesday, 17 May 2017 13:09:05 CEST Richard W.M. Jones wrote: > PCI devices don't exist/work. You would see errors such as: > > qemu-system-s390x: -device virtio-rng-pci,rng=rng0: MSI-X support is > mandatory in the S390 architecture > --- > lib/guestfs-internal.h | 38 +++++++++++++++++++++++++++++--------- > lib/launch-direct.c | 4 ++-- > 2 files changed, 31 insertions(+), 11 deletions(-) > > diff --git a/lib/guestfs-internal.h b/lib/guestfs-internal.h > index a04ccff09..ebab006b9 100644 > --- a/lib/guestfs-internal.h > +++ b/lib/guestfs-internal.h > @@ -142,20 +142,40 @@ > /* Maximum size of Windows explorer.exe. 2.6MB on Windows 7. */ > #define MAX_WINDOWS_EXPLORER_SIZE (4 * 1000 * 1000) > > -/* Differences in device names on ARM (virtio-mmio) vs normal > - * hardware with PCI. > +/* Differences in device names on ARMv7 (virtio-mmio), s/390x (CCW) vs > + * normal hardware with PCI. > */ > -#if !defined(__arm__) > -#define VIRTIO_BLK "virtio-blk-pci" > -#define VIRTIO_SCSI "virtio-scsi-pci" > -#define VIRTIO_SERIAL "virtio-serial-pci" > -#define VIRTIO_NET "virtio-net-pci" > -#else /* ARMv7 */ > +#ifdef __arm__ > #define VIRTIO_BLK "virtio-blk-device" > #define VIRTIO_SCSI "virtio-scsi-device" > #define VIRTIO_SERIAL "virtio-serial-device" > #define VIRTIO_NET "virtio-net-device" > -#endif /* ARMv7 */ > +#define VIRTIO_RNG "virtio-rng-device" > +#endif > + > +#ifdef __s390x__ > +#define VIRTIO_BLK "virtio-blk-ccw" > +#define VIRTIO_SCSI "virtio-scsi-ccw" > +#define VIRTIO_SERIAL "virtio-serial-ccw" > +#define VIRTIO_NET "virtio-net-ccw" > +#define VIRTIO_RNG "virtio-rng-ccw" > +#endif
As in patch #3, I'd find better a #ifdef ... #elif ... #endif chain. -- Pino Toscano
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Libguestfs mailing list [email protected] https://www.redhat.com/mailman/listinfo/libguestfs
