From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47855) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biIpY-0004lq-Ge for qemu-devel@nongnu.org; Fri, 09 Sep 2016 06:14:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1biIpS-0000Ke-C2 for qemu-devel@nongnu.org; Fri, 09 Sep 2016 06:14:43 -0400 From: Maxime Coquelin Date: Fri, 9 Sep 2016 12:14:30 +0200 Message-Id: <1473416072-7063-1-git-send-email-maxime.coquelin@redhat.com> Subject: [Qemu-devel] [PATCH 0/2] virtio-pci: Improve device plugging whith legacy backends List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: mst@redhat.com, qemu-devel@nongnu.org Cc: marcel@redhat.com, vkaplans@redhat.com, qemu-stable@nongnu.org, Maxime Coquelin 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