From patchwork Tue Sep 18 00:09:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bijan Mottahedeh X-Patchwork-Id: 10603569 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8BC0417E1 for ; Tue, 18 Sep 2018 00:10:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DF3A2A5C7 for ; Tue, 18 Sep 2018 00:10:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 725D02A5F2; Tue, 18 Sep 2018 00:10:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0B292A5FB for ; Tue, 18 Sep 2018 00:10:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728550AbeIRFjp (ORCPT ); Tue, 18 Sep 2018 01:39:45 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:49292 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725807AbeIRFjp (ORCPT ); Tue, 18 Sep 2018 01:39:45 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w8I091tE174421; Tue, 18 Sep 2018 00:09:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2018-07-02; bh=wWVXWhD0MLHLqbnHPNTYav0MQBDdTuw/rgNbKvYtujc=; b=iCqEFVnJRcCrBQs2rTOQgNMMeXoci9l6O3wl8ykEItMxKFp3iZA3NJGgYVIuupMFCiAO tTwHKmIXcOYoH6cYW9++ohEnMrpyLVZvCtxXFBdfHGyRw9mf8OycZvjvmPV++5QxA7HJ gSu8vpuiQU0OqmQTKuwyrzOmXPRY/HYwmowiOi1J5NNwzRcyGInun+UKNUsfV3n9V7YC 5Hxw7Q52jiRJvjHl+WWw5zbrctP9iIcmM89x2sZeTFtiv/YFpzKsHfO/6+ASHaX6kQ9F fSG1Bkm8R/KcrTWMjLqEXDDtWK4ZKxGOwcBV5IH+bW2RcImKEj9daYCVPtezCaJyfW1b DA== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2120.oracle.com with ESMTP id 2mgtqqs8ga-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Sep 2018 00:09:57 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w8I09uRC007493 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Sep 2018 00:09:56 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w8I09tSE017125; Tue, 18 Sep 2018 00:09:55 GMT Received: from ca-ldom147.us.oracle.com (/10.129.68.131) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 17 Sep 2018 17:09:55 -0700 From: Bijan Mottahedeh To: kvm@vger.kernel.org, target-devel@vger.kernel.org Cc: mst@redhat.com, jasowang@redhat.com, silviu.smarandache@oracle.com, bijan.mottahedeh@oracle.com Subject: [PATCH 0/3] vhost/scsi: Respond to control queue operations Date: Mon, 17 Sep 2018 17:09:46 -0700 Message-Id: <1537229389-16176-1-git-send-email-bijan.mottahedeh@oracle.com> X-Mailer: git-send-email 1.8.3.1 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9019 signatures=668708 X-Proofpoint-Spam-Details: rule=notspam policy=default score=12 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=12 mlxscore=12 mlxlogscore=85 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809180000 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch series causes vhost-scsi control queue TMF requests to be explicitly rejected rather than implicitly ignored in order to prevent a guest virito-scsi driver to wait indefinitely for a response to a SCSI TMF request. In addition, control queue address notification operations (VIRTIO_SCSI_T_AN_*) get an effective no-op response. Patch 1/3 implements a control queue handler modeled after the existing request queue handler. There is no commonality between the two handlers. Patch 2/3 factors out the common processing code from the control queue handler into separate routines. Patch 3/3 modifies the request handler to use the common processing routines. Bijan Mottahedeh (3): vhost/scsi: Respond to control queue operations vhost/scsi: Extract common handling code from control queue handler vhost/scsi: Use common handling code in request queue handler drivers/vhost/scsi.c | 422 +++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 326 insertions(+), 96 deletions(-)