All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: "Michael S. Tsirkin" <mst@redhat.com>, zanghongyong@huawei.com
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
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	[thread overview]
Message-ID: <871uqck1sm.fsf@rustcorp.com.au> (raw)
In-Reply-To: <20120201095407.GB27435@redhat.com>

On Wed, 1 Feb 2012 11:54:09 +0200, "Michael S. Tsirkin" <mst@redhat.com> wrote:
> On Thu, Jan 12, 2012 at 09:20:06AM +0800, zanghongyong@huawei.com wrote:
> > From: Hongyong Zang <zanghongyong@huawei.com>
> > 
> > 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 <zanghongyong@huawei.com>
> 
> 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.

  reply	other threads:[~2012-02-03 20:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-12  1:20 [PATCH 0/2] virtio-serial: set up vqs on demand zanghongyong
2012-01-12  1:20 ` [PATCH 1/2] virtio-pci: add setup_vqs flag in vp_try_to_find_vqs zanghongyong
2012-02-01  8:14   ` Amit Shah
2012-02-01  9:54   ` Michael S. Tsirkin
2012-02-03  3:56     ` Rusty Russell [this message]
2012-01-12  1:20 ` [PATCH 2/2] virtio-serial: setup_port_vq when adding port zanghongyong
2012-02-01  8:12   ` Amit Shah
2012-02-01  9:32     ` Zang Hongyong
2012-02-01  9:40 ` [PATCH 0/2] virtio-serial: set up vqs on demand Michael S. Tsirkin
2013-04-08  7:51 ` Amit Shah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871uqck1sm.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=aliguori@us.ibm.com \
    --cc=amit.shah@redhat.com \
    --cc=hanweidong@huawei.com \
    --cc=jiangningyu@huawei.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=wusongwei@huawei.com \
    --cc=xiaowei.yang@huawei.com \
    --cc=zanghongyong@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.