On 20.04.2018 21:56, Eduardo Habkost wrote: > On Fri, Apr 20, 2018 at 03:19:28PM -0300, Eduardo Habkost wrote: >> From: Amador Pahim <apa...@redhat.com> >> >> This patch adds the QEMUMachine._create_console() method, which >> returns a list with the chardev console device arguments to be >> used in the qemu command line. >> >> Signed-off-by: Amador Pahim <apa...@redhat.com> >> [ehabkost: reword commit message] >> Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> >> --- >> scripts/qemu.py | 49 ++++++++++++++++++++++++++++++++++++++++++++----- >> 1 file changed, 44 insertions(+), 5 deletions(-) >> >> diff --git a/scripts/qemu.py b/scripts/qemu.py >> index 08a3e9af5a..9e9d502543 100644 >> --- a/scripts/qemu.py >> +++ b/scripts/qemu.py >> @@ -55,7 +55,7 @@ class QEMUMachine(object): [...] >> + chardev = 'socket,id=console,{address},server,nowait' >> + if console_address is None: >> + console_address = tempfile.mktemp() >> + chardev = chardev.format(address='path=%s' % >> + console_address) >> + elif isinstance(console_address, tuple): >> + chardev = chardev.format(address='host=%s,port=%s' % >> + (console_address[0], >> + console_address[1])) >> + else: >> + chardev = chardev.format(address='path=%s' % console_address) >> + >> + self._console_address = console_address >> + >> + device = '{dev_type},chardev=console' >> + if '86' in self._arch: >> + device = device.format(dev_type='isa-serial') >> + elif 'ppc' in self._arch: >> + device = device.format(dev_type='spapr-vty') >> + elif 's390x' in self._arch: >> + device = device.format(dev_type='sclpconsole') > > Why do we need this? Why isn't -serial enough?
AFAIK, at least on s390x, -serial is not implemented and you need to specify a sclpconsole device. Thomas