Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:GA
libguestfs
0001-s390x-fix-launch-failing-by-using-virtio-c...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-s390x-fix-launch-failing-by-using-virtio-ccw-and-scl.patch of Package libguestfs
From a6d18a3465898829cfcd8c515a5f12770274fa8b Mon Sep 17 00:00:00 2001 From: Fei Li <fli@suse.com> Date: Mon, 23 Jul 2018 09:03:53 -0400 Subject: [PATCH] s390x: fix launch failing by using virtio-*-ccw and sclp On the s390x platform, virtio-*-pci does not work and only SCLP is available in QEMU as a console device. To handle this, this patch uses the default virtio-*-ccw device and default sclp console to do the launch. Or else the generated invalid qemu command line hangs for a while and then a general error occurs as "libguestfs: error: appliance closed the connection unexpectedly, see earlier error messages". [FL: BSC#1098615] Signed-off-by: Fei Li <fli@suse.com> --- src/guestfs-internal.h | 23 ++++++++++++++--------- src/launch-direct.c | 7 +++++++ 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index 8dc31983a..74609b729 100644 --- a/src/guestfs-internal.h +++ b/src/guestfs-internal.h @@ -134,20 +134,25 @@ /* 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 ARM (virtio-mmio), s/390x (CCW) vs + * normal hardware with PCI. */ -#if !defined(__arm__) && !defined(__aarch64__) -#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 /* ARM */ +#if defined(__arm) || defined(__arch64__) /* 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 /* ARM */ +#elif defined(__s390x__) /* s/390x */ +#define VIRTIO_BLK "virtio-blk-ccw" +#define VIRTIO_SCSI "virtio-scsi-ccw" +#define VIRTIO_SERIAL "virtio-serial-ccw" +#define VIRTIO_NET "virtio-net-ccw" +#else +#define VIRTIO_BLK "virtio-blk-pci" +#define VIRTIO_SCSI "virtio-scsi-pci" +#define VIRTIO_SERIAL "virtio-serial-pci" +#define VIRTIO_NET "virtio-net-pci" +#endif /* Machine types. */ #ifdef __arm__ diff --git a/src/launch-direct.c b/src/launch-direct.c index e53b3f6a4..1cebbd6d7 100644 --- a/src/launch-direct.c +++ b/src/launch-direct.c @@ -578,8 +578,15 @@ launch_direct (guestfs_h *g, void *datav, const char *arg) ADD_CMDLINE (VIRTIO_SERIAL); /* Create the serial console. */ +#ifndef __s390x__ ADD_CMDLINE ("-serial"); ADD_CMDLINE ("stdio"); +#else + ADD_CMDLINE ("-chardev"); + ADD_CMDLINE ("stdio,id=charconsole0"); + ADD_CMDLINE ("-device"); + ADD_CMDLINE ("sclpconsole,chardev=charconsole0"); +#endif if (qemu_supports_device (g, data, "Serial Graphics Adapter")) { /* Use sgabios instead of vgabios. This means we'll see BIOS -- 2.12.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor