Message ID | 20200505135025.14614-3-cohuck@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | s390x: improve documentation | expand |
On 05/05/2020 15.50, Cornelia Huck wrote: > Add some basic info how to use 3270 devices. > > Signed-off-by: Cornelia Huck <cohuck@redhat.com> > --- > docs/system/s390x/3270.rst | 32 ++++++++++++++++++++++++++++++++ > docs/system/target-s390x.rst | 1 + > 2 files changed, 33 insertions(+) > create mode 100644 docs/system/s390x/3270.rst > > diff --git a/docs/system/s390x/3270.rst b/docs/system/s390x/3270.rst > new file mode 100644 > index 000000000000..e367a457e001 > --- /dev/null > +++ b/docs/system/s390x/3270.rst > @@ -0,0 +1,32 @@ > +3270 devices > +============ > + > +With the aid of the ``x3270`` emulator, QEMU provides limited support > +for making a single 3270 device available to a guest. Note that this > +supports basic features only. The first sentence sounds somewhat confusing. Maybe rather something like: QEMU can emulate a 3270 device attached to a guest, which then can be used with a program like ``x3270`` to get a traditional 3270 terminal for your guest. ? > +To provide a 3270 device to a guest, create a ``x-3270device`` linked to The device is called "x-terminal3270", isn't it? (By the way, why did we never remove the x- prefix here? Is it still experimental?) > +a ``tn3270`` chardev. The guest will see a 3270 channel device. In order > +to actually be able to use it, attach the ``x3270`` emulator to the chardev. Can the guest only use the 3270 device if there is a x3270 attached to it? Or are you talking about the user here? > +Example configuration > +--------------------- > + > +* Add a ``tn3270`` chardev and a ``x-3270device`` to the QEMU command line:: "x-terminal3270" ? > + -chardev socket,id=char_0,host=0.0.0.0,port=23,nowait,server,tn3270 > + -device x-terminal3270,chardev=char_0,devno=fe.0.000a,id=terminal_0 qemu-system-s390x: -chardev socket,id=char_0,host=0.0.0.0,port=23,nowait,server,tn3270: Failed to bind socket: Permission denied ... maybe better use a non-privileged port in the example? Thomas
On Fri, 15 May 2020 09:29:42 +0200 Thomas Huth <thuth@redhat.com> wrote: > On 05/05/2020 15.50, Cornelia Huck wrote: > > Add some basic info how to use 3270 devices. > > > > Signed-off-by: Cornelia Huck <cohuck@redhat.com> > > --- > > docs/system/s390x/3270.rst | 32 ++++++++++++++++++++++++++++++++ > > docs/system/target-s390x.rst | 1 + > > 2 files changed, 33 insertions(+) > > create mode 100644 docs/system/s390x/3270.rst > > > > diff --git a/docs/system/s390x/3270.rst b/docs/system/s390x/3270.rst > > new file mode 100644 > > index 000000000000..e367a457e001 > > --- /dev/null > > +++ b/docs/system/s390x/3270.rst > > @@ -0,0 +1,32 @@ > > +3270 devices > > +============ > > + > > +With the aid of the ``x3270`` emulator, QEMU provides limited support > > +for making a single 3270 device available to a guest. Note that this > > +supports basic features only. > > The first sentence sounds somewhat confusing. Maybe rather something like: > > QEMU can emulate a 3270 device attached to a guest, which then can be > used with a program like ``x3270`` to get a traditional 3270 terminal > for your guest. But QEMU actually relies on x3270 (or a comparable program). It only emulates the basic ccw plumbing; for the actual protocol (beyond negotiating tn3270), it relies on the emulation done by x3270. > > ? > > > +To provide a 3270 device to a guest, create a ``x-3270device`` linked to > > The device is called "x-terminal3270", isn't it? Yeah, no idea how I manged to mess that up. > > (By the way, why did we never remove the x- prefix here? Is it still > experimental?) I'd still consider it experimental: only basic functionality is supported, and (more importantly), we never came up with a scheme to properly support more than one 3270 device. The usefulness of it is quite limited. > > > +a ``tn3270`` chardev. The guest will see a 3270 channel device. In order > > +to actually be able to use it, attach the ``x3270`` emulator to the chardev. > > Can the guest only use the 3270 device if there is a x3270 attached to > it? Or are you talking about the user here? See above: x3270 does most of the heavy lifting. > > > +Example configuration > > +--------------------- > > + > > +* Add a ``tn3270`` chardev and a ``x-3270device`` to the QEMU command line:: > > "x-terminal3270" ? Nod. > > > + -chardev socket,id=char_0,host=0.0.0.0,port=23,nowait,server,tn3270 > > + -device x-terminal3270,chardev=char_0,devno=fe.0.000a,id=terminal_0 > > qemu-system-s390x: -chardev > socket,id=char_0,host=0.0.0.0,port=23,nowait,server,tn3270: Failed to > bind socket: Permission denied > > ... maybe better use a non-privileged port in the example? Makes sense. This example was lifted straight from the wiki page :)
On 15/05/2020 11.00, Cornelia Huck wrote: > On Fri, 15 May 2020 09:29:42 +0200 > Thomas Huth <thuth@redhat.com> wrote: > >> On 05/05/2020 15.50, Cornelia Huck wrote: >>> Add some basic info how to use 3270 devices. >>> >>> Signed-off-by: Cornelia Huck <cohuck@redhat.com> >>> --- >>> docs/system/s390x/3270.rst | 32 ++++++++++++++++++++++++++++++++ >>> docs/system/target-s390x.rst | 1 + >>> 2 files changed, 33 insertions(+) >>> create mode 100644 docs/system/s390x/3270.rst >>> >>> diff --git a/docs/system/s390x/3270.rst b/docs/system/s390x/3270.rst >>> new file mode 100644 >>> index 000000000000..e367a457e001 >>> --- /dev/null >>> +++ b/docs/system/s390x/3270.rst >>> @@ -0,0 +1,32 @@ >>> +3270 devices >>> +============ >>> + >>> +With the aid of the ``x3270`` emulator, QEMU provides limited support >>> +for making a single 3270 device available to a guest. Note that this >>> +supports basic features only. >> >> The first sentence sounds somewhat confusing. Maybe rather something like: >> >> QEMU can emulate a 3270 device attached to a guest, which then can be >> used with a program like ``x3270`` to get a traditional 3270 terminal >> for your guest. > > But QEMU actually relies on x3270 (or a comparable program). It only > emulates the basic ccw plumbing; for the actual protocol (beyond > negotiating tn3270), it relies on the emulation done by x3270. Ok, makes sense now. Maybe something like: QEMU provides the possibility to connect an external 3270 terminal emulator (like ``x3270``) to a guest? Thomas
On Fri, 15 May 2020 11:14:40 +0200 Thomas Huth <thuth@redhat.com> wrote: > On 15/05/2020 11.00, Cornelia Huck wrote: > > On Fri, 15 May 2020 09:29:42 +0200 > > Thomas Huth <thuth@redhat.com> wrote: > > > >> On 05/05/2020 15.50, Cornelia Huck wrote: > >>> Add some basic info how to use 3270 devices. > >>> > >>> Signed-off-by: Cornelia Huck <cohuck@redhat.com> > >>> --- > >>> docs/system/s390x/3270.rst | 32 ++++++++++++++++++++++++++++++++ > >>> docs/system/target-s390x.rst | 1 + > >>> 2 files changed, 33 insertions(+) > >>> create mode 100644 docs/system/s390x/3270.rst > >>> > >>> diff --git a/docs/system/s390x/3270.rst b/docs/system/s390x/3270.rst > >>> new file mode 100644 > >>> index 000000000000..e367a457e001 > >>> --- /dev/null > >>> +++ b/docs/system/s390x/3270.rst > >>> @@ -0,0 +1,32 @@ > >>> +3270 devices > >>> +============ > >>> + > >>> +With the aid of the ``x3270`` emulator, QEMU provides limited support > >>> +for making a single 3270 device available to a guest. Note that this > >>> +supports basic features only. > >> > >> The first sentence sounds somewhat confusing. Maybe rather something like: > >> > >> QEMU can emulate a 3270 device attached to a guest, which then can be > >> used with a program like ``x3270`` to get a traditional 3270 terminal > >> for your guest. > > > > But QEMU actually relies on x3270 (or a comparable program). It only > > emulates the basic ccw plumbing; for the actual protocol (beyond > > negotiating tn3270), it relies on the emulation done by x3270. > > Ok, makes sense now. Maybe something like: > > QEMU provides the possibility to connect an external 3270 terminal > emulator (like ``x3270``) to a guest? Hm... "QEMU supports connecting an external 3270 terminal emulator (such as ``x3270``) to make a single 3270 device available to a guest. Note that this supports basic features only." ?
On 15/05/2020 11.45, Cornelia Huck wrote: > On Fri, 15 May 2020 11:14:40 +0200 > Thomas Huth <thuth@redhat.com> wrote: > >> On 15/05/2020 11.00, Cornelia Huck wrote: >>> On Fri, 15 May 2020 09:29:42 +0200 >>> Thomas Huth <thuth@redhat.com> wrote: >>> >>>> On 05/05/2020 15.50, Cornelia Huck wrote: >>>>> Add some basic info how to use 3270 devices. >>>>> >>>>> Signed-off-by: Cornelia Huck <cohuck@redhat.com> >>>>> --- >>>>> docs/system/s390x/3270.rst | 32 ++++++++++++++++++++++++++++++++ >>>>> docs/system/target-s390x.rst | 1 + >>>>> 2 files changed, 33 insertions(+) >>>>> create mode 100644 docs/system/s390x/3270.rst >>>>> >>>>> diff --git a/docs/system/s390x/3270.rst b/docs/system/s390x/3270.rst >>>>> new file mode 100644 >>>>> index 000000000000..e367a457e001 >>>>> --- /dev/null >>>>> +++ b/docs/system/s390x/3270.rst >>>>> @@ -0,0 +1,32 @@ >>>>> +3270 devices >>>>> +============ >>>>> + >>>>> +With the aid of the ``x3270`` emulator, QEMU provides limited support >>>>> +for making a single 3270 device available to a guest. Note that this >>>>> +supports basic features only. >>>> >>>> The first sentence sounds somewhat confusing. Maybe rather something like: >>>> >>>> QEMU can emulate a 3270 device attached to a guest, which then can be >>>> used with a program like ``x3270`` to get a traditional 3270 terminal >>>> for your guest. >>> >>> But QEMU actually relies on x3270 (or a comparable program). It only >>> emulates the basic ccw plumbing; for the actual protocol (beyond >>> negotiating tn3270), it relies on the emulation done by x3270. >> >> Ok, makes sense now. Maybe something like: >> >> QEMU provides the possibility to connect an external 3270 terminal >> emulator (like ``x3270``) to a guest? > > Hm... > > "QEMU supports connecting an external 3270 terminal emulator (such as > ``x3270``) to make a single 3270 device available to a guest. Note that > this supports basic features only." > > ? Yes, that sounds good! Thanks, Thomas
diff --git a/docs/system/s390x/3270.rst b/docs/system/s390x/3270.rst new file mode 100644 index 000000000000..e367a457e001 --- /dev/null +++ b/docs/system/s390x/3270.rst @@ -0,0 +1,32 @@ +3270 devices +============ + +With the aid of the ``x3270`` emulator, QEMU provides limited support +for making a single 3270 device available to a guest. Note that this +supports basic features only. + +To provide a 3270 device to a guest, create a ``x-3270device`` linked to +a ``tn3270`` chardev. The guest will see a 3270 channel device. In order +to actually be able to use it, attach the ``x3270`` emulator to the chardev. + +Example configuration +--------------------- + +* Add a ``tn3270`` chardev and a ``x-3270device`` to the QEMU command line:: + + -chardev socket,id=char_0,host=0.0.0.0,port=23,nowait,server,tn3270 + -device x-terminal3270,chardev=char_0,devno=fe.0.000a,id=terminal_0 + +* Start the guest. In the guest, use ``chccwdev -e 0.0.000a`` to enable + the device. + +* On the host, start the ``x3270`` emulator:: + + x3270 <host>:23 + +* In the guest, locate the 3270 device node under ``/dev/3270/`` (say, + ``tty1``) and start a getty on it:: + + systemctl start serial-getty@3270-tty1.service + +This should get you an addtional tty for logging into the guest. diff --git a/docs/system/target-s390x.rst b/docs/system/target-s390x.rst index 37ca032d98ef..2592a05303ef 100644 --- a/docs/system/target-s390x.rst +++ b/docs/system/target-s390x.rst @@ -24,6 +24,7 @@ or vfio-ap is also available. .. toctree:: s390x/vfio-ap s390x/css + s390x/3270 Architectural features ======================
Add some basic info how to use 3270 devices. Signed-off-by: Cornelia Huck <cohuck@redhat.com> --- docs/system/s390x/3270.rst | 32 ++++++++++++++++++++++++++++++++ docs/system/target-s390x.rst | 1 + 2 files changed, 33 insertions(+) create mode 100644 docs/system/s390x/3270.rst