[virtio-dev] Re: [virtio-comment] Re: [PATCH 00/11] Introduce transitional mmr pci device

Michael S. Tsirkin
2023-04-12T05:23:45Z

On Wed, Apr 12, 2023 at 05:15:40AM +0000, Parav Pandit wrote:
>
>
> > From: virtio-comment@lists.oasis-open.org <virtio-comment@lists.oasis-
> > open.org> On Behalf Of Michael S. Tsirkin
>
> > New issue I found today:
> > - if guest disables MSI-X host can not disable MSI-X.
> > need some other channel to notify device about this.
> >
> I will look into it.
>
> > Old issues we discussed before today:
> > - reset needs some special handling because real hardware
> > can not guarantee returning 0 on the 1st read
> When done through the legacy MMR as we discussed, it will.
>
> > - if guest writes into mac, reusing host mac (which is RO)
> > will not work, need extra registers
> No. Again legacy interface section of MMR behaves as legacy.
>
> > - something about notification makes you want to poke
> > at modern notification register? which of course
> > is its own can of worms with VIRTIO_F_NOTIFICATION_DATA
> > changing the format completely.
> There is no NOTIFICATION_DATA with legacy. So it is not applicable.
> Format is same with only vq index.

You are writing into modern register here. *what* are you writing there?
with modern register the format depends on features. here you did not
negotiate any features. what if NOTIFICATION_DATA is a required feature?
with legacy there's no FEATURES_OK so no way to report failure. driver
barrels on, sends wrong data in the kick and hangs.

Sure, we can add a section to notification register and come up with
some behaviour. Without even trying to guess how messy or clean that
will be, far from being a small clean contained thing this feature is
sticking its fingers in lots of pies.

Look I know proposed this originally. I thought it's a small thing too.
It was an idea. I am not sure it pans out though. Not all ideas work.

--
MST