public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org,
	qemu-devel@nongnu.org, borntraeger@de.ibm.com, agraf@suse.com,
	alex.williamson@redhat.com, eric.auger@redhat.com
Subject: Re: [PATCH v8 00/13] basic channel IO passthrough infrastructure based on vfio
Date: Thu, 18 May 2017 15:13:56 +0200	[thread overview]
Message-ID: <20170518151356.3dfc4207.cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <20170517004813.58227-1-bjsdjshi@linux.vnet.ibm.com>

On Wed, 17 May 2017 02:48:00 +0200
Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> wrote:

> The patch series introduce a basic channel I/O passthrough
> infrastructure based on vfio.
> - Focus on supporting dasd-eckd(cu_type/dev_type = 0x3990/0x3390) as
>   the target device. 
> - Support new qemu parameters in the style of:
>     -machine s390-ccw-virtio(,s390-squash-mcss=on|off) \
>     -device vfio-ccw,sysfsdev=$MDEV_PATH
>   We want to support real (i.e. not virtual) channel devices even for
>   guests that do not support MCSS-E (where guests may see devices from
>   any channel subsystem image at once). As all virtio-ccw devices are in
>   css 0xfe (and show up in the default css 0 for guests not activating
>   MCSS-E), we need an option to squash e.g. passed-through channel devices
>   from their real css (0-3, or 0 for hosts not activating MCSS-E) into
>   the default css, that is what the new machine option s390-squash-css is
>   added.

Patches queued, with minor changes (see my comments).

I'll push out to s390-next once this passes some of my tests.

> 
> Build and install:
> 1. kernel configuration
>   CONFIG_S390_CCW_IOMMU=m
>   CONFIG_VFIO=m
>   CONFIG_VFIO_MDEV=m
>   CONFIG_VFIO_MDEV_DEVICE=m
>   CONFIG_VFIO_CCW=m
> 2. modules required
>   modprobe vfio.ko
>   modprobe mdev.ko
>   modprobe vfio_mdev.ko
>   modprobe vfio_iommu_type1.ko
>   modprobe vfio_ccw.ko
> 3. find a subchannel(0.0."%schid") of a DASD-ECKD device and bind it to
>   vfio_ccw driver
>   #find the dasd you can use with lsdasd on your host. e.g.:
>   devno="7e52"
>   schid="16ca"
>   #unbind the ccw device from the subchannel
>   echo 0.0."$devno" > /sys/bus/ccw/devices/0.0."$devno"/driver/unbind
>   #unbind the subchannel from io_subchannel driver
>   echo 0.0."$schid" > /sys/bus/css/devices/0.0."$schid"/driver/unbind
>   #bind the subchannel with vfio_ccw driver
>   echo 0.0."$schid" > /sys/bus/css/drivers/vfio_ccw/bind
> 4. create a mediated device
>   #generate a uuid with uuidgen. e.g.:
>   uuid="6dfd3ec5-e8b3-4e18-a6fe-57bc9eceb920"
>   echo "$uuid" > \
>   /sys/bus/css/devices/0.0."$schid"/mdev_supported_types/vfio_ccw-io/create
> 5. pass-through this device to a vm
>   -M s390-ccw-virtio,s390-squash-css=on \
>   -device vfio-ccw,sysfsdev=/sys/bus/mdev/devices/$uuid \
>   ... ...

These instructions would be helpful to preserve in the qemu wiki and
could even be expanded upon. Ping me if you need an account (hint,
hint ;)

      parent reply	other threads:[~2017-05-18 13:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-17  0:48 [PATCH v8 00/13] basic channel IO passthrough infrastructure based on vfio Dong Jia Shi
2017-05-17  0:48 ` [PATCH v8 01/13] update-linux-headers: update for vfio-ccw Dong Jia Shi
2017-05-18 13:08   ` Cornelia Huck
2017-05-17  0:48 ` [PATCH v8 02/13] vfio: linux-headers " Dong Jia Shi
2017-05-17  0:48 ` [PATCH v8 03/13] s390x/css: add s390-squash-mcss machine option Dong Jia Shi
2017-05-17  0:48 ` [PATCH v8 04/13] s390x/css: realize css_sch_build_schib Dong Jia Shi
2017-05-17  0:48 ` [PATCH v8 05/13] s390x/css: realize css_create_sch Dong Jia Shi
2017-05-17  0:48 ` [PATCH v8 06/13] s390x/css: device support for s390-ccw passthrough Dong Jia Shi
2017-05-17  0:48 ` [PATCH v8 07/13] vfio/ccw: vfio based subchannel passthrough driver Dong Jia Shi
2017-05-17  0:48 ` [PATCH v8 08/13] vfio/ccw: get io region info Dong Jia Shi
2017-05-17  0:48 ` [PATCH v8 09/13] vfio/ccw: get irqs info and set the eventfd fd Dong Jia Shi
2017-05-17  0:48 ` [PATCH v8 10/13] s390x/css: introduce and realize ccw-request callback Dong Jia Shi
2017-05-17  0:48 ` [PATCH v8 11/13] s390x/css: ccw translation infrastructure Dong Jia Shi
2017-05-17  0:48 ` [PATCH v8 12/13] vfio/ccw: update sense data if a unit check is pending Dong Jia Shi
2017-05-17  0:48 ` [PATCH v8 13/13] MAINTAINERS: Add vfio-ccw maintainer Dong Jia Shi
2017-05-18 13:09   ` Cornelia Huck
2017-05-18 13:13 ` Cornelia Huck [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170518151356.3dfc4207.cornelia.huck@de.ibm.com \
    --to=cornelia.huck@de.ibm.com \
    --cc=agraf@suse.com \
    --cc=alex.williamson@redhat.com \
    --cc=bjsdjshi@linux.vnet.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=eric.auger@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox