Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9851bc77 authored by Cornelia Huck's avatar Cornelia Huck
Browse files

vfio-ccw: fence off transport mode



vfio-ccw only supports command mode for channel programs, not transport
mode. User space is supposed to already take care of that and pass us
command-mode ORBs only, but better make sure and return an error to
the caller instead of trying to process tcws as ccws.

Reviewed-by: default avatarDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
Acked-by: default avatarHalil Pasic <pasic@linux.vnet.ibm.com>
Signed-off-by: default avatarCornelia Huck <cohuck@redhat.com>
parent 69cfd92e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -124,6 +124,11 @@ static void fsm_io_request(struct vfio_ccw_private *private,
	if (scsw->cmd.fctl & SCSW_FCTL_START_FUNC) {
		orb = (union orb *)io_region->orb_area;

		/* Don't try to build a cp if transport mode is specified. */
		if (orb->tm.b) {
			io_region->ret_code = -EOPNOTSUPP;
			goto err_out;
		}
		io_region->ret_code = cp_init(&private->cp, mdev_dev(mdev),
					      orb);
		if (io_region->ret_code)