Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp2061924ybn; Thu, 26 Sep 2019 06:30:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqyoel7boSv4IafCvZCmQ/ZAZkNcQOom+KUq8Qq41ZjNO6ASfKFWpnxtqAPAiVyOTUTDNCkd X-Received: by 2002:a17:906:3108:: with SMTP id 8mr3093735ejx.11.1569504639992; Thu, 26 Sep 2019 06:30:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569504639; cv=none; d=google.com; s=arc-20160816; b=f9rl0vLxOP+Ku0+OfRPOWuxBpWkyYcguuhTCGTzmixfqp0ul1BDPyjguR8a7tnoEQP VEJpGGzzA38Uy1uab9vkvxvRN2LaRl/1YazXc/S5YF46BuoMgF73G5GZNrG23cj+lB3H dZFZb6ILJKL0KW+/ZF5xaBqqRx4TwxTQc9oK6T0jTqFV/BOYNvoOQSBOv5tHAIYdEHw/ pPljkPG8e8ThKaTmwJHnFPgTF15hBKwC4MNTfCxJuIJX7h2ZlXJSQn7Qw49O7famHWJi IpxjevCag2nOmgzHL4oKnlAE4RTJBJtu1Ohf4bmiY+eOJ6z8bsgtEYv5SPITnWdblCqH T05w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=W3FZ5vxqz4dbTcE/RzDr2BQP/Lbs5fzn9d+anVsPrI4=; b=NJRb8yrg1CVNRJHdlRxj1yg2CVY3rHzj8PoYj5A9PH8zEpQNp8S2AVNgPv79f+yNzh LEY2A1JFwfhPVzmpSUnefS5qriMk1coPXjLzUJQMwMlXAoG7jrkKyEY86XJJ7tWn8Grx w1hopez8Th3MXAv6m5BROkaUXV88O6khBXxLHFlAaFY1R1flr0kfRIS2VgEwEZD1MlQ5 Vjed1+qSwEBbjD/RsXUFayGeumBOSujA8CjcPNIUBrQmDaNEztUEy4ZW37/9QuYZ0HnA JtICof/jK7U2nENZ23H/TSOSHwSRFRFDlZVvCu3oopkVdQi2aVwmbnZlpxXVi7/RSF6z DAuw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id re13si980766ejb.279.2019.09.26.06.30.15; Thu, 26 Sep 2019 06:30:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726975AbfIZN0b (ORCPT + 99 others); Thu, 26 Sep 2019 09:26:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51780 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726869AbfIZN0b (ORCPT ); Thu, 26 Sep 2019 09:26:31 -0400 Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DB1EE8E3C1 for ; Thu, 26 Sep 2019 13:26:30 +0000 (UTC) Received: by mail-qk1-f198.google.com with SMTP id x77so2340568qka.11 for ; Thu, 26 Sep 2019 06:26:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=W3FZ5vxqz4dbTcE/RzDr2BQP/Lbs5fzn9d+anVsPrI4=; b=To1zICr8nEt1UkWk4XC7JH0hcVrqZA2D5+SdtfwRPO8WaR8Errs75+HAo7AkLuwxZU Q76cbvIM8Jew87q9Lz6hzgdd2e9XcC6VNRejRmvOeCoM+R5iNEDsYBEOpcgtrqEHhl7T bLI5V0Agv79MlKUvGOGsOFfu4U3xd2X3PXnZKVqazjuBoU2l0BfIijbIbi+48ohq6DpI iNbspj2DvqxE8cPv3e2AbzhklKTPxfaspy0C6nNWyKGgQI1uegQiqq/ytAG1h1uxfB36 0cORZJmiD4xjNgC1SWHAZgvW2S662dkGz/lR+UJuy5NJD3GjFonwXiUdDvyjFD65mpuC d2/Q== X-Gm-Message-State: APjAAAWHG9hOOY81C11wUg4MFsH4CbK0+SKFZpeXJuPivz2wbRP7NTVo ce6E8LOlqIbfvY7g941JwOlh4at5636J15HjlrJ7PAjdsWM6fgVZ+fQ2cjTV2mz5RQX4Df/Ay7A YJO4hRblT6JyNaDPZWPxPBOVH X-Received: by 2002:a05:620a:12b6:: with SMTP id x22mr3187484qki.495.1569504390224; Thu, 26 Sep 2019 06:26:30 -0700 (PDT) X-Received: by 2002:a05:620a:12b6:: with SMTP id x22mr3187461qki.495.1569504389940; Thu, 26 Sep 2019 06:26:29 -0700 (PDT) Received: from redhat.com (bzq-79-176-40-226.red.bezeqint.net. [79.176.40.226]) by smtp.gmail.com with ESMTPSA id c12sm968131qkc.81.2019.09.26.06.26.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2019 06:26:28 -0700 (PDT) Date: Thu, 26 Sep 2019 09:26:22 -0400 From: "Michael S. Tsirkin" To: Tiwei Bie Cc: jasowang@redhat.com, alex.williamson@redhat.com, maxime.coquelin@redhat.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, dan.daly@intel.com, cunming.liang@intel.com, zhihong.wang@intel.com, lingshan.zhu@intel.com Subject: Re: [PATCH] vhost: introduce mdev based hardware backend Message-ID: <20190926091945-mutt-send-email-mst@kernel.org> References: <20190926045427.4973-1-tiwei.bie@intel.com> <20190926042156-mutt-send-email-mst@kernel.org> <20190926131439.GA11652@___> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190926131439.GA11652@___> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 26, 2019 at 09:14:39PM +0800, Tiwei Bie wrote: > > 4. Does device need to limit max ring size? > > 5. Does device need to limit max number of queues? > > I think so. It's helpful to have ioctls to report the max > ring size and max number of queues. Also, let's not repeat the vhost net mistakes, let's lock everything to the order required by the virtio spec, checking status bits at each step. E.g.: set backend features set features detect and program vqs enable vqs enable driver and check status at each step to force the correct order. e.g. don't allow enabling vqs after driver ok, etc -- MST