qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC 01/24] qemu.py: Introduce _create_console() method


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [RFC 01/24] qemu.py: Introduce _create_console() method
Date: Mon, 23 Apr 2018 16:47:51 -0300
User-agent: Mutt/1.9.2 (2017-12-15)

On Mon, Apr 23, 2018 at 05:26:13AM +0200, Thomas Huth wrote:
> 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.

It sounds like it would be useful if it did implement it.  Does
anybody see any drawbacks?

-- 
Eduardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]