From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NRp2J-00044k-5u for qemu-devel@nongnu.org; Mon, 04 Jan 2010 10:40:03 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NRp2E-0003yL-Uy for qemu-devel@nongnu.org; Mon, 04 Jan 2010 10:40:02 -0500 Received: from [199.232.76.173] (port=59146 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NRp2E-0003xo-Dd for qemu-devel@nongnu.org; Mon, 04 Jan 2010 10:39:58 -0500 Received: from mx20.gnu.org ([199.232.41.8]:47298) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NRp2D-0002xA-Je for qemu-devel@nongnu.org; Mon, 04 Jan 2010 10:39:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NRp20-00071y-T2 for qemu-devel@nongnu.org; Mon, 04 Jan 2010 10:39:45 -0500 Date: Mon, 4 Jan 2010 17:36:43 +0200 From: "Michael S. Tsirkin" Message-ID: <20100104153642.GA13809@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCHv5 0/2] qemu: properties for feature compatibility List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Anthony Liguori , kraxel@redhat.com Here's what I came up with for solving the problem of differences in features in virtio between 0.12 and 0.11. This also enables migration between different backends, e.g. between host where tap supports virtio net header and where it does not: management just needs to set features appropriately. Compat bits are yet to be set, will be done when this patch is applied. Changes since v4: - Save bit offset in a separate field, offset is in bytes Changes since RFC v2: - we already have a flag to control write cache feature, let's not add another one Changes since RFC: - add symbolic names for properties - only optional features can be changed Comments? Gerd, what do you think? Michael S. Tsirkin (2): qdev: add bit property type virtio: add features as qdev properties hw/qdev-properties.c | 62 ++++++++++++++++++++++++++++++++++++++++++++----- hw/qdev.h | 11 +++++++++ hw/s390-virtio-bus.c | 12 +++++++-- hw/s390-virtio-bus.h | 1 + hw/syborg_virtio.c | 12 +++++---- hw/virtio-balloon.c | 4 +- hw/virtio-blk.c | 6 +---- hw/virtio-blk.h | 8 ++++++ hw/virtio-console.c | 4 +- hw/virtio-net.c | 39 +++++++++++++------------------ hw/virtio-net.h | 20 ++++++++++++++++ hw/virtio-pci.c | 25 +++++++++++++------ hw/virtio.c | 2 +- hw/virtio.h | 7 +++++- 14 files changed, 156 insertions(+), 57 deletions(-)