All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Cornelia Huck <cornelia.huck@de.ibm.com>,
	Marcel Apfelbaum <marcel@redhat.com>
Cc: mst@redhat.com, qemu-devel@nongnu.org, vkaplans@redhat.com,
	qemu-stable@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] virtio-pci: Disable modern interface if backend without VIRTIO_F_VERSION_1
Date: Fri, 9 Sep 2016 13:44:35 +0200	[thread overview]
Message-ID: <3368b8a8-b996-d38d-fd82-44e17b9402cf@redhat.com> (raw)
In-Reply-To: <20160909132056.736715d2.cornelia.huck@de.ibm.com>



On 09/09/2016 01:20 PM, Cornelia Huck wrote:
> On Fri, 9 Sep 2016 14:04:55 +0300
> Marcel Apfelbaum <marcel@redhat.com> wrote:
>
>> On 09/09/2016 01:40 PM, Cornelia Huck wrote:
>>> On Fri,  9 Sep 2016 12:14:32 +0200
>>> Maxime Coquelin <maxime.coquelin@redhat.com> wrote:
>>>
>>>> This patch makes pci devices plugging more robust, by not confusing
>>>> guest with modern interface when the backend doesn't support
>>>> VIRTIO_F_VERSION_1.
>>>>
>>>> Cc: Marcel Apfelbaum <marcel@redhat.com>
>>>> Cc: Michael S. Tsirkin <mst@redhat.com>
>>>> Cc: qemu-stable@nongnu.org
>>>> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
>>>> ---
>>>>  hw/virtio/virtio-pci.c | 15 +++++++++++++++
>>>>  hw/virtio/virtio-pci.h |  5 +++++
>>>>  2 files changed, 20 insertions(+)
>>>
>>> Note that 11380b361 ("virtio: handle non-virtio-1-capable backend for
>>> ccw") fixes this issue for ccw via the introduction of a
>>> ->post_plugged() callback. Unfortunately, we did not find a good way to
>>> make it work for pci back then.
>>
>> It seems that for ccw is enough to rewind dev->rev_max,
>> sadly for pci we need to rewind a lot of settings/resources.
>
> Yes, that what I meant with 'more flexibility for ccw'.
Maybe we could replace post_plugged with a pre_plugged approach?

In ->pre_plugged(), cww and pci would specify which features it can
support using virtio_add_feature().
Then we could call get_features() before ->device_plugged().

Doing this, both ccw and pci would have the needed information without
having to rewind any settings.

Does that make sense?

But for now, I think it would be better to merge something in the spirit
of this series (taking into account to remarks).
Indeed, I think we want this fixed in stable, but the above proposal
would be too huge for stable.

Thanks,
Maxime

  reply	other threads:[~2016-09-09 11:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-09 10:14 [Qemu-devel] [PATCH 0/2] virtio-pci: Improve device plugging whith legacy backends Maxime Coquelin
2016-09-09 10:14 ` [Qemu-devel] [PATCH 1/2] virtio: Add backend feature testing functionnality Maxime Coquelin
2016-09-09 10:33   ` Cornelia Huck
2016-09-09 10:48     ` Marcel Apfelbaum
2016-09-09 10:55       ` Cornelia Huck
2016-09-09 11:02         ` Marcel Apfelbaum
2016-09-09 11:20           ` Cornelia Huck
2016-09-09 11:36             ` Maxime Coquelin
2016-09-09 11:47               ` Marcel Apfelbaum
2016-09-09 10:14 ` [Qemu-devel] [PATCH 2/2] virtio-pci: Disable modern interface if backend without VIRTIO_F_VERSION_1 Maxime Coquelin
2016-09-09 10:40   ` Cornelia Huck
2016-09-09 11:04     ` Marcel Apfelbaum
2016-09-09 11:20       ` Cornelia Huck
2016-09-09 11:44         ` Maxime Coquelin [this message]
2016-09-09 11:49           ` Cornelia Huck
2016-09-09 12:01             ` Maxime Coquelin
2016-09-09 14:14             ` [Qemu-devel] [RFC] virtio-bus: Plug devices after features are negotiated Maxime Coquelin
2016-09-09 15:39               ` Michael S. Tsirkin
2016-09-09 16:16                 ` Maxime Coquelin
2016-09-09 18:44                   ` Michael S. Tsirkin

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=3368b8a8-b996-d38d-fd82-44e17b9402cf@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=marcel@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=vkaplans@redhat.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.