All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: mst@redhat.com, qemu-devel@nongnu.org
Cc: marcel@redhat.com, vkaplans@redhat.com, qemu-stable@nongnu.org,
	Maxime Coquelin <maxime.coquelin@redhat.com>
Subject: [Qemu-devel] [PATCH 0/2] virtio-pci: Improve device plugging whith legacy backends
Date: Fri,  9 Sep 2016 12:14:30 +0200	[thread overview]
Message-ID: <1473416072-7063-1-git-send-email-maxime.coquelin@redhat.com> (raw)

This series makes device plugging more robust, to avoid guest to be confused
when the backend doesn't support VIRTIO_F_VERSION_1.

The problem is seen with Linux guests running mainline kernels, when backend
doesn't support the feature:
virtio_net virtio0: virtio: device uses modern interface but does not have VIRTIO_F_VERSION_1.
When it happens, the modern device probe returns -EINVAL, whereas its caller
expects -ENODEV being returned to switch to legacy device probing.

We need to make QEMU more robust to ensure the guest won't be confused,
so this series exposes modern interface only when backend support it.

It has been tested with vhost-net and vhost-user backends in client
and server modes.

Maxime Coquelin (2):
  virtio: Add backend feature testing functionnality
  virtio-pci: Disable modern interface if backend without
    VIRTIO_F_VERSION_1

 hw/virtio/virtio-pci.c     | 15 +++++++++++++++
 hw/virtio/virtio-pci.h     |  5 +++++
 hw/virtio/virtio.c         | 14 ++++++++++++++
 include/hw/virtio/virtio.h |  2 ++
 4 files changed, 36 insertions(+)

-- 
2.7.4

             reply	other threads:[~2016-09-09 10:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-09 10:14 Maxime Coquelin [this message]
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
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=1473416072-7063-1-git-send-email-maxime.coquelin@redhat.com \
    --to=maxime.coquelin@redhat.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.