All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] s390x: improve documentation
@ 2020-05-15 15:15 Cornelia Huck
  2020-05-15 15:15 ` [PATCH v2 1/3] docs/s390x: document the virtual css Cornelia Huck
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Cornelia Huck @ 2020-05-15 15:15 UTC (permalink / raw)
  To: qemu-s390x; +Cc: Thomas Huth, Cornelia Huck, qemu-devel

The documentation for the s390x system emulation target still has quite
a bit of room for improvement, so I started adding some device documentation.

v1->v2:
- css.rst: added example for cssid == 0 (Thomas)
- css.rst: mention what the properties look like (Thomas)
- css.rst: it's "channel subsystem image" (me)
- 3270.rst: make introduction less confusing (Thomas)
- 3270.rst: fix device name (Thomas)
- 3270.rst: use unprivileged port (Thomas)
- vfio-ccw.rst: add mdevctl example (Thomas)
- vfio-ccw.rst: formatting tweaks (Thomas)

Cornelia Huck (3):
  docs/s390x: document the virtual css
  docs/s390x: document 3270
  docs/s390x: document vfio-ccw

 docs/system/s390x/3270.rst     | 32 +++++++++++++
 docs/system/s390x/css.rst      | 86 ++++++++++++++++++++++++++++++++++
 docs/system/s390x/vfio-ccw.rst | 72 ++++++++++++++++++++++++++++
 docs/system/target-s390x.rst   |  3 ++
 4 files changed, 193 insertions(+)
 create mode 100644 docs/system/s390x/3270.rst
 create mode 100644 docs/system/s390x/css.rst
 create mode 100644 docs/system/s390x/vfio-ccw.rst

-- 
2.25.4



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v2 1/3] docs/s390x: document the virtual css
  2020-05-15 15:15 [PATCH v2 0/3] s390x: improve documentation Cornelia Huck
@ 2020-05-15 15:15 ` Cornelia Huck
  2020-05-17 17:39   ` Thomas Huth
  2020-05-15 15:15 ` [PATCH v2 2/3] docs/s390x: document 3270 Cornelia Huck
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Cornelia Huck @ 2020-05-15 15:15 UTC (permalink / raw)
  To: qemu-s390x; +Cc: Thomas Huth, Cornelia Huck, qemu-devel

Add some hints about "devno" rules.

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
 docs/system/s390x/css.rst    | 86 ++++++++++++++++++++++++++++++++++++
 docs/system/target-s390x.rst |  1 +
 2 files changed, 87 insertions(+)
 create mode 100644 docs/system/s390x/css.rst

diff --git a/docs/system/s390x/css.rst b/docs/system/s390x/css.rst
new file mode 100644
index 000000000000..9e472b7813ec
--- /dev/null
+++ b/docs/system/s390x/css.rst
@@ -0,0 +1,86 @@
+The virtual channel subsystem
+=============================
+
+QEMU implements a virtual channel subsystem with subchannels, (mostly
+functionless) channel paths, and channel devices (virtio-ccw, 3270, and
+devices passed via vfio-ccw). It supports multiple subchannel sets (MSS) and
+multiple channel subsystems extended (MCSS-E).
+
+All channel devices support the ``devno`` property, which takes a parameter
+in the form ``<cssid>.<ssid>.<device number>``.
+
+The default channel subsystem image id (``<cssid>``) is ``0xfe``. Devices in
+there will show up in channel subsystem image ``0`` to guests that do not
+enable MCSS-E. Note that devices with a different cssid will not be visible
+if the guest OS does not enable MCSS-E (which is true of all supported guest
+operating systems today).
+
+Supported values for the subchannel set id (``<ssid>``) range from ``0-3``.
+Devices with a ssid that is not ``0`` will not be visible if the guest OS
+does not enable MSS (any Linux version that supports virtio also enables MSS).
+Any device may be put into any subchannel set, there is no restriction by
+device type.
+
+The device number can range from ``0-0xffff``.
+
+If the ``devno`` property is not specified for a device, QEMU will choose the
+next free device number in subchannel set 0, skipping to the next subchannel
+set if no more device numbers are free.
+
+QEMU places a device at the first free subchannel in the specified subchannel
+set. If a device is hotunplugged and later replugged, it may appear at a
+different subchannel. (This is similar to how z/VM works.)
+
+
+Examples
+--------
+
+* a virtio-net device, cssid/ssid/devno automatically assigned::
+
+    -device virtio-net-ccw
+
+  In a Linux guest (without default devices and no other devices specified
+  prior to this one), this will show up as ``0.0.0000`` under subchannel
+  ``0.0.0000``.
+
+  The auto-assigned-properties in QEMU (as seen via e.g. ``info qtree``)
+  would be ``dev_id = "fe.0.0000"`` and ``subch_id = "fe.0.0000"``.
+
+* a virtio-rng device in subchannel set ``0``::
+
+    -device virtio-rng-ccw,devno=fe.0.0042
+
+  If added to the same Linux guest as above, it would show up as ``0.0.0042``
+  under subchannel ``0.0.0001``.
+
+  The properties for the device would be ``dev_id = "fe.0.0042"`` and
+  ``subch_id = "fe.0.0001"``.
+
+* a virtio-gpu device in subchannel set ``2``::
+
+    -device virtio-gpu-ccw,devno=fe.2.1111
+
+  If added to the same Linux guest as above, it would show up as ``0.2.1111``
+  under subchannel ``0.2.0000``.
+
+  The properties for the device would be ``dev_id = "fe.2.1111"`` and
+  ``subch_id = "fe.2.0000"``.
+
+* a virtio-mouse device in a non-standard channel subsystem image::
+
+    -device virtio-mouse-ccw,devno=2.0.2222
+
+  This would not show up in a standard Linux guest.
+
+  The properties for the device would be ``dev_id = "2.0.2222"`` and
+  ``subch_id = "2.0.0000"``.
+
+* a virtio-keyboard device in another non-standard channel subsystem image::
+
+    -device virtio-keyboard-ccw,devno=0.0.1234
+
+  This would not show up in a standard Linux guest, either, as ``0`` is not
+  the standard channel subsystem image id.
+
+  The properties for the device would be ``dev_id = "0.0.1234"`` and
+  ``subch_id = "0.0.0000"``.
diff --git a/docs/system/target-s390x.rst b/docs/system/target-s390x.rst
index 7d76ae97b401..37ca032d98ef 100644
--- a/docs/system/target-s390x.rst
+++ b/docs/system/target-s390x.rst
@@ -23,6 +23,7 @@ or vfio-ap is also available.
 
 .. toctree::
    s390x/vfio-ap
+   s390x/css
 
 Architectural features
 ======================
-- 
2.25.4



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 2/3] docs/s390x: document 3270
  2020-05-15 15:15 [PATCH v2 0/3] s390x: improve documentation Cornelia Huck
  2020-05-15 15:15 ` [PATCH v2 1/3] docs/s390x: document the virtual css Cornelia Huck
@ 2020-05-15 15:15 ` Cornelia Huck
  2020-05-17 17:48   ` Thomas Huth
  2020-05-15 15:15 ` [PATCH v2 3/3] docs/s390x: document vfio-ccw Cornelia Huck
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Cornelia Huck @ 2020-05-15 15:15 UTC (permalink / raw)
  To: qemu-s390x; +Cc: Thomas Huth, Cornelia Huck, qemu-devel

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..1774cdcadf01
--- /dev/null
+++ b/docs/system/s390x/3270.rst
@@ -0,0 +1,32 @@
+3270 devices
+============
+
+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.
+
+To provide a 3270 device to a guest, create a ``x-terminal3270`` 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-terminal3270`` to the QEMU command line::
+
+    -chardev socket,id=char_0,host=0.0.0.0,port=2300,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>:2300
+
+* 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
 ======================
-- 
2.25.4



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 3/3] docs/s390x: document vfio-ccw
  2020-05-15 15:15 [PATCH v2 0/3] s390x: improve documentation Cornelia Huck
  2020-05-15 15:15 ` [PATCH v2 1/3] docs/s390x: document the virtual css Cornelia Huck
  2020-05-15 15:15 ` [PATCH v2 2/3] docs/s390x: document 3270 Cornelia Huck
@ 2020-05-15 15:15 ` Cornelia Huck
  2020-05-17 17:52   ` Thomas Huth
  2020-05-16  1:18 ` [PATCH v2 0/3] s390x: improve documentation no-reply
  2020-05-18  7:53 ` Cornelia Huck
  4 siblings, 1 reply; 11+ messages in thread
From: Cornelia Huck @ 2020-05-15 15:15 UTC (permalink / raw)
  To: qemu-s390x; +Cc: Thomas Huth, Cornelia Huck, qemu-devel

Add a basic example for passing a dasd via vfio-ccw.

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
 docs/system/s390x/vfio-ccw.rst | 72 ++++++++++++++++++++++++++++++++++
 docs/system/target-s390x.rst   |  1 +
 2 files changed, 73 insertions(+)
 create mode 100644 docs/system/s390x/vfio-ccw.rst

diff --git a/docs/system/s390x/vfio-ccw.rst b/docs/system/s390x/vfio-ccw.rst
new file mode 100644
index 000000000000..4cfd22c3b789
--- /dev/null
+++ b/docs/system/s390x/vfio-ccw.rst
@@ -0,0 +1,72 @@
+Subchannel passthrough via vfio-ccw
+===================================
+
+vfio-ccw (based upon the mediated vfio device infrastructure) allows to
+make certain I/O subchannels and their devices available to a guest. The
+host will not interact with those subchannels/devices any more.
+
+Note that while vfio-ccw should work with most non-QDIO devices, only ECKD
+DASDs have really been tested.
+
+Example configuration
+---------------------
+
+Step 1: configure the host device
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Note: it is recommended to use the ``mdevctl`` tool for this step.
+
+To define the same device as configured below to be started
+automatically, use
+
+::
+
+   [root@host ~]# driverctl -b css set-override 0.0.0313 vfio_ccw
+   [root@host ~]# mdevctl define -u 7e270a25-e163-4922-af60-757fc8ed48c6\
+                  -p 0.0.0313 -t vfio-ccw_io -a
+
+If this is not possible or wanted, follow the manual procedure below.
+
+* Locate the subchannel for the device (in this example, ``0.0.2b09``)::
+
+    [root@host ~]# lscss | grep 0.0.2b09 | awk '{print $2}'
+    0.0.0313
+
+* Unbind the subchannel (in this example, ``0.0.0313``) from the standard
+  I/O subchannel driver and bind it to the vfio-ccw driver::
+
+    [root@host ~]# echo 0.0.0313 > /sys/bus/css/devices/0.0.0313/driver/unbind
+    [root@host ~]# echo 0.0.0313 > /sys/bus/css/drivers/vfio_ccw/bind
+
+* Create the mediated device (identified by a uuid)::
+
+    [root@host ~]# uuidgen
+    7e270a25-e163-4922-af60-757fc8ed48c6
+    [root@host ~]# echo "7e270a25-e163-4922-af60-757fc8ed48c6" > \
+    /sys/bus/css/devices/0.0.0313/mdev_supported_types/vfio_ccw-io/create
+
+Step 2: configure QEMU
+~~~~~~~~~~~~~~~~~~~~~~
+
+* Reference the created mediated device and (optionally) pick a device id to
+  be presented in the guest (here, ``fe.0.1234``, which will end up visible
+  in the guest as ``0.0.1234``::
+
+    -device vfio-ccw,devno=fe.0.1234,sysfsdev=\
+    /sys/bus/mdev/devices/7e270a25-e163-4922-af60-757fc8ed48c6
+
+* Start the guest. The device (here, ``0.0.1234``) should now be usable::
+
+    [root@guest ~]# lscss -d 0.0.1234
+    Device   Subchan.  DevType CU Type Use  PIM PAM POM  CHPIDs           
+    ----------------------------------------------------------------------
+    0.0.1234 0.0.0007  3390/0e 3990/e9      f0  f0  ff   1a2a3a0a 00000000
+    [root@guest ~]# chccwdev -e 0.0.1234
+    Setting device 0.0.1234 online
+    Done
+    [root@guest ~]# dmesg -t
+    (...)
+    dasd-eckd 0.0.1234: A channel path to the device has become operational
+    dasd-eckd 0.0.1234: New DASD 3390/0E (CU 3990/01) with 10017 cylinders, 15 heads, 224 sectors
+    dasd-eckd 0.0.1234: DASD with 4 KB/block, 7212240 KB total size, 48 KB/track, compatible disk layout
+    dasda:VOL1/  0X2B09: dasda1
diff --git a/docs/system/target-s390x.rst b/docs/system/target-s390x.rst
index 2592a05303ef..644e404ef9fd 100644
--- a/docs/system/target-s390x.rst
+++ b/docs/system/target-s390x.rst
@@ -25,6 +25,7 @@ or vfio-ap is also available.
    s390x/vfio-ap
    s390x/css
    s390x/3270
+   s390x/vfio-ccw
 
 Architectural features
 ======================
-- 
2.25.4



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 0/3] s390x: improve documentation
  2020-05-15 15:15 [PATCH v2 0/3] s390x: improve documentation Cornelia Huck
                   ` (2 preceding siblings ...)
  2020-05-15 15:15 ` [PATCH v2 3/3] docs/s390x: document vfio-ccw Cornelia Huck
@ 2020-05-16  1:18 ` no-reply
  2020-05-18  7:53 ` Cornelia Huck
  4 siblings, 0 replies; 11+ messages in thread
From: no-reply @ 2020-05-16  1:18 UTC (permalink / raw)
  To: cohuck; +Cc: qemu-s390x, cohuck, thuth, qemu-devel

Patchew URL: https://patchew.org/QEMU/20200515151518.83950-1-cohuck@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Message-id: 20200515151518.83950-1-cohuck@redhat.com
Subject: [PATCH v2 0/3] s390x: improve documentation
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Switched to a new branch 'test'
eeaa1c2 docs/s390x: document vfio-ccw
f2e7e9f docs/s390x: document 3270
d96751b docs/s390x: document the virtual css

=== OUTPUT BEGIN ===
1/3 Checking commit d96751bf382a (docs/s390x: document the virtual css)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#13: 
new file mode 100644

total: 0 errors, 1 warnings, 93 lines checked

Patch 1/3 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
2/3 Checking commit f2e7e9fed702 (docs/s390x: document 3270)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#13: 
new file mode 100644

total: 0 errors, 1 warnings, 39 lines checked

Patch 2/3 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/3 Checking commit eeaa1c2251e5 (docs/s390x: document vfio-ccw)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#13: 
new file mode 100644

ERROR: trailing whitespace
#78: FILE: docs/system/s390x/vfio-ccw.rst:61:
+    Device   Subchan.  DevType CU Type Use  PIM PAM POM  CHPIDs           $

total: 1 errors, 1 warnings, 79 lines checked

Patch 3/3 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20200515151518.83950-1-cohuck@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/3] docs/s390x: document the virtual css
  2020-05-15 15:15 ` [PATCH v2 1/3] docs/s390x: document the virtual css Cornelia Huck
@ 2020-05-17 17:39   ` Thomas Huth
  2020-05-18  6:28     ` Cornelia Huck
  0 siblings, 1 reply; 11+ messages in thread
From: Thomas Huth @ 2020-05-17 17:39 UTC (permalink / raw)
  To: Cornelia Huck, qemu-s390x; +Cc: qemu-devel

On 15/05/2020 17.15, Cornelia Huck wrote:
> Add some hints about "devno" rules.
> 
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> ---
>  docs/system/s390x/css.rst    | 86 ++++++++++++++++++++++++++++++++++++
>  docs/system/target-s390x.rst |  1 +
>  2 files changed, 87 insertions(+)
>  create mode 100644 docs/system/s390x/css.rst
[...]
> +if the guest OS does not enable MCSS-E (which is true of all
supported guest

Maybe s/true of/true for/ ? Not sure, your English is normally better
than mine ;-)

Anyway,
Reviewed-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 2/3] docs/s390x: document 3270
  2020-05-15 15:15 ` [PATCH v2 2/3] docs/s390x: document 3270 Cornelia Huck
@ 2020-05-17 17:48   ` Thomas Huth
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2020-05-17 17:48 UTC (permalink / raw)
  To: Cornelia Huck, qemu-s390x; +Cc: qemu-devel

On 15/05/2020 17.15, 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

Reviewed-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 3/3] docs/s390x: document vfio-ccw
  2020-05-15 15:15 ` [PATCH v2 3/3] docs/s390x: document vfio-ccw Cornelia Huck
@ 2020-05-17 17:52   ` Thomas Huth
  2020-05-18  6:27     ` Cornelia Huck
  0 siblings, 1 reply; 11+ messages in thread
From: Thomas Huth @ 2020-05-17 17:52 UTC (permalink / raw)
  To: Cornelia Huck, qemu-s390x; +Cc: qemu-devel

On 15/05/2020 17.15, Cornelia Huck wrote:
> Add a basic example for passing a dasd via vfio-ccw.
> 
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> ---
>  docs/system/s390x/vfio-ccw.rst | 72 ++++++++++++++++++++++++++++++++++
>  docs/system/target-s390x.rst   |  1 +
>  2 files changed, 73 insertions(+)
>  create mode 100644 docs/system/s390x/vfio-ccw.rst
> 
> diff --git a/docs/system/s390x/vfio-ccw.rst b/docs/system/s390x/vfio-ccw.rst
> new file mode 100644
> index 000000000000..4cfd22c3b789
> --- /dev/null
> +++ b/docs/system/s390x/vfio-ccw.rst
> @@ -0,0 +1,72 @@
> +Subchannel passthrough via vfio-ccw
> +===================================
> +
> +vfio-ccw (based upon the mediated vfio device infrastructure) allows to
> +make certain I/O subchannels and their devices available to a guest. The
> +host will not interact with those subchannels/devices any more.
> +
> +Note that while vfio-ccw should work with most non-QDIO devices, only ECKD
> +DASDs have really been tested.
> +
> +Example configuration
> +---------------------
> +
> +Step 1: configure the host device
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +Note: it is recommended to use the ``mdevctl`` tool for this step.
> +
> +To define the same device as configured below to be started
> +automatically, use
> +
> +::
> +
> +   [root@host ~]# driverctl -b css set-override 0.0.0313 vfio_ccw
> +   [root@host ~]# mdevctl define -u 7e270a25-e163-4922-af60-757fc8ed48c6\
> +                  -p 0.0.0313 -t vfio-ccw_io -a
> +
> +If this is not possible or wanted, follow the manual procedure below.
> +
> +* Locate the subchannel for the device (in this example, ``0.0.2b09``)::
> +
> +    [root@host ~]# lscss | grep 0.0.2b09 | awk '{print $2}'
> +    0.0.0313
> +
> +* Unbind the subchannel (in this example, ``0.0.0313``) from the standard
> +  I/O subchannel driver and bind it to the vfio-ccw driver::
> +
> +    [root@host ~]# echo 0.0.0313 > /sys/bus/css/devices/0.0.0313/driver/unbind
> +    [root@host ~]# echo 0.0.0313 > /sys/bus/css/drivers/vfio_ccw/bind
> +
> +* Create the mediated device (identified by a uuid)::
> +
> +    [root@host ~]# uuidgen
> +    7e270a25-e163-4922-af60-757fc8ed48c6

Maybe the uuidgen lines should now be moved before the mdevctl example
already, so that it is already clear there where the uuid comes from?

 Thomas



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 3/3] docs/s390x: document vfio-ccw
  2020-05-17 17:52   ` Thomas Huth
@ 2020-05-18  6:27     ` Cornelia Huck
  0 siblings, 0 replies; 11+ messages in thread
From: Cornelia Huck @ 2020-05-18  6:27 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-s390x, qemu-devel

On Sun, 17 May 2020 19:52:43 +0200
Thomas Huth <thuth@redhat.com> wrote:

> On 15/05/2020 17.15, Cornelia Huck wrote:
> > Add a basic example for passing a dasd via vfio-ccw.
> > 
> > Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> > ---
> >  docs/system/s390x/vfio-ccw.rst | 72 ++++++++++++++++++++++++++++++++++
> >  docs/system/target-s390x.rst   |  1 +
> >  2 files changed, 73 insertions(+)
> >  create mode 100644 docs/system/s390x/vfio-ccw.rst
> > 
> > diff --git a/docs/system/s390x/vfio-ccw.rst b/docs/system/s390x/vfio-ccw.rst
> > new file mode 100644
> > index 000000000000..4cfd22c3b789
> > --- /dev/null
> > +++ b/docs/system/s390x/vfio-ccw.rst
> > @@ -0,0 +1,72 @@
> > +Subchannel passthrough via vfio-ccw
> > +===================================
> > +
> > +vfio-ccw (based upon the mediated vfio device infrastructure) allows to
> > +make certain I/O subchannels and their devices available to a guest. The
> > +host will not interact with those subchannels/devices any more.
> > +
> > +Note that while vfio-ccw should work with most non-QDIO devices, only ECKD
> > +DASDs have really been tested.
> > +
> > +Example configuration
> > +---------------------
> > +
> > +Step 1: configure the host device
> > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > +
> > +Note: it is recommended to use the ``mdevctl`` tool for this step.
> > +
> > +To define the same device as configured below to be started
> > +automatically, use
> > +
> > +::
> > +
> > +   [root@host ~]# driverctl -b css set-override 0.0.0313 vfio_ccw
> > +   [root@host ~]# mdevctl define -u 7e270a25-e163-4922-af60-757fc8ed48c6\
> > +                  -p 0.0.0313 -t vfio-ccw_io -a
> > +
> > +If this is not possible or wanted, follow the manual procedure below.
> > +
> > +* Locate the subchannel for the device (in this example, ``0.0.2b09``)::
> > +
> > +    [root@host ~]# lscss | grep 0.0.2b09 | awk '{print $2}'
> > +    0.0.0313
> > +
> > +* Unbind the subchannel (in this example, ``0.0.0313``) from the standard
> > +  I/O subchannel driver and bind it to the vfio-ccw driver::
> > +
> > +    [root@host ~]# echo 0.0.0313 > /sys/bus/css/devices/0.0.0313/driver/unbind
> > +    [root@host ~]# echo 0.0.0313 > /sys/bus/css/drivers/vfio_ccw/bind
> > +
> > +* Create the mediated device (identified by a uuid)::
> > +
> > +    [root@host ~]# uuidgen
> > +    7e270a25-e163-4922-af60-757fc8ed48c6  
> 
> Maybe the uuidgen lines should now be moved before the mdevctl example
> already, so that it is already clear there where the uuid comes from?

Yeah, makes sense.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/3] docs/s390x: document the virtual css
  2020-05-17 17:39   ` Thomas Huth
@ 2020-05-18  6:28     ` Cornelia Huck
  0 siblings, 0 replies; 11+ messages in thread
From: Cornelia Huck @ 2020-05-18  6:28 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-s390x, qemu-devel

On Sun, 17 May 2020 19:39:24 +0200
Thomas Huth <thuth@redhat.com> wrote:

> On 15/05/2020 17.15, Cornelia Huck wrote:
> > Add some hints about "devno" rules.
> > 
> > Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> > ---
> >  docs/system/s390x/css.rst    | 86 ++++++++++++++++++++++++++++++++++++
> >  docs/system/target-s390x.rst |  1 +
> >  2 files changed, 87 insertions(+)
> >  create mode 100644 docs/system/s390x/css.rst  
> [...]
> > +if the guest OS does not enable MCSS-E (which is true of all  
> supported guest
> 
> Maybe s/true of/true for/ ? Not sure, your English is normally better
> than mine ;-)

"for" is better :)

> 
> Anyway,
> Reviewed-by: Thomas Huth <thuth@redhat.com>

Thanks!



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 0/3] s390x: improve documentation
  2020-05-15 15:15 [PATCH v2 0/3] s390x: improve documentation Cornelia Huck
                   ` (3 preceding siblings ...)
  2020-05-16  1:18 ` [PATCH v2 0/3] s390x: improve documentation no-reply
@ 2020-05-18  7:53 ` Cornelia Huck
  4 siblings, 0 replies; 11+ messages in thread
From: Cornelia Huck @ 2020-05-18  7:53 UTC (permalink / raw)
  To: qemu-s390x; +Cc: Thomas Huth, qemu-devel

On Fri, 15 May 2020 17:15:15 +0200
Cornelia Huck <cohuck@redhat.com> wrote:

> The documentation for the s390x system emulation target still has quite
> a bit of room for improvement, so I started adding some device documentation.
> 
> v1->v2:
> - css.rst: added example for cssid == 0 (Thomas)
> - css.rst: mention what the properties look like (Thomas)
> - css.rst: it's "channel subsystem image" (me)
> - 3270.rst: make introduction less confusing (Thomas)
> - 3270.rst: fix device name (Thomas)
> - 3270.rst: use unprivileged port (Thomas)
> - vfio-ccw.rst: add mdevctl example (Thomas)
> - vfio-ccw.rst: formatting tweaks (Thomas)
> 
> Cornelia Huck (3):
>   docs/s390x: document the virtual css
>   docs/s390x: document 3270
>   docs/s390x: document vfio-ccw
> 
>  docs/system/s390x/3270.rst     | 32 +++++++++++++
>  docs/system/s390x/css.rst      | 86 ++++++++++++++++++++++++++++++++++
>  docs/system/s390x/vfio-ccw.rst | 72 ++++++++++++++++++++++++++++
>  docs/system/target-s390x.rst   |  3 ++
>  4 files changed, 193 insertions(+)
>  create mode 100644 docs/system/s390x/3270.rst
>  create mode 100644 docs/system/s390x/css.rst
>  create mode 100644 docs/system/s390x/vfio-ccw.rst
> 

Queued patches 1/2, will send an update to patch 3.



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-05-18  7:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15 15:15 [PATCH v2 0/3] s390x: improve documentation Cornelia Huck
2020-05-15 15:15 ` [PATCH v2 1/3] docs/s390x: document the virtual css Cornelia Huck
2020-05-17 17:39   ` Thomas Huth
2020-05-18  6:28     ` Cornelia Huck
2020-05-15 15:15 ` [PATCH v2 2/3] docs/s390x: document 3270 Cornelia Huck
2020-05-17 17:48   ` Thomas Huth
2020-05-15 15:15 ` [PATCH v2 3/3] docs/s390x: document vfio-ccw Cornelia Huck
2020-05-17 17:52   ` Thomas Huth
2020-05-18  6:27     ` Cornelia Huck
2020-05-16  1:18 ` [PATCH v2 0/3] s390x: improve documentation no-reply
2020-05-18  7:53 ` Cornelia Huck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.