Discussion of the implementations of VIRTIO specification
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Cornelia Huck <cohuck@redhat.com>
Cc: Halil Pasic <pasic@linux.ibm.com>,
	Max Gurtovoy <mgurtovoy@nvidia.com>,
	Jason Wang <jasowang@redhat.com>,
	virtio-comment@lists.oasis-open.org,
	Virtio-Dev <virtio-dev@lists.oasis-open.org>,
	Parav Pandit <parav@nvidia.com>,
	Shahaf Shuler <shahafs@nvidia.com>, Oren Duer <oren@nvidia.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [PATCH v2 1/4] Add virtio Admin Virtqueue
Date: Mon, 31 Jan 2022 12:22:09 -0500	[thread overview]
Message-ID: <20220131121845-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <877dafzv8w.fsf@redhat.com>

On Mon, Jan 31, 2022 at 06:10:39PM +0100, Cornelia Huck wrote:
> On Mon, Jan 31 2022, Halil Pasic <pasic@linux.ibm.com> wrote:
> 
> > On Mon, 31 Jan 2022 09:52:54 -0500
> > "Michael S. Tsirkin" <mst@redhat.com> wrote:
> >
> >> On Mon, Jan 31, 2022 at 03:26:36PM +0100, Cornelia Huck wrote:
> >> > On Mon, Jan 31 2022, "Michael S. Tsirkin" <mst@redhat.com> wrote:
> >> >   
> >> > > On Mon, Jan 31, 2022 at 10:16:43AM +0100, Cornelia Huck wrote:  
> >> > >> On Sun, Jan 30 2022, "Michael S. Tsirkin" <mst@redhat.com> wrote:
> >> > >>   
> >> > >> > On Sun, Jan 30, 2022 at 05:12:46PM +0200, Max Gurtovoy wrote:  
> >> > >> >> #define VIRTIO_PCI_CAP_MISC_CFG 10
> >> > >> >> 
> >> > >> >> and
> >> > >> >> 
> >> > >> >> struct virtio_pci_misc_cfg {
> >> > >> >>     le16 admin_queue_index; /* read-only for driver */
> >> > >> >> };
> >> > >> >> 
> >> > >> >> Is agreed by all for V3 ? instead of the net and blk AQ index definitions.  
> >> > >> >
> >> > >> > We need to add it to MMIO and CCW I guess too.  
> >> > >> 
> >> > >> That seems ok for pci.
> >> > >> 
> >> > >> For ccw, I'd do something like
> >> > >> 
> >> > >> #define CCW_CMD_READ_MISC_CONF 0x82
> >> > >> 
> >> > >> struct virtio_misc_conf {
> >> > >>        be16 admin_queue_index;
> >> > >> };
> >> > >> 
> >> > >> bound to revision 3, which gets a payload data containing the length of
> >> > >> this structure (for future expansions).
> >> > >> 
> >> > >> Halil, do you think that would work?
> >> > >> 
> >> > >> For mmio, I'd need to think a bit more. Any mmio experts around?  
> >> > >
> >> > > Not an expert but I think we can rely on a feature
> >> > > bit to be acked since admin vq is only needed
> >> > > after feature negotiation is complete.  
> >> > 
> >> > You mean a register that is valid conditionally? I don't see an easy way
> >> > to add some kind of "misc" interface for mmio, unlike for the other
> >> > transports.
> >> > 
> >> > So something like:
> >> > 
> >> > AdminQueueIndex/0x0c4/R
> >> > If VIRTIO_F_ADMIN_VQ has been negotiated, reading from this register
> >> > returns the queue index of the administration virtqueue.  
> >> 
> >> No, I mean a register that switches 100+ between device specific
> >> and misc space.
> >> 
> >
> > Maybe adding a register that tells us where does the "misc config
> > start" is another option. I don't think we need an open ended
> > device-config in practice. I have no idea if there are any upper limits
> > on MMIO address space though. If we are constrained there, the switching
> > is certainly more efficient. Otherwise, I think having the misc config
> > somewhere after device specific config is simpler.
> 
> I think we first need to agree what the "misc" thing is actually
> supposed to be. My idea was that we don't have an unlimited supply of
> ccws to use for new features, so introducing one for reading "misc"
> configuration would be a way to keep things extensible (it also might
> make the config/register space for other transports less cluttered). The
> same idea (save on ccws) would apply to the multiplexing "action" ccw I
> mentioned in my other mail.
> 
> So, for the case here (simply relaying the location of the admin vq), we
> don't really need a "misc" mechanism for pci/mmio, but I'd like to
> introduce one for ccw. If we agree that it would be useful for pci/mmio
> as well, we should introduce it now.

OK, my idea was that it's a config that is just live device config but
both device and transport independent.  Adding it in the misc structure
would allow defining it in a single place.

> >
> > BTW I don't really like this "misc" as the name. FWIW it is less
> > miscellaneous that the device specific config, since it is common
> > for all devices. I don't have a good name for it, but I would prefer
> > "common" over "misc"
> 
> I'm not sure whether "common" would be more confusing, as pci already
> has a "common" config (with things that are covered in the mmio
> registers, and via various ccw commands.) Does anyone have a better idea
> for a bikeshed colour?

I'd say "shared" maybe but unfortunately pci already gained "shared memory"
so I think it would be confusing.
"transport independent" is too wordy...

-- 
MST


  reply	other threads:[~2022-01-31 17:22 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-24  9:39 [PATCH v2 0/4] VIRTIO: Provision maximum MSI-X vectors for a VF Max Gurtovoy
2022-01-24  9:39 ` [PATCH v2 1/4] Add virtio Admin Virtqueue Max Gurtovoy
2022-01-26 14:40   ` Michael S. Tsirkin
2022-01-26 14:54     ` [virtio-comment] " Max Gurtovoy
2022-01-26 15:03       ` Michael S. Tsirkin
2022-01-26 15:16         ` [virtio-comment] " Max Gurtovoy
2022-01-27  3:56         ` Parav Pandit
2022-01-27  3:55     ` Parav Pandit
2022-01-27  3:56       ` Jason Wang
2022-01-28 12:14   ` [virtio-comment] " Cornelia Huck
2022-01-28 12:47     ` Michael S. Tsirkin
2022-01-28 15:49       ` [virtio-comment] " Cornelia Huck
2022-01-28 15:52         ` Michael S. Tsirkin
2022-01-28 16:14           ` [virtio-dev] " Cornelia Huck
2022-01-28 16:16             ` Michael S. Tsirkin
2022-01-28 16:23               ` [virtio-dev] " Cornelia Huck
2022-01-29  3:53           ` Jason Wang
2022-01-30  9:13             ` Max Gurtovoy
2022-01-30  9:40               ` Michael S. Tsirkin
2022-01-30  9:56                 ` Max Gurtovoy
2022-01-30 14:41                   ` Michael S. Tsirkin
2022-01-30 15:12                     ` Max Gurtovoy
2022-01-30 15:30                       ` Michael S. Tsirkin
2022-01-30 18:23                         ` [virtio-comment] " Max Gurtovoy
2022-01-30 21:15                           ` Michael S. Tsirkin
2022-01-31  9:16                         ` [virtio-dev] " Cornelia Huck
2022-01-31 13:40                           ` Michael S. Tsirkin
2022-01-31 14:26                             ` [virtio-comment] " Cornelia Huck
2022-01-31 14:52                               ` Michael S. Tsirkin
2022-01-31 15:48                                 ` [virtio-dev] " Cornelia Huck
2022-01-31 16:00                                   ` Michael S. Tsirkin
2022-01-31 16:12                                 ` Halil Pasic
2022-01-31 17:10                                   ` [virtio-dev] " Cornelia Huck
2022-01-31 17:22                                     ` Michael S. Tsirkin [this message]
2022-02-01 11:53                                     ` Halil Pasic
2022-02-01 17:01                                       ` Cornelia Huck
2022-02-01 18:34                                         ` Michael S. Tsirkin
2022-01-31 15:47                           ` Halil Pasic
2022-01-31 16:01                             ` Michael S. Tsirkin
2022-01-31 16:12                             ` Cornelia Huck
2022-02-09  2:27                         ` Jason Wang
2022-02-09  7:46                           ` Michael S. Tsirkin
2022-01-30  9:39             ` Michael S. Tsirkin
2022-01-30 11:21     ` [virtio-comment] " Max Gurtovoy
2022-01-30 14:37       ` Michael S. Tsirkin
2022-01-24  9:39 ` [virtio-comment] [PATCH v2 2/4] virtio-blk: add support for VIRTIO_F_ADMIN_VQ Max Gurtovoy
2022-01-24  9:39 ` [PATCH v2 3/4] virtio-net: " Max Gurtovoy
2022-01-24  9:39 ` [PATCH v2 4/4] Add support for MSI-X vectors configuration for PCI VFs Max Gurtovoy
2022-01-25 11:53   ` Michael S. Tsirkin
2022-01-26 13:03     ` Parav Pandit
2022-01-26 14:08       ` [virtio-comment] " Michael S. Tsirkin
2022-01-27  3:40         ` Parav Pandit
2022-01-27 12:39           ` Michael S. Tsirkin
2022-01-27 14:16             ` Parav Pandit
2022-01-27 17:28               ` Michael S. Tsirkin
2022-01-27  3:36   ` Jason Wang
2022-01-27  5:22     ` Parav Pandit
2022-01-28  3:23       ` [virtio-comment] " Jason Wang
2022-01-28  3:30         ` Parav Pandit
2022-01-28  3:35           ` Jason Wang
2022-01-28  3:45             ` Parav Pandit

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=20220131121845-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=mgurtovoy@nvidia.com \
    --cc=oren@nvidia.com \
    --cc=parav@nvidia.com \
    --cc=pasic@linux.ibm.com \
    --cc=shahafs@nvidia.com \
    --cc=stefanha@redhat.com \
    --cc=virtio-comment@lists.oasis-open.org \
    --cc=virtio-dev@lists.oasis-open.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox