From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Subject: Re: [PATCH 1/2] virtio-pci: add setup_vqs flag in vp_try_to_find_vqs Date: Fri, 03 Feb 2012 14:26:25 +1030 Message-ID: <871uqck1sm.fsf@rustcorp.com.au> References: <1326331207-10339-1-git-send-email-zanghongyong@huawei.com> <1326331207-10339-2-git-send-email-zanghongyong@huawei.com> <20120201095407.GB27435@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, amit.shah@redhat.com, aliguori@us.ibm.com, xiaowei.yang@huawei.com, hanweidong@huawei.com, wusongwei@huawei.com, jiangningyu@huawei.com To: "Michael S. Tsirkin" , zanghongyong@huawei.com Return-path: Received: from ozlabs.org ([203.10.76.45]:59086 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757549Ab2BCUeq (ORCPT ); Fri, 3 Feb 2012 15:34:46 -0500 In-Reply-To: <20120201095407.GB27435@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, 1 Feb 2012 11:54:09 +0200, "Michael S. Tsirkin" wrote: > On Thu, Jan 12, 2012 at 09:20:06AM +0800, zanghongyong@huawei.com wrote: > > From: Hongyong Zang > > > > changes in vp_try_to_find_vqs: > > Virtio-serial's probe() calls it to request irqs and setup vqs of port0 and > > controls; add_port() calls it to set up vqs of io_port. > > it will not create virtqueue if the name is null. > > > > Signed-off-by: Hongyong Zang > > This looks like a fragile hack, to me. > > virtio spec also implied that VQ initialization is done > before status is set to OK (during probe) and > devices might have relied on that. So if we want to change > that, I think we need a feature bit. If virtio_serial doesn't use those virtqueues, I think it's OK. I think I'd rather have vp_find_vqs take an offset, however. > Besides, what about documentation? non pci transports? I think this is a device-specific issue, but re-calling find_vqs will have to be audited. Which adding an offset arg should lead to anyway. Thanks, Rusty.