[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [Qemu-devel] [RFC 01/24] qemu.py: Introduce _create_con
From: |
Thomas Huth |
Subject: |
Re: [qemu-s390x] [Qemu-devel] [RFC 01/24] qemu.py: Introduce _create_console() method |
Date: |
Mon, 23 Apr 2018 05:26:13 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
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 <address@hidden>
>>
>> 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 <address@hidden>
>> [ehabkost: reword commit message]
>> Signed-off-by: Eduardo Habkost <address@hidden>
>> ---
>> 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
- Re: [qemu-s390x] [Qemu-devel] [RFC 01/24] qemu.py: Introduce _create_console() method,
Thomas Huth <=