From patchwork Fri Dec 13 11:58:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 11291437 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 81EDD13B6 for ; Fri, 13 Dec 2019 21:25:14 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5576421655 for ; Fri, 13 Dec 2019 21:25:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fDsSg5gp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5576421655 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:48036 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifjbe-0006tX-ND for patchwork-qemu-devel@patchwork.kernel.org; Fri, 13 Dec 2019 06:59:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46882) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifjaf-0005rl-E3 for qemu-devel@nongnu.org; Fri, 13 Dec 2019 06:58:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifjae-0001x6-Bj for qemu-devel@nongnu.org; Fri, 13 Dec 2019 06:58:37 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:24083 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ifjae-0001wT-7R for qemu-devel@nongnu.org; Fri, 13 Dec 2019 06:58:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576238315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dqNnoloF1h6D/MeHLeDPb9zVUqDfufd7EkBBR1ZZ2bE=; b=fDsSg5gpEUFqcOABsezMsqiFc96RGG3/TCWo/tPF8uOCDFAkeQLIAhDtc/hM9e+F3WjaMX GgVslVjuDQgX6zot+ys9OPn8ufO3k9UmUqXuq5wvZ4RtPjPNk0EMeWUuyllzLO/hsw4Rqe EfD4hyWmuco1Cwn18i+S6AXUGmTRcXM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-238-1vmY4vZWO9Oi2kvW-iEouQ-1; Fri, 13 Dec 2019 06:58:34 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 62827800D4E for ; Fri, 13 Dec 2019 11:58:33 +0000 (UTC) Received: from dgilbert-t580.localhost (unknown [10.36.117.255]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5E29319C4F; Fri, 13 Dec 2019 11:58:32 +0000 (UTC) From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org Subject: [PULL 1/2] vhost-user-fs: remove "vhostfd" property Date: Fri, 13 Dec 2019 11:58:21 +0000 Message-Id: <20191213115822.77260-2-dgilbert@redhat.com> In-Reply-To: <20191213115822.77260-1-dgilbert@redhat.com> References: <20191213115822.77260-1-dgilbert@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: 1vmY4vZWO9Oi2kvW-iEouQ-1 X-Mimecast-Spam-Score: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, stefanha@redhat.com, mst@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau The property doesn't make much sense for a vhost-user device. Signed-off-by: Marc-André Lureau Message-Id: <20191116112016.14872-1-marcandre.lureau@redhat.com> Reviewed-by: Stefan Hajnoczi Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/vhost-user-fs.c | 1 - include/hw/virtio/vhost-user-fs.h | 1 - 2 files changed, 2 deletions(-) diff --git a/hw/virtio/vhost-user-fs.c b/hw/virtio/vhost-user-fs.c index f0df7f4746..ca0b7fc9de 100644 --- a/hw/virtio/vhost-user-fs.c +++ b/hw/virtio/vhost-user-fs.c @@ -263,7 +263,6 @@ static Property vuf_properties[] = { DEFINE_PROP_UINT16("num-request-queues", VHostUserFS, conf.num_request_queues, 1), DEFINE_PROP_UINT16("queue-size", VHostUserFS, conf.queue_size, 128), - DEFINE_PROP_STRING("vhostfd", VHostUserFS, conf.vhostfd), DEFINE_PROP_END_OF_LIST(), }; diff --git a/include/hw/virtio/vhost-user-fs.h b/include/hw/virtio/vhost-user-fs.h index 539885b458..9ff1bdb7cf 100644 --- a/include/hw/virtio/vhost-user-fs.h +++ b/include/hw/virtio/vhost-user-fs.h @@ -28,7 +28,6 @@ typedef struct { char *tag; uint16_t num_request_queues; uint16_t queue_size; - char *vhostfd; } VHostUserFSConf; typedef struct { From patchwork Fri Dec 13 11:58:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 11291345 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1AB7F13B6 for ; Fri, 13 Dec 2019 21:23:42 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E276E2465A for ; Fri, 13 Dec 2019 21:23:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Vq22yntu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E276E2465A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:48092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifjfh-0002Ew-Lt for patchwork-qemu-devel@patchwork.kernel.org; Fri, 13 Dec 2019 07:03:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47434) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifjai-0005tb-P8 for qemu-devel@nongnu.org; Fri, 13 Dec 2019 06:58:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifjah-000234-Kg for qemu-devel@nongnu.org; Fri, 13 Dec 2019 06:58:40 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:40366 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ifjah-00021l-GO for qemu-devel@nongnu.org; Fri, 13 Dec 2019 06:58:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576238319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zLHIhKF8gtemS4I3jbOco6uwER63VSSn31OuRMEr5wU=; b=Vq22yntu8Dw4AtFHLpIMDIR4mq9xggJkp2I8RS0KaKzXloHVdGGC4saYPnB8QWL3hQU10M tHHVfhSoA6gclSGJTOhOZuMeLHke2z0K8mHOPLPTavKxe83252FuSPQmgJPxeY1dVbrC1A vwLNaMJ84JJ4iAX6HGy6/SOLfgG8I84= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-368-6y9u__Q2P9mdr7prac_g5A-1; Fri, 13 Dec 2019 06:58:35 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AD27B800EB4 for ; Fri, 13 Dec 2019 11:58:34 +0000 (UTC) Received: from dgilbert-t580.localhost (unknown [10.36.117.255]) by smtp.corp.redhat.com (Postfix) with ESMTP id AACE719C4F; Fri, 13 Dec 2019 11:58:33 +0000 (UTC) From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org Subject: [PULL 2/2] virtio-fs: fix MSI-X nvectors calculation Date: Fri, 13 Dec 2019 11:58:22 +0000 Message-Id: <20191213115822.77260-3-dgilbert@redhat.com> In-Reply-To: <20191213115822.77260-1-dgilbert@redhat.com> References: <20191213115822.77260-1-dgilbert@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: 6y9u__Q2P9mdr7prac_g5A-1 X-Mimecast-Spam-Score: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, stefanha@redhat.com, mst@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Stefan Hajnoczi The following MSI-X vectors are required: * VIRTIO Configuration Change * hiprio virtqueue * requests virtqueues Fix the calculation to reserve enough MSI-X vectors. Otherwise guest drivers fall back to a sub-optional configuration where all virtqueues share a single vector. This change does not break live migration compatibility since vhost-user-fs-pci devices are not migratable yet. Reported-by: Vivek Goyal Signed-off-by: Stefan Hajnoczi Message-Id: <20191209110759.35227-1-stefanha@redhat.com> Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Michael S. Tsirkin Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/vhost-user-fs-pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vhost-user-fs-pci.c b/hw/virtio/vhost-user-fs-pci.c index 933a3f265b..e3a649d4a6 100644 --- a/hw/virtio/vhost-user-fs-pci.c +++ b/hw/virtio/vhost-user-fs-pci.c @@ -40,7 +40,8 @@ static void vhost_user_fs_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp) DeviceState *vdev = DEVICE(&dev->vdev); if (vpci_dev->nvectors == DEV_NVECTORS_UNSPECIFIED) { - vpci_dev->nvectors = dev->vdev.conf.num_request_queues + 1; + /* Also reserve config change and hiprio queue vectors */ + vpci_dev->nvectors = dev->vdev.conf.num_request_queues + 2; } qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));