On 07.01.2013 18:17, Viktor Mihajlovski wrote: > From: "J.B. Joret" <jb@xxxxxxxxxxxxxxxxxx> > > This is the QEMU backend code for the SCLP console support. > It includes SCLP capability detection, QEMU command line generation > and a test case. > > Signed-off-by: J.B. Joret <jb@xxxxxxxxxxxxxxxxxx> > Signed-off-by: Viktor Mihajlovski <mihajlov@xxxxxxxxxxxxxxxxxx> > --- > src/qemu/qemu_capabilities.c | 3 + > src/qemu/qemu_capabilities.h | 1 + > src/qemu/qemu_command.c | 59 ++++++++++++++++++++ > .../qemuxml2argv-console-sclp.args | 8 +++ > .../qemuxml2argvdata/qemuxml2argv-console-sclp.xml | 24 ++++++++ > tests/qemuxml2argvtest.c | 3 + > 6 files changed, 98 insertions(+) > create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-console-sclp.args > create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-console-sclp.xml > > diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c > index e16bc70..be78461 100644 > --- a/src/qemu/qemu_capabilities.c > +++ b/src/qemu/qemu_capabilities.c > @@ -199,6 +199,8 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST, > "cirrus-vga", > "vmware-svga", > "device-video-primary", > + "s390-sclp", > + > ); > > struct _qemuCaps { > @@ -1331,6 +1333,7 @@ struct qemuCapsStringFlags qemuCapsObjectTypes[] = { > { "usb-hub", QEMU_CAPS_USB_HUB }, > { "ich9-ahci", QEMU_CAPS_ICH9_AHCI }, > { "virtio-blk-s390", QEMU_CAPS_VIRTIO_S390 }, > + { "sclpconsole", QEMU_CAPS_SCLP_S390 }, > { "lsi53c895a", QEMU_CAPS_SCSI_LSI }, > { "virtio-scsi-pci", QEMU_CAPS_VIRTIO_SCSI_PCI }, > { "spicevmc", QEMU_CAPS_DEVICE_SPICEVMC }, > diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h > index 1417d7f..399212b 100644 > --- a/src/qemu/qemu_capabilities.h > +++ b/src/qemu/qemu_capabilities.h > @@ -162,6 +162,7 @@ enum qemuCapsFlags { > QEMU_CAPS_DEVICE_VMWARE_SVGA = 122, /* -device vmware-svga */ > QEMU_CAPS_DEVICE_VIDEO_PRIMARY = 123, /* safe to use -device XXX > for primary video device */ > + QEMU_CAPS_SCLP_S390 = 124, /* -device sclp* */ > > QEMU_CAPS_LAST, /* this must always be the last item */ > }; > diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c > index 8a3de09..92fc6b4 100644 > --- a/src/qemu/qemu_command.c > +++ b/src/qemu/qemu_command.c > @@ -4132,6 +4132,37 @@ error: > return NULL; > } > > +static char *qemuBuildSclpDevStr(virDomainChrDefPtr dev) I'd prefer to see this split into two lines. ACK Michal -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list