Message ID | 20190321075545.14929-2-nir.weiner@oracle.com |
---|---|
State | New |
Headers | show
Return-Path: <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.b="wpGSH+wE"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44Pzyk5nLcz9sPl for <incoming@patchwork.ozlabs.org>; Thu, 21 Mar 2019 19:11:42 +1100 (AEDT) Received: from localhost ([127.0.0.1]:32941 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>) id 1h6snc-0002n0-MB for incoming@patchwork.ozlabs.org; Thu, 21 Mar 2019 04:11:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40922) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <nir.weiner@oracle.com>) id 1h6sjy-0000Ix-Pu for qemu-devel@nongnu.org; Thu, 21 Mar 2019 04:07:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <nir.weiner@oracle.com>) id 1h6sYh-0005pP-15 for qemu-devel@nongnu.org; Thu, 21 Mar 2019 03:56:16 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:55740) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <nir.weiner@oracle.com>) id 1h6sYg-0005nW-L5 for qemu-devel@nongnu.org; Thu, 21 Mar 2019 03:56:14 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x2L7rfu3085191 for <qemu-devel@nongnu.org>; Thu, 21 Mar 2019 07:56:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=fkaAwLz7/cPV2A97NnnySqtCtwJGZbvwKU1mbFhonSI=; b=wpGSH+wEG6lPN8uq9ztG77Rs6PkYwU0b9opU1ySwIS995ddqAPxY2UtJzw+2hcSijH1D IcSvbMNBclqJ1lHuqsTp4gPAmcBhQiGrYUbRsbJqIe3Pgks+JnjkTTf1K9h3YNgJB1ay 4oqk1vRHJG4Rd75qbE8yf1oNjzv34XCHEPKFx0NR0jMM5s2EPweqIimC9vluDT6XYLFu 38rxgWhoGzQrPGlxH4XhbINlgB161XW0JHIp2pL05yFcUm7vxDmp/d+jtqQX9uHlay45 w8DWYGtha1g3nwhLZlT5CcDcxxWVsT4foG2Dn9iCq+ZI4kTKW0kKZsoW7EXw88/OAMIb Pw== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2130.oracle.com with ESMTP id 2r8pney4ms-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <qemu-devel@nongnu.org>; Thu, 21 Mar 2019 07:56:13 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x2L7u8E0015128 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <qemu-devel@nongnu.org>; Thu, 21 Mar 2019 07:56:08 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x2L7u8hT006597 for <qemu-devel@nongnu.org>; Thu, 21 Mar 2019 07:56:08 GMT Received: from nir-ThinkPad-T470.oracle.com (/10.74.125.62) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 21 Mar 2019 00:56:07 -0700 From: Nir Weiner <nir.weiner@oracle.com> To: qemu-devel@nongnu.org Date: Thu, 21 Mar 2019 09:55:43 +0200 Message-Id: <20190321075545.14929-2-nir.weiner@oracle.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190321075545.14929-1-nir.weiner@oracle.com> References: <20190321075545.14929-1-nir.weiner@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9201 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903210058 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by aserp2130.oracle.com id x2L7rfu3085191 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 141.146.126.79 Subject: [Qemu-devel] [PATCH 1/3] vhost-scsi: The vhost device should be stopped when the VM is not running X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: nir.weiner@oracle.com, liran.alon@oracle.com, bijan.mottahedeh@oracle.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> |
Series |
vhost-scsi: Support live migration
|
expand
|
diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c index 61e2e57da9d5..ca42cff1b907 100644 --- a/hw/scsi/vhost-scsi.c +++ b/hw/scsi/vhost-scsi.c @@ -114,6 +114,10 @@ static void vhost_scsi_set_status(VirtIODevice *vdev, uint8_t val) VHostSCSICommon *vsc = VHOST_SCSI_COMMON(s); bool start = (val & VIRTIO_CONFIG_S_DRIVER_OK); + if (!vdev->vm_running) { + start = false; + } + if (vsc->dev.started == start) { return; }