From patchwork Thu Apr 23 06:21:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Wang X-Patchwork-Id: 463890 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 9E82C1400B7 for ; Thu, 23 Apr 2015 16:26:48 +1000 (AEST) Received: from localhost ([::1]:38282 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlAb0-0007sc-Qq for incoming@patchwork.ozlabs.org; Thu, 23 Apr 2015 02:26:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlAWz-0008EN-B6 for qemu-devel@nongnu.org; Thu, 23 Apr 2015 02:22:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YlAWw-0001eo-4o for qemu-devel@nongnu.org; Thu, 23 Apr 2015 02:22:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56083) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlAWv-0001ec-Sp for qemu-devel@nongnu.org; Thu, 23 Apr 2015 02:22:34 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t3N6MUV5006896 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 23 Apr 2015 02:22:30 -0400 Received: from jason-ThinkPad-T430s.redhat.com (vpn1-7-179.pek2.redhat.com [10.72.7.179]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3N6M58C032751; Thu, 23 Apr 2015 02:22:27 -0400 From: Jason Wang To: qemu-devel@nongnu.org Date: Thu, 23 Apr 2015 14:21:40 +0800 Message-Id: <1429770109-23873-8-git-send-email-jasowang@redhat.com> In-Reply-To: <1429770109-23873-1-git-send-email-jasowang@redhat.com> References: <1429770109-23873-1-git-send-email-jasowang@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: mst@redhat.com, Jason Wang , Alexander Graf , Christian Borntraeger , Cornelia Huck , Richard Henderson Subject: [Qemu-devel] [PATCH V7 07/16] virtio-ccw: using VIRTIO_NO_VECTOR instead of 0 for invalid virtqueue X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org It's a bad idea to need to use vector 0 for invalid virtqueue. So this patch changes to using VIRTIO_NO_VECTOR instead. Cc: Michael S. Tsirkin Cc: Cornelia Huck CC: Christian Borntraeger Cc: Richard Henderson Cc: Alexander Graf Signed-off-by: Jason Wang Acked-by: Cornelia Huck --- hw/s390x/virtio-ccw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index d32ecaf..0434f56 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -281,7 +281,7 @@ static int virtio_ccw_set_vqs(SubchDev *sch, uint64_t addr, uint32_t align, virtio_queue_set_addr(vdev, index, addr); if (!addr) { - virtio_queue_set_vector(vdev, index, 0); + virtio_queue_set_vector(vdev, index, VIRTIO_NO_VECTOR); } else { /* Fail if we don't have a big enough queue. */ /* TODO: Add interface to handle vring.num changing */